Cisco DCNM Web Services API Guide, Release 4.2
VpcApp Service
Downloads: This chapterpdf (PDF - 153.0KB) The complete bookPDF (PDF - 7.93MB) | Feedback

VpcApp Service

Table Of Contents

VpcApp Service

Information About VpcApp Service

createVpc

createVpcDomains

createVpcDomainsForIds

createVpcForSpecifiedEndPoints

deleteVpcDomains

deleteVpcs

deleteVpcsForVpcIds

disableVpc

disableVpcForPortChannels

disableVpcPeerLinkForPortChannels

enableVpc

enableVpcPeerLinkForPortChannels

getAllVpcs

getMultiChassisPortChannelsInNetworkElements

getVpcDomainsInNetworkElements

getVpcIdsInNetworkElements

getVpcPeerLinkEndPoints

getVpcStateOfNetworkElements

getVpcs

getVpcsForIds

getVpcsInNetworkElements

modifyVpcDomains

modifyVpcIdForPortChannel

modifyVpcs

synchronizeGlobalSettingsForPrimaryAndSecondary

synchronizePrimaryAndSecondary


VpcApp Service


This chapter describes the DCNM web services' API methods for the VpcApp service.

Information About VpcApp Service

A virtual port channel (vPC) enables links that are physically connected to two different devices (VDCs) to be viewed as a single logical port channel by the third device that forms the port channel with the vPC devices. You can set up a vPC between Layer 2 port channels.

The vPC is the port channel extended across two different chassis. With a vPC, an access layer switch could have the links of the same port channel terminating in two different distribution layer devices.

The vPC peer-link is a special inter switch link (ISL) that connects two Nexus 7000 series chassis. This link transfers control and data traffic across the chassis. The operational and configuration parameters of each chassis are exchanged on this link. The link is typically a port channel because the peer-link needs to be redundant and have enough bandwidth to transfer data traffic.

APIs are grouped as the following categories:

1. Query and Get APIs—Used to query data from the persisted database.

2. Create API—Used to create new vPCs.

3. Modify API—Used to modify vPCs, and vPC device-level configurations.

4. Delete APIs—Used to delete existing vPCs.

5. Enable and Disable APIs—Used to enable or disable a peer-link on port channel interfaces.

6. Synchronize APIs—Used to synchronize a primary vPC device with a secondary vPC device.

createVpc

Creates the given new Vpc and returns the instance name id of newly created Vpc.

The passed Vpc object should have Vpc etherchannel network interface endpoints and its neighbor end points and peer-link etherchannel network interface endpoints populated.

ValidationException is thrown if any of the following situation occurs:

If newVpc is null.

PropertiesException is thrown if any of the following situation occurs:

If Vpc number is not valid.

IntegrityException is thrown if any of the following situation occurs:

If the Vpc with the given Vpc number already exist in the database.

Parameters

opContext—Operational context

vpc—new vpc to be added

Return Value

The InstanceNameId of the new Vpc

createVpcDomains

Creates Vpc Domain for the given list of domain Ids and returns the list of Vpc Domain instancename Id's.

The size of device instancenameid list and domain id list should be the same.

ParameterException is thrown if any of the following situation occurs:

If Vpc Domain Ids collection size not equals to Device Ids collection.

FeatureException is thrown if any of the following situation occurs:

If Vpc Domain already configured.

Parameters

opContext—Operational context

vpcDomainIds—List of Vpc domain objects to be created

neInstanceNameIds—List of Device Ids for which Vpc Domain to be created

Return Value

void

createVpcDomainsForIds

Creates Vpc Domain for the given list of domain Ids and returns the list of Vpc Domain instancename Id's.

The size of device instancenameid list and domain id list should be the same.

ParameterException is thrown if any of the following situations occurs:

If Vpc Domain Ids collection size not equals to Device Ids collection.

FeatureException is thrown if any of the following situations occurs:

If Vpc Domain already configured.

Parameters

opContext—Operational context

vpcDomainIds—List of Vpc domain objects to be created

neInstanceNameIds—List of Device Ids for which Vpc Domain to be created

Return Value

void

createVpcForSpecifiedEndPoints

Creates a Vpc between two Vpc end points with two peer-link end points.

ValidationException is thrown if any of the following situation occurs:

If vpcNumber is null.

