jnx_interfaces_service.proto
Service
Interfaces
These RPCs would be used by the clients to configure the appropriate interface objects
Method Name | Request Type | Response Type | Description |
---|---|---|---|
InterfaceAdd | InterfaceAddRequest | InterfaceAddResponse | RPC for adding an interface object |
InterfaceUpdate | InterfaceUpdateRequest | InterfaceUpdateResponse | RPC for updating the attributes/properties of an interface object |
InterfaceDelete | InterfaceDeleteRequest | InterfaceDeleteResponse | RPC for deleting an interface object |
InterfaceGet | InterfaceGetRequest | InterfaceGetResponse | |
InterfaceUnitPermissionsGet | InterfaceUnitPermissionsGetRequest | InterfaceUnitPermissionsGetResponse | RPC for checking owner/creator/permission of the object |
RPC(s)
The following APIs are provided by this service:
InterfaceAdd
RPC for adding an interface object
Input: InterfaceAddRequest
Output: InterfaceAddResponse
InterfaceUpdate
RPC for updating the attributes/properties of an interface object
Input: InterfaceUpdateRequest
Output: InterfaceUpdateResponse
InterfaceDelete
RPC for deleting an interface object
Input: InterfaceDeleteRequest
Output: InterfaceDeleteResponse
InterfaceGet
[brief]: RPC for reading back the details of an interface object. [detail]: The interface object could be interface, unit, family, address or ARP/NDP object
Using this RPC, the attribute values that are configured on the interface object could be obtained. Only the attributes that could be configured using RPCs would be returned as part of this RPC.
The InterfaceGetRequest message would be populated with the object details and the InterfaceType field would be set in the config message by the client to identify the interface object that is being configured.
Input: InterfaceGetRequest
Output: InterfaceGetResponse
InterfaceUnitPermissionsGet
RPC for checking for the following - if the specified interface object is owned/created by the client performing this query - unit interface object is a public object if it is created from CLI not updated by any clients. The interface object should be an Interface Unit object When an interface object is configured by a client, the whole of the interface tree would be owned by the client. Any other client would not be able to make any configuration changes on the interface tree till the current owner releases the configurations on the interface tree.
Input: InterfaceUnitPermissionsGetRequest
Output: InterfaceUnitPermissionsGetResponse
Message(s)
This IDL defines the following message type(s)
InterfaceAddRequest
This message defines the request that would be sent for the ADD operation for the configuring the different interface objects.
Field | Type | Description |
---|---|---|
type | InterfaceType | Specifies the interface type that is being configured |
interfaces | InterfaceConfig | Config message for top level interface object |
unit | InterfaceUnitConfig | Config message for interface unit object |
family | InterfaceFamilyConfig | Config message for interface family object |
address | InterfaceAddressConfig | Config message for interface address object |
arp | InterfaceArpConfig | Config message for interface ARP/NDP object |
InterfaceAddResponse
This message defines response that would be retured for the ADD operation for the different interface objects.
Field | Type | Description |
---|---|---|
status | RpcStatus | RPC execution status information |
sub_code | StatusCode | Status code returned by the backend service. |
InterfaceUpdateRequest
This message defines the request that would be sent for the UPDATE operation for the configuring the different interface objects.
Field | Type | Description |
---|---|---|
type | InterfaceType | Specifies the interface type that is being configured |
interfaces | InterfaceConfig | Config message for top level interface object |
unit | InterfaceUnitConfig | Config message for interface unit object |
family | InterfaceFamilyConfig | Config message for interface family object |
address | InterfaceAddressConfig | Config message for interface address object |
arp | InterfaceArpConfig | Config message for interface ARP/NDP object |
InterfaceUpdateResponse
This message defines response that would be retured for the UPDATE operation for the different interface objects.
Field | Type | Description |
---|---|---|
status | RpcStatus | RPC execution status information |
sub_code | StatusCode | Status code returned by the backend service. |
InterfaceDeleteRequest
This message defines the request that would be sent for the DELETE operation for the configuring the different interface objects.
Field | Type | Description |
---|---|---|
type | InterfaceType | Specifies the interface type that is being deleted |
interfaces | InterfaceDelete | Delete message for top level interface object |
unit | InterfaceUnitDelete | Delete message for interface unit object |
family | InterfaceFamilyDelete | Delete message for interface family object |
address | InterfaceAddressDelete | Delete message for interface address object |
arp | InterfaceArpDelete | Delete message for interface ARP/NDP object |
InterfaceDeleteResponse
This message defines response that would be retured for the DELETE operation for the different interface objects.
Field | Type | Description |
---|---|---|
status | RpcStatus | RPC execution status information |
sub_code | StatusCode | Status code returned by the backend service. |
InterfaceGetRequest
This message defines the request that would be sent for the GET operation for the configuring the different interface objects.
Field | Type | Description |
---|---|---|
type | InterfaceType | Interface object type this config object represents. |
interfaces | InterfaceConfig | Config message for interface object |
unit | InterfaceUnitConfig | Config message for interface unit object |
family | InterfaceFamilyConfig | Config message for interface family object |
address | InterfaceAddressConfig | Config message for interface address object |
arp | InterfaceArpConfig | Config message for interface ARP/NDP object |
InterfaceGetResponse
Message definition for the GET RPC
Field | Type | Description |
---|---|---|
type | InterfaceType | Specifies the interface type that is being returned. |
interfaces | InterfaceConfig | Config message for interface object |
unit | InterfaceUnitConfig | Config message for interface unit object |
family | InterfaceFamilyConfig | Config message for interface family object |
address | InterfaceAddressConfig | Config message for interface address object |
arp | InterfaceArpConfig | Config message for interface ARP/NDP object |
status | RpcStatus | RPC execution status information |
sub_code | StatusCode | Status code returned by the backend service. |
InterfaceUnitPermissionsGetRequest
Message definition for checking the following - Whether the Interface Unit is created by CLI and not modified by any client - Whether the Interface Unit is modified by the client making this query
Field | Type | Description |
---|---|---|
port_name | string | Port name of the Interface |
unit | InterfaceUnit | Interface unit number |
InterfaceUnitPermissionsGetResponse
The response message has the following information - Interface Unit is a CLI created unit and no client has modified it - Interface Unit is modified by the client making this query.
Field | Type | Description |
---|---|---|
status | RpcStatus | RPC execution status information |
sub_code | StatusCode | Status code returned by the backend service. |
is_owner | bool | Specifies whether current client created this IFL using API |
client_created_unit | bool | Specifies if this IFL is created using API or not. |
client_name | string | Name of the client that created this IFL using API |
InterfaceFamilyDelete
This message specifies the interface family object that has to be deleted.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the interface |
unit | InterfaceUnit | Unit number of the interface |
family | AfType | Protocol family of the interface. This could be IPv4 of IPv6 family |
InterfaceDelete
This message specifies the top level interface object that has to be deleted.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the interface |
interface_options | InterfaceSpecificOptions | Any optional interface specific options. |
InterfaceArpConfig
This defintion would be used to send the interface arp configuration information using the API.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the Interface |
unit | InterfaceUnit | Interface unit number |
family | AfType | Protocol family to be configured for the interface |
ip_address | IpAddress | IP address to be configured for the interface |
neighbor_address | IpAddress | ARP address to be configured for the interface |
attributes | InterfaceAttributeList | List of optional attributes that can be configured |
InterfaceUnitConfig
This defintion would be used to send the interface unit configuration information using the API.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the Interface |
unit | InterfaceUnit | Interface unit number |
attributes | InterfaceAttributeList | List of optional attributes that can be configured |
InterfaceAttributeList
The interface attributes could be string attributes or integer attributes. The attributes configuration is optional for interface objects.
Field | Type | Description |
---|---|---|
string_attributes | StringAttribute | List of string attribites for the interface object |
integer_attributes | IntegerAttribute | List of integer attribites for the interface object |
IntegerAttribute
This message defines the format for passing an integer attribute for the different interface objects.
Field | Type | Description |
---|---|---|
key | string | Key for the integer attribute |
value | uint32 | Value for the integer attribute |
InterfaceArpDelete
This message specifies the interface address object that has to be deleted.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the interface |
unit | InterfaceUnit | Unit number of the interface |
family | AfType | Protocol family of the interface. This could be IPv4 of IPv6 family |
ip_address | IpAddress | IP address to be deleted. |
neighbor_address | IpAddress | ARP/NDP address to be deleted. |
attributes | InterfaceAttributeList | ARP/NDP attribute to be deleted. |
InterfaceAddressDelete
This message specifies the interface address object that has to be deleted.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the interface |
unit | InterfaceUnit | Unit number of the interface |
family | AfType | Protocol family of the interface. This could be IPv4 of IPv6 family |
ip_address | IpAddress | IP address to be deleted. |
InterfaceAddressConfig
This defintion would be used to send the interface address configuration information using the API.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the Interface |
unit | InterfaceUnit | Interface unit number |
family | AfType | Protocol family to be configured for the interface |
ip_address | IpAddress | IP address to be configured. |
attributes | InterfaceAttributeList | List of optional attributes that can be configured |
InterfaceFamilyConfig
This defintion would be used to send the interface family configuration information using the API.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the Interface |
unit | InterfaceUnit | Interface unit number |
family | AfType | Protocol family to be configured for the interface |
attributes | InterfaceAttributeList | List of optional attributes that can be configured |
InterfaceSpecificOptions
The different fields that are configured in this message would be dependent on the interfaces.
Field | Type | Description |
---|---|---|
aggregate_options | AggregateOptions | Aggregate Interface specific options |
InterfaceUnit
This defintion would be used to define the interface unit number for the interface objects. This is needed since the interface unit number could be 0 and when value 0 is set for the unit number, the information is not marked as configured by user.
Field | Type | Description |
---|---|---|
number | uint32 | Interface unit number |
InterfaceUnitDelete
This message specifies the interface unit object that has to be deleted.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the interface |
unit | InterfaceUnit | Unit number of the interface |
InterfaceConfig
This defintion would be used to send the interface configuration information using the API.
Field | Type | Description |
---|---|---|
port_name | string | Port name of the Interface |
interface_options | InterfaceSpecificOptions | Interface specific options based on the interface type |
attributes | InterfaceAttributeList | List of optional attributes that can be configured |
AggregateOptions
Message definition for aggregate interface specific options. This message is valid only for aggregate interfaces and not valid for normal interfaces
Field | Type | Description |
---|---|---|
aggregate_members | string | List of member interfaces for this aggregate interface config |
StringAttribute
This message defines the format for passing a string attribute for the different interface objects.
Field | Type | Description |
---|---|---|
key | string | Key for the string attribute |
value | string | Value for the attribute |
Enum(s)
StatusCode
This enum defines the different status codes that could be returned from the backend service processing the API
Value | Description |
---|---|
SUCCESS_COMPLETED | Operation Completed Succesfully |
OBJECT_NOT_FOUND | Specified interface object is not found |
PORT_NAME_NOT_SPECIFIED | Port name is not specified for the object |
UNIT_NOT_SPECIFIED | unit number is not specified for the object |
FAMILY_NOT_SPECIFIED | Family is not specified for the object |
IP_ADDR_NOT_SPECIFIED | IP Address is not specified for the object |
ARP_ADDR_NOT_SPECIFIED | ARP/NDP Address is not specified for the object |
ARP_MAC_NOT_SPECIFIED | ARP/NDP MAC Address is not specified for the object |
INTERFACE_OBJECT_MISMATCH | This happens when the interface type specified at the message level is different from the actual object information that is sent as part of the message, Eg: Specifying "Interface Unit" at message level and sending an "Interface Address" object in the message. |
StatusCode
This enum defines the different status codes that could be returned from the backend service processing the API
Value | Description |
---|---|
SUCCESS_COMPLETED | Operation Completed Succesfully |
NOT_OWNER_OF_OBJECT | Interface is already configured by another client. |
PORT_NAME_NOT_SPECIFIED | Port name is not specified for the object |
UNIT_NOT_SPECIFIED | unit number is not specified for the object |
FAMILY_NOT_SPECIFIED | Family is not specified for the object |
IP_ADDR_NOT_SPECIFIED | IP Address is not specified for the object |
ARP_ADDR_NOT_SPECIFIED | ARP/NDP Address is not specified for the object |
ARP_MAC_NOT_SPECIFIED | ARP/NDP MAC Address is not specified for the object |
INTERFACE_OBJECT_MISMATCH | This happens when the interface type specified at the message level is different from the actual object information that is sent as part of the message, Eg: Specifying "Interface Unit" at message level and sending an "Interface Address" object in the message. |
StatusCode
This enum defines the different status codes that could be returned from the backend service processing the API
Value | Description |
---|---|
SUCCESS_COMPLETED | Operation Completed Succesfully |
NOT_OWNER_OF_OBJECT | Interface is already configured by another client. |
PORT_NAME_NOT_SPECIFIED | Port name is not specified for the object |
UNIT_NOT_SPECIFIED | unit number is not specified for the object |
FAMILY_NOT_SPECIFIED | Family is not specified for the object |
IP_ADDR_NOT_SPECIFIED | IP Address is not specified for the object |
ARP_ADDR_NOT_SPECIFIED | ARP/NDP Address is not specified for the object |
ARP_MAC_NOT_SPECIFIED | ARP/NDP MAC Address is not specified for the object |
INTERFACE_OBJECT_MISMATCH | This happens when the interface type specified at the message level is different from the actual object information that is sent as part of the message, Eg: Specifying "Interface Unit" at message level and sending an "Interface Address" object in the message. |
StatusCode
This enum defines the different status codes that could be returned from the backend service processing the API
Value | Description |
---|---|
SUCCESS_COMPLETED | Operation Completed Succesfully |
NOT_OWNER_OF_OBJECT | Interface is already configured by another client. |
PORT_NAME_NOT_SPECIFIED | Port name is not specified for the object |
UNIT_NOT_SPECIFIED | unit number is not specified for the object |
FAMILY_NOT_SPECIFIED | Family is not specified for the object |
IP_ADDR_NOT_SPECIFIED | IP Address is not specified for the object |
ARP_ADDR_NOT_SPECIFIED | ARP/NDP Address is not specified for the object |
ARP_MAC_NOT_SPECIFIED | ARP/NDP MAC Address is not specified for the object |
INTERFACE_OBJECT_MISMATCH | This happens when the interface type specified at the message level is different from the actual object information that is sent as part of the message, Eg: Specifying "Interface Unit" at message level and sending an "Interface Address" object in the message. |
OBJECT_NOT_FOUND | Specified interface object is not found |
StatusCode
This enum defines the different status codes that could be returned from the backend service processing the API
Value | Description |
---|---|
SUCCESS_COMPLETED | Completed Succesfully |
OBJECT_NOT_FOUND | Requested object is NOT configured. |
PORT_NAME_NOT_SPECIFIED | Port name is not specified for the object |
UNIT_NOT_SPECIFIED | unit number is not specified for the object |
InterfaceType
Enumeration definitions for the different interface object types that could be used in the APIs. When the RPC message is sent by client for different interface objects, the object type should be mentioned in the message so that the server could handle the message appropriately based on the interface object type.
Value | Description |
---|---|
TYPE_INTERFACE_OBJECT | Definition for top level interface object |
TYPE_INTERFACE_UNIT_OBJECT | Definition for interface unit object |
TYPE_INTERFACE_FAMILY_OBJECT | Definition for interface family object |
TYPE_INTERFACE_ADDRESS_OBJECT | Definition for interface IP address object |
TYPE_INTERFACE_ARP_OBJECT | Definition for interface ARP/NDP object |