Web Services API Guide, Cisco DCNM for LAN, Release 5.x
LstApp Service
Downloads: This chapterpdf (PDF - 113.0KB) The complete bookPDF (PDF - 11.08MB) | Feedback

LstApp Service

Table Of Contents

LstApp Service

Information About LstApp Service

bindLsgToSwitchedNetworkInterfaces

createLinkStateGroups

deleteAllLinkStateGroups

deleteLinkStateGroups

disableLst

enableLst

getDownstreamInterfacesForNetworkElement

getLinkStateGroupGlobalSetting

getLinkStateGroups

getLinkStateGroupsInNetworkElement

getLinkStateGroupsWithLsgToSniAssociations

getLsgToSniAssociationsInLinkStateGroups

getLsgToSniAssociationsInNetworkElement

getLstStateOfNetworkElements

getUpstreamInterfacesForNetworkElement

unbindLsgFromSwitchedNetworkInterfaces


LstApp Service


This chapter describes the DCNM web services API methods for the LstApp service. This API is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 5.0(3) or later.

Information About LstApp Service

Link State Tracking (LST) feature is used with the server adapter NIC teaming. The LST binds a set of downstream ports with upstream ports and the downstream ports automatically based on the upstream link state. This association is referred as Link State Group (LSG). The LST tracks the status of each group and performs specific actions. APIs are defined with the following categories:

Query or Get APIs—Query data from the persisted database.

Modify APIs—Modify existing LST Group Settings or to create the LSG to Switched Network Interface associations.

Remove APIs—Disassociate LST Group Setting from one or more interfaces in the device or to delete the LST Groups.

bindLsgToSwitchedNetworkInterfaces

Assigns an LinkStateGroup (LSG) to one or more network interfaces in a specified direction. Unbinds the already existing associations if any for the interface and then assigns the network interface to the specified LSG in the specified direction.

ParameterException is thrown if any of the following situation occurs:

If lsgInstanceNameId is null or it is empty.

If lsgInstanceNameId is not a valid LinkStateGroup.

If the networkInterfaceInstanceNameIdCol collection is null or the collection is empty.

If the networkInterfaceInstanceNameIdCol collection contains any null element, or the collection contains an invalid InstanceNameId of a NetworkInterface.

If the direction is null.

ValidationException is thrown if any of the following situation occurs:

If the networkInterfaceInstanceNameIdCol collection contains an InstanceNameId of a NetworkInterface which is a port-channel interface to be associated as DOWNSTREAM port to the LinkStateGroup

Parameters

opContext—operational context. operational context.

networkInterfaceInstanceNameIdCol—a collection that contains one or more InstanceNameId of NetworkInterface object.

lsgInstanceNameId—InstanceNameId of a LinkStateGroup object.

direction—direction of the network interface, on which the LSG needs to be applied. Direction can be either upstream or downstream.

Returns

A list of newly created LinkStateGroupAppliesToSwitchedNetworkInterface objects.

createLinkStateGroups

Creates one or more Link State Group objects (LSG) in a network element. Given the InstanceNameId of a network element and a list of LSG objects, creates the objects in the server and returns it's instance name IDs.

ValidationException is thrown if any of the following situation occurs:

If neInstanceNameId is null.

If neInstanceNameId is not a valid network element InstanceNameId.

If the linkStateGroupCol is null or the collection is empty.

IntegrityException is thrown if any of the following situation occurs:

If the linkStateGroupCol contains a LinkStateGroup that already exist in the database.

This API will not consider the interface association. If a LSG is passed with the interface association, that will not be considered by this API. User needs to call separate API to bind the LSG to an interface.

Parameters

opContext—operational context.

neInstanceNameId—InstanceNameId of a network element.

linkStateGroupCol—a collection (one or more) of LSG objects that needs to be created.

Returns

Instance name IDs of the newly created LSG objects.

deleteAllLinkStateGroups

Deletes one or more Link State Group (LSG) objects. Given the InstanceNameId of the NetworkElement objects, those objects will be deleted from the server.

ParameterException is thrown if any of the following situation occurs:

If neInstanceNameIdCol collection is null or it is empty.

If neInstanceNameIdCol collection contains an element that is not of type NetworkElement InstanceNameId.

If neInstanceNameIdCol collection contains a NetworkElement that does not exist in the database.

Parameters

opContext—operational context. operational context.

neInstanceNameIdCol—a collection that contains InstanceNameId of one or more NetworkElement objects that needs to be deleted.

deleteLinkStateGroups