If the vpcEndPoints is not a valid network interface InstanceNameId.

If the peer-linkEndPoints contains one or more null element, or empty

PropertiesException is thrown if any of the following situation occurs:

If vpcNumber is not valid Vpc number.

If vpcEndPoints does not contain valid etherchannel InstanceNameIds.

If peer-linkEndPoints does not contain valid etherchannel InstanceNameIds.

IntegrityException is thrown if any of the following situation occurs:

If the Vpc with the given Vpc number already exist in the database.

If the vpcEndPoints collection contains a NetworkInterface InstanceNameId that does not exist in the database.

If a NetworkInterface in the peer-linkEndPoints contains duplicate NetworkInterface objects.

Parameters

opContext—Operational context

vpcNumber—Vpc number to be used for the Vpc

vpcEndPoints—List of InstanceNameId of Vpc endpoint

peer—-linkEndPoints the List of InstanceNameId of peer-link endpoint

Return Value

The InstanceNameId of the new Vpc

deleteVpcDomains

Deletes Vpc Domains for the list of instancename id's passed only if Vpc configuration does not exist

FeatureException is thrown if any of the following situation occurs:

If vpcDomain has Vpc configuration

Parameters

opContext—Operational context

vpcDomainInstanceNameIds—array of InstanceNameId of Vpc Domain

Return Value

void

deleteVpcs

Deletes all the given Vpc instances.

This method deletes all the given instances of VpcEndPoint

ValidationException is thrown if any of the following situation occurs:

If vpcInstanceNameIds collection is null or it is empty.

If vpcInstanceNameIds collection contains an element that is not of type VpcEndPoint InstanceNameId.

IntegrityException is thrown if the given vPCs do not exist in device.

Parameters

opContext—Operational context

vpcInstanceNameIds—array of InstanceNameId of Vpc

Return Value

void

deleteVpcsForVpcIds

Deletes the vPCs for the given vpcIds in the given network element.

This method removes given Vpc ids and Vpc association from corresponding SwitchedEtherChannelNetworkItnerface instance in the given network element.

If the given vpcIds is null, then removes all Vpc ids in the given network element

ValidationException is thrown if any of the following situation occurs:

If neIntanceNameId is null.

If neIntanceNameId is not a valid Network Element InstanceNameId.

If vpcIds is null.

Parameters

opContext—Operational context

InstanceNameId—InstanceNameId of NetworkElement

vpcIds—IntegerRange of vpcIds

Return Value

void

disableVpc

Disables vPC service on one or more network element. This API is applicable only for devices running DC-OS.

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 the vPC should be disabled

Return Value

void

disableVpcForPortChannels

Deletes the vPCs for the given port channels.

This method removes vpcids and Vpc association from the given SwitchedEtherChannelNetworkInterface InstanceNameIds.

ValidationException is thrown if any of the following situation occurs:

If portChannelInstanceNameIds collection is null or it is empty.

If portChannelInstanceNameIds collection contains an element that is not of type SwitchedEtherChannelNetworkInterface InstanceNameId.

IntegrityException is thrown if the given portchannels do not exist in device.

Parameters

opContext—Operational context

portChannelInstanceNameIds—array of InstanceNameId of SwitchedEtherChannelNetworkInterface

Return Value

void

disableVpcPeerLinkForPortChannels

Disables Peer-link for the given port channels

This method disables peer-link for the given SwitchedEtherChannelNetworkInterface InstanceNameIds.

ValidationException is thrown if any of the following situation occurs:

If portChannelInstanceNameIds collection is null or it is empty.

If portChannelInstanceNameIds collection contains an element that is not of type SwitchedEtherChannelNetworkInterface InstanceNameId.

IntegrityException is thrown if the given portchannels do not exist in device.

Parameters

opContext—Operational context

portChannelInstanceNameIds—array of InstanceNameId of SwitchedEtherChannelNetworkInterface

Return Value

void

enableVpc

Enables vPC service on one or more network element. This API is applicable only for devices running DC-OS.

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 the vPC should be enabled

Return Value

void

enableVpcPeerLinkForPortChannels

Enables Peer-link for the given port channels

This method enables peer-link for the given port channel InstanceNameIds and removes peer-link from existing port channel if it exists.

ValidationException is thrown if any of the following situation occurs:

If portChannelInstanceNameIds collection is null or it is empty.

If portChannelInstanceNameIds collection contains an element that is not of type SwitchedEtherChannelNetworkInterface InstanceNameId.

IntegrityException is thrown if the given portchannels do not exist in device.

Parameters

opContext—Operational context

portChannelInstanceNameIds—array of InstanceNameId of SwitchedEtherChannelNetworkInterface

Return Value

void

getAllVpcs

Returns all the vPCs in the network.

For Each Vpc Id in the network, either Vpc Vpc or VpcEndPoint VpcEndPoint will be returned. Vpc is a network level instance for a Vpc Id(same) in two different devices, If there is no network level Vpc instance exist for a Vpc Id, then device level instance VpcEndPoint will be returned for that Vpc Id, If it exists, only Vpc instance will be returned instead of two VpcEndPoints. The vPCs returned by this method will have two Vpc end points, Each VpcEndPoint will be populated with corresponding Vpc port channel interface and peer-link port channel interface with their neighbor port channel interfaces.

Parameters

opContext—Operational context

Return Value

All the vPCs in network. The returned list will contain the list of VpcEndPoint instances and Vpc instances if it exists.

Following associations will be there for a Vpc: (other associations will be cleared)

1. Two Vpc end pointsVpcEndPoint of a Vpc

2. Each Vpc end point will have its Vpc port channel interface its neighbor port channel interfaces ( SwitchedEtherChannelNetworkInterface)

3. Each Vpc end point will have its peer-link port channel interface with its neighbor port channel interface ( SwitchedEtherChannelNetworkInterface)

4. Each Vpc end point will be populated with Vpc end point status

5. Each port channel interface will be populated with member ports

6. Each port channel interface will be populated with peer-link status

Following associations will be there for a VpcEndPoint: (other associations will be cleared)

1. Vpc end point will have its Vpc port channel interface its neighbor port channel interfaces ( SwitchedEtherChannelNetworkInterface)

2. Each Vpc end point will have its peer-link port channel interface with its neighbor port channel interface ( SwitchedEtherChannelNetworkInterface)

3. Each Vpc end point will be populated with Vpc end point status

4. Each port channel interface will be populated with member ports

5. Each port channel interface will be populated with peer-link status

getMultiChassisPortChannelsInNetworkElements

Returns multichassis vpc end points(port channel interface)for the given network elements.

Parameters

opContext—Operational context

neInstanceNameIds—List of InstanceNameId of the network element for which the multichassis end points are required

Multichassis end points will be populated with its neighbor endpoint (SwitchedEtherChannelNetworkInterface)

Return Value

The list of multichassis end points in the given network elements.

getVpcDomainsInNetworkElements

Returns the Vpc domain of the given network elements.

The Vpc domain objects will be ordered in the returned List based on the order of given network element instance ids.

ValidationException is thrown if the argument passed is null or it is not a valid network element InstanceNameIds.

Parameters

opContext—Operational context

neInstanceNameIds—InstanceNameId of the network element instances whose Vpc domain information is required

Return Value

Ordered list of Vpc domain of the given network elements.

Following associations will be there for each VpcDomain: (other associations will be cleared)

1. VpcDomainSetting

2. VpcPeerKeepAliveStatus

3. VpcRoleStatus

getVpcIdsInNetworkElements

Returns all the Vpc ids in the given network element.

The Vpc ids ranges will be ordered in the returned List based on the order of given network element instance ids.

Parameters

opContext—Operational context

neInstanceNameIds—List of InstanceNameId of the network element for which the Vpc ids are required

Return Value

All the Vpc ids as List of IntegerRange in the given network elements.

getVpcPeerLinkEndPoints

Returns peer-link end points for the given network elements.

Parameters

opContext—Operational context

neInstanceNameIds—List of InstanceNameId of the network element for which the peer-link end points are required

Peer-link end points will be populated with its neighbor endpoint (SwitchedEtherChannelNetworkInterface)

Each end point will be populated with member port and its link associations

Return Value

The peer-link end points in the given network elements.

getVpcStateOfNetworkElements

Returns state of vPC service whether vPC 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 AAA state is required

Return Value

The returned list will contain Boolean instances.

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

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

getVpcs

Returns the VpcEndPoint instances for the given Vpc end point InstanceNameIds.

If the given instance name id belongs to a Vpc,then the vPCs returned by this method will have two Vpc end points, Each VpcEndPoint will be populated with corresponding Vpc port channel interface and peer-link port channel interface with their neighbor port channel interfaces.

If the given instance name id belongs to a VpcEndPoint,then the VpcEndPoints returned by this method will be populated with corresponding Vpc port channel interface and peer-link port channel interface with their neighbor port channel interfaces.

Parameters

opContext—Operational context

vpcEndPointInstanceNameIds—InstanceNameId of the VpcEndPoint for which the Vpc or VpcEndPoint instances are required

Return Value

The vPCs or VpcEndPoints for the given VpcEndPoint InstanceNameIds. The returned list will contain the list of VpcEndPoint instances.

Following associations will be there for a Vpc: (other associations will be cleared)

1. Two Vpc end pointsVpcEndPoint of a Vpc

2. Each Vpc end point will have its Vpc port channel interface its neighbor port channel interfaces ( SwitchedEtherChannelNetworkInterface)

3. Each Vpc end point will have its peer-link port channel interface with its neighbor port channel interface ( SwitchedEtherChannelNetworkInterface)

4. Each Vpc end point will be populated with Vpc end point status

5. Each port channel interface will be populated with member ports

6. Each port channel interface will be populated with peer-link status

Following associations will be there for a VpcEndPoint: (other associations will be cleared)

1. Vpc end point will have its Vpc port channel interface its neighbor port channel interfaces ( SwitchedEtherChannelNetworkInterface)

2. Each Vpc end point will have its peer-link port channel interface with its neighbor port channel interface ( SwitchedEtherChannelNetworkInterface)

3. Each Vpc end point will be populated with Vpc end point status

4. Each port channel interface will be populated with member ports

5. Each port channel interface will be populated with peer-link status

getVpcsForIds

Returns the Vpc or VpcEndPoint instances for the given Vpc Ids.

For the given Vpc Id, either Vpc Vpc or VpcEndPoint VpcEndPoint will be returned. Vpc is a network level instance for a Vpc Id(same) in two different devices, If there is no network level Vpc instance exist for a Vpc Id, then device level instance VpcEndPoint will be returned for that Vpc Id, If it exists, only Vpc instance will be returned instead of two VpcEndPoints. The vPCs returned by this method will have two Vpc end points, Each VpcEndPoint will be populated with corresponding Vpc port channel interface and peer-link port channel interface with their neighbor port channel interfaces.

Parameters

opContext—Operational context

vpcIds—Vpc id for which the vPCs instances are required

Return Value

The vPCs or VpcEndPoints for the given Vpc Ids InstanceNameIds. The returned list will contain the list of VpcEndPoint instances.

Following associations will be there for a Vpc: (other associations will be cleared)

1. Two Vpc end pointsVpcEndPoint of a Vpc

2. Each Vpc end point will have its Vpc port channel interface its neighbor port channel interfaces ( SwitchedEtherChannelNetworkInterface)

3. Each Vpc end point will have its peer-link port channel interface with its neighbor port channel interface ( SwitchedEtherChannelNetworkInterface)

4. Each Vpc end point will be populated with Vpc end point status

5. Each port channel interface will be populated with member ports

6. Each port channel interface will be populated with peer-link status

Following associations will be there for a VpcEndPoint: (other associations will be cleared)

1. Vpc end point will have its Vpc port channel interface its neighbor port channel interfaces ( SwitchedEtherChannelNetworkInterface)

2. Each Vpc end point will have its peer-link port channel interface with its neighbor port channel interface ( SwitchedEtherChannelNetworkInterface)

3. Each Vpc end point will be populated with Vpc end point status

4. Each port channel interface will be populated with member ports

5. Each port channel interface will be populated with peer-link status

getVpcsInNetworkElements

Returns all the vPCs in the given network elements.

For Each Vpc Id in the given network elements, either Vpc Vpc or VpcEndPoint VpcEndPoint will be returned. Vpc is a network level instance for a Vpc Id(same) in two different devices, If there is no network level Vpc instance exist for a Vpc Id, then device level instance VpcEndPoint will be returned for that Vpc Id, If it exists, only Vpc instance will be returned instead of two VpcEndPoints. The vPCs returned by this method will have two Vpc end points, Each VpcEndPoint will be populated with corresponding Vpc port channel interface and peer-link port channel interface with their neighbor port channel interfaces.

Parameters

opContext—Operational context

neInstanceNameId—InstanceNameId of the network element for which the vPCs are required

Return Value

All the vPCs in given network elements. The returned list will contain the list of VpcEndPoint instances and Vpc instances if it exists.

Following associations will be there for a Vpc: (other associations will be cleared)

1. Two Vpc end pointsVpcEndPoint of a Vpc

2. Each Vpc end point will have its Vpc port channel interface its neighbor port channel interfaces ( SwitchedEtherChannelNetworkInterface)

3. Each Vpc end point will have its peer-link port channel interface with its neighbor port channel interface ( SwitchedEtherChannelNetworkInterface)

4. Each Vpc end point will be populated with Vpc end point status

5. Each port channel interface will be populated with member ports

6. Each port channel interface will be populated with peer-link status

Following associations will be there for a VpcEndPoint: (other associations will be cleared)

1. Vpc end point will have its Vpc port channel interface its neighbor port channel interfaces ( SwitchedEtherChannelNetworkInterface)

2. Each Vpc end point will have its peer-link port channel interface with its neighbor port channel interface ( SwitchedEtherChannelNetworkInterface)

3. Each Vpc end point will be populated with Vpc end point status

4. Each port channel interface will be populated with member ports

5. Each port channel interface will be populated with peer-link status

modifyVpcDomains

Modifies any configuration changes for the given the List Vpc domain.

This method updates Vpc global settings.

ValidationException is thrown if any of the following situation occurs:

if the argument passed is null or empty

FeatureException is thrown if any of the following situation occurs:

if destination Ip address isnull

Parameters

opContext—Operational context

vpcDomains—List of Vpc domain objects to be set

Return Value

void

modifyVpcIdForPortChannel

Modifes the Vpc ids for the given port channels.

This method updates the vpcId with the given newVpcId and associate corresponding Vpc with the given SwitchedEtherChannelNetworkInterface InstanceNameId.

ValidationException is thrown if any of the following situation occurs:

If portChannelInstanceNameId is null.

If portChannelInstanceNameId is not of type SwitchedEtherChannelNetworkInterface InstanceNameId.

IntegrityException is thrown if the given portchannels do not exist in device.

Parameters

opContext—Operational context

portChannelInstanceNameId—InstanceNameId of SwitchedEtherChannelNetworkInterface

newVpcId—VpcId should be updated in the given port channel interface

Return Value

void

modifyVpcs

Modifies any association changes on Vpc.

This method updates the server for any association changes in Vpc end points and Peer-link end points

ValidationException is thrown if any of the following situation occurs:

If the vPCs is null or empty.

If the vPCs contains one or more null element, or the collection contains objects that are not of type VpcEndPoint.

IntegrityException is thrown if any of the following situation occurs:

If the given Vpc does not exist in device.

Parameters

opContext—Operational context

vpcs—List of Modified Vpc

Return Value

void

synchronizeGlobalSettingsForPrimaryAndSecondary

Synchronizes vPC related primary network element global configurations with secondary network element.

This method copies vPC related primary global configurations to secondary.

ValidationException is thrown if any of the following situation occurs:

If primaryNeId is null.

If primaryNeId is not of type AbstractNetworkElement InstanceNameId.

If secondaryNelId is null.

If secondaryNelId is not of type AbstractNetworkElement InstanceNameId.

IntegrityException is thrown if the given Vpc do not exist in device.

Parameters

opContext—Operational context

primaryNeId—InstanceNameId of AbstractNetworkElement

secondaryNelId—InstanceNameId of AbstractNetworkElement

Return Value

void

synchronizePrimaryAndSecondary

Synchronizes vPC related primary network element configurations with secondary network element.

This method copies vPC related primary configurations to secondary.

ValidationException is thrown if any of the following situation occurs:

If primaryNeId is null.

If primaryNeId is not of type AbstractNetworkElement InstanceNameId.

If vpcInstanceNameId is null.

If vpcInstanceNameId is not of type VpcEndPoint InstanceNameId.

IntegrityException is thrown if the given Vpc do not exist in device.

Parameters

opContext—Operational context

primaryNeId—InstanceNameId of AbstractNetworkElement

vpcInstanceNameId—InstanceNameId of VpcEndPoint

Return Value

void