Thrift module: interfaces

ModuleServicesData typesConstants
interfacesInterfacesService
InetFamilyType
InterfaceAddressConfig
InterfaceRetStatus
SERVICE_NAME
SERVICE_VERSION

Constants

ConstantTypeValue
SERVICE_NAMEstring"InterfaceService"
SERVICE_VERSIONstring"1.0.0"

Enumerations

Enumeration: InetFamilyType

Enum for indicating the family types supported. Based on this value, corresponding family will be used in APIs. As of now inet and inet6 families are supported.

INTF_AF_INET2 INET Family

Data structures

Struct: InterfaceRetStatus

KeyFieldTypeDescriptionRequirednessDefault value
1err_codei32Error code
default
2err_strstringError string
default

Return status for Interface API calls. Return code consists of error code and corresponding error string.

Struct: InterfaceAddressConfig

KeyFieldTypeDescriptionRequirednessDefault value
1port_namestringrequired
2ifl_uniti32required
3familyInetFamilyTyperequired
4interface_addressstringrequired

Interface address configuration data structure. Equivalent cli example - set interfaces ge-1/1/6 unit 0 family inet address 10.10.1.1/24 set interfaces ge-1/1/6 unit 0 family inet6 address abcd::1/64

Services

Service: InterfacesService

List of Interface Service APIs supported in JET

Function: InterfacesService.InterfaceAddressCreate

InterfaceRetStatus InterfaceAddressCreate(InterfaceAddressConfig ip_config)
Configure an interface address based on family type passed as input.

Error List:

INVALID_ARGUMENTS - Invalid input arguments
GENERAL_ERROR - General error
EOK - Success


Function: InterfacesService.InterfaceAddressDelete

InterfaceRetStatus InterfaceAddressDelete(InterfaceAddressConfig ip_config)
Delete an interface address based on family type passed as input.

Error List:

INVALID_ARGUMENTS - Invalid input arguments
GENERAL_ERROR - General error
EOK - Success