REST API  17
REST API for Luna Network HSMs
PUT /api/lunasa/network/devices/{deviceid}/classes/{classid}

PUT /api/lunasa/network/devices/{deviceid}/classes/{classid}

This resource allows to modify an already created class for traffic management. But if it doesn’t exists it creates one with the provided ‘classid’ in the url.

User Privileges

Users with the following role privileges can perform this command:

  • admin
  • operator

Parameters

deviceid

The identifier of a network device.

Use: Required

JSON Schema:

    Object
    type: string
    minLength: 1
    maxLength: 32
    pattern: ^[a-zA-Z0-9_.-]*$

classid

The class name/id to be assigned/modified.

Note: The className/classid must be atleast 1 character long and may have up to 32 characters in length.
The className or classid can contain characters from the following categories:

  • Uppercase letters (A through Z)
  • Lowercase letters (a through z)
  • Numbers (0 through 9)
  • Non-alphanumeric characters ( _ , @ , : )

Keywords 'default' and 'class' has been reserved for system use.

Use: Required

JSON Schema:

    Object
    type: string
    minLength: 1
    minLength: 32
    pattern: ^[a-zA-Z0-9:=@_]*$

minBandwidth

The minimum bandwidth to be assigned/updated to the class.

Note: The minimum bandwidth is measured in kilobits(Kb) by default. It's value can have a range of 1-1000000.

Use: Required

JSON Schema:

    Object
    type: integer
    minimum: 1
    maximum: 1000000

maxBandwidth

The maximum bandwidth to be assigned/updated to the class.

Note: The maximum bandwidth is measured in kilobits(Kb) by default. It's value can have a range of 1-1000000. If not specified, the value of minimum bandwidth is assumed to its value.

Use: Not Required

JSON Schema:

    Object
    type: integer
    minimum: 1
    maximum: 1000000

Responses

204

Success.

Location

"Location" is the URL to the newly created class.

400

FRAMEWORK_BAD_REQUEST

Returned when the input data does not conform to the required validation schema.

400

APPLIANCE_PLUGIN_PARAMETERS_NOT_APPROPRIATE

Minimum-bandwidth provided is greater than the value provided for max-bandwidth.

400

APPLIANCE_CLASS_CREATION_FAILED

Class creation failed.

403

APPLIANCE_CLASS_IS_RESERVED_FOR_SYSTEM_USE

Specified class name is reserved.

404

APPLIANCE_INTERFACE_DOES_NOT_EXIST

Specified interface does not exist.

Example Request

     PUT
     https://1.2.3.4:8443/api/lunasa/network/devices/eth0/classes/demoClass
     {
         "minBandwidth": 120,
         "maxBandwidth": 2024
     }

Example Result

     {

     }