Deletes one or more Link State Group (LSG) objects. Given the InstanceNameId of the LinkStateGoup objects, those objects will be deleted from the server.

ParameterException is thrown if any of the following situation occurs:

If linkStateGoupInstanceNameIdCol collection is null or it is empty.

If linkStateGoupInstanceNameIdCol collection contains an element that is not of type LinkStateGoup InstanceNameId.

If linkStateGoupInstanceNameIdCol collection contains a LinkStateGoup that does not exist in the database.

Parameters

opContext—operational context. operational context.

linkStateGoupInstanceNameIdCol—a collection that contains InstanceNameId of one or more LinkStateGoup objects that needs to be deleted.

disableLst

Disables LST on one or more network element.

ValidationException is thrown if any of the following situation occurs:

If the neInstanceNameIdCol is null.

If the neInstanceNameIdCol contains one or more null element, or the collection is empty or it is not type InstanceNameId.

Parameters

opContext—operational Context.

neInstanceNameIdCol—list of InstanceNameId of the Network Element for which LST should be disabled.

enableLst

Enables LST on one or more network elements. Given the instance name ID of one or more network elements, LST will be enabled on those elements.

ValidationException is thrown if any of the following situation occurs:

If the neInstanceNameIdCol is null.

If the neInstanceNameIdCol contains one or more null element, or the collection is empty or it is not type InstanceNameId.

Parameters

opContext—operational context.

neInstanceNameIdCol—list of InstanceNameId of the Network Element for which LST should be enabled.

getDownstreamInterfacesForNetworkElement

Returns all SwitchedNetworkInterface objects in a network element that can be associated in DOWNSTREAM direction to a LinkStateGroup(LSG). Given the InstanceNameId of one or more network elements, returns a collection of collection of SNI objects.

InstanceException is thrown if the argument passed neInstanceNameIdCol is null or it is empty or if the element in the collection is not a valid network element InstanceNameId.

Parameters

opContext—operational context. operational context.

neInstanceNameIdCol—collection of InstanceNameId of network elements.

Returns

List of list of SwitchedNetworkInterface, In the returned list of objects, only the following associations will be present, and all other associations will be cleared.

Network interface name association.

getLinkStateGroupGlobalSetting

Returns the device level LST settings for one or more network elements. Given the instance name ID of one or more network elements, returns the corresponding global LST settings object for those network elements.

ValidationException is thrown if any of the following situation occurs:

If neInstanceNameIdCol collection contains an element that is null or the collection is empty or it is not type InstanceNameId.

Parameters

opContext—operational Context

neInstanceNameIdCol—list of InstanceNameId of the Network Element for which the LST settings are required

Returns

The LST settings configured globally in the given network element. The returned list will contain the list of LinkStateGroupGlobalSetting instances.

getLinkStateGroups

Returns LinkStateGroup objects from it's InstanceNameIds. Given a collection of InstanceNameId of LinkStateGroup, returns corresponding LinkStateGroup objects.

ValidationException is thrown if any of the following situation occurs:

If linkStateGroupInstanceNameIdCol is null or it is empty.

If linkStateGroupInstanceNameIdCol contains invalid InstanceNameId of a LinkStateGroup.

If linkStateGroupInstanceNameIdCol contains a null value.

If there is no equivalent LinkStateGroup object with the given InstanceNameId in the linkStateGroupInstanceNameIdCol.

Parameters

opContext—operational context.

linkStateGroupInstanceNameIdCol—a collection of InstanceNameId of LinkStateGroup.

Returns

List of LinkStateGroup objects corresponding to given collection of InstanceNameId. In the returned list of LinkStateGroup objects,other associations will be cleared.

getLinkStateGroupsInNetworkElement

Returns all Link State Groups (LSGs) configured in a network element. Given the InstanceNameId of one or more network elements, returns a collection of collection of LSG objects.

InstanceException is thrown if the argument passed neInstanceNameIdCol is null or it is empty or if the element in the collection is not a valid network element InstanceNameId.

Parameters

opContext—operational context. operational context.

neInstanceNameIdCol—a collection of InstanceNameId network elements.

Returns

List of list of LinkStateGroup, in the returned list of objects, for each of the LinkStateGroup, only the following associations will be present and all other associations will be cleared.

All associations of the returned LSG object will be cleared.

Returned linkStateGroups will be ordered by the lsgId of the LSG.

getLinkStateGroupsWithLsgToSniAssociations

Returns the Link State Group objects with LinkStateGroupAppliesToSwitchedNetworkInterface associations populated.

ValidationException is thrown if any of the following situation occurs:

If lsgInstanceNameIdCol is null or it is empty.

If lsgInstanceNameIdCol contains invalid LinkStateGroup InstanceNameId or null value.

If there is no equivalent LinkStateGroup object with the given InstanceNameId in the lsgInstanceNameIdCol.

Parameters

opContext—Current Operational context.

lsgInstanceNameIdCol—A List of InstanceNameId objects of LinkStateGroup objects for which the LinkStateGroupAppliesToSwitchedNetworkInterface associations are required.

Returns

Returns a List of LinkStateGroup and objects populated with LinkStateGroupAppliesToSwitchedNetworkInterface associations.

Following association will be populated for each LSG:

LinkStateGroupAppliesToSwitchedNetworkInterface.

getLsgToSniAssociationsInLinkStateGroups

Returns a collection of LinkStateGroupAppliesToSwitchedNetworkInterfaces present in the given list of Link State Group (LSG)s. Given a list of InstanceNameId of the LSGs, returns a collection of LinkStateGroupAppliesToSwitchedNetworkInterface objects.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid LSG InstanceNameId.

If a valid non-exixting LSG InstanceNameId is passed.

Parameters

opContext—Operational context.

neInstanceNameIdCol—list of InstanceNameId of the Link State Group.

Returns

List of List of LinkStateGroupAppliesToSwitchedNetworkInterface objects corresponding to LinkStateGroup.

In the LSG object all the associations will be cleared, except LinkStateGroupAppliesToSwitchedNetworkInterface association.

NetworkInterface object. In the NetworkInterface object all the associations will be cleared, except LinkStateGroupAppliesToSwitchedNetworkInterface association.

getLsgToSniAssociationsInNetworkElement

Returns all Link State Group (LSG) to network interface associations configured in a network element. Given the instance name ID of one or more network elements , returns a collection of collection of LSG to network interface association objects.

ValidationException is thrown if the argument passed is null or it is empty or if the element in the collection is not a valid InstanceNameId of an AbstractNetworkElement.

Parameters

opContext—operational context.

neInstanceNameIdCol—collection of InstanceNameId of network elements.

Returns

List of list of LinkStateGroupAppliesToSwitchedNetworkInterface objects, that represents the association between and NetworkInterface. In the returned list of objects, only the following associations will be present, and all other associations will be cleared.

LinkStateGroup object. In the LSG object all the associations will be cleared, except linkStateGroupAppliesToSwitchedNetworkInterfaceCol association.

NetworkInterface object. In the NetworkInterface object all the associations will be cleared, except linkStateGroupAppliesToSwitchedNetworkInterfaceCol association.

getLstStateOfNetworkElements

Returns state of LST whether LST is enabled or disabled in a list of network elements. Given the list of instance name IDs of the network elements, returns the list of Boolean values.

ValidationException is thrown if any of the following situation occurs:

If neInstanceNameIdCol collection contains an element that is null or the collection is empty or it is not type InstanceNameId.

If the argument passed is null or it is not a valid network element InstanceNameId.

Parameters

opContext—operational Context

neInstanceNameIdCol—InstanceNameId of the one or more Network Element for which the LST state is required

Returns

The returned list will contain Boolean instances.

Boolean value TRUE represents LST is enabled in the given network element.

Boolean value FALSE represents LST is disabled in the given network element.

getUpstreamInterfacesForNetworkElement

Returns all SwitchedNetworkInterface objects in a network element that can be associated in UPSTREAM direction to a LinkStateGroup(LSG). Given the InstanceNameId of one or more network elements, returns a collection of collection of SNI objects.

InstanceException is thrown if the argument passed neInstanceNameIdCol is null or it is empty or if the element in the collection is not a valid network element InstanceNameId.

Parameters

opContext—operational context. operational context.

neInstanceNameIdCol—collection of InstanceNameId of network elements.

Returns

list of list of SwitchedNetworkInterface, In the returned list of objects, only the following associations will be present, and all other associations will be cleared.

Network interface name association.

unbindLsgFromSwitchedNetworkInterfaces

Clears the Link State Group(LSG) association from a network interface.

ParameterException is thrown if any of the following situation occurs:

If networkInterfaceInstanceNameId is null or it is not a valid InstanceNameId of a SwitchedNetworkInterface object.

If lsgInstanceNameId is null or it is empty.

If lsgInstanceNameId is not a valid LinkStateGroup.

Parameters

opContext—operational context.

networkInterfaceInstanceNameId—InstanceNameId of a NetworkInterface object from which LSG needs to be removed.

lsgInstanceNameId—InstanceNameId of a LinkStateGroup object

Returns

void