Table Of Contents
VdcApp Service
Information About VdcApp Service
bindPortsToVdcs
bindVdcsWithResourceTemplate
createResourceTemplates
createVdcs
createVdcsWithResourceTemplate
deleteResourceTemplates
deleteVdcs
getAllVpcIds
getAllVpcsForTopology
getVpcCapabilityOfNetworkElements
getAllVdcsWithChassis
getResourceTemplatesInNetworkElement
getVdcs
getVdcsInChassis
getVdcsInChassises
modifyResourceTemplates
modifyVdcs
unbindVdcsWithResourceTemplate
validateVdcCreation
VdcApp Service
This chapter describes the DCNM web services' API methods for the VdcApp service.
Information About VdcApp Service
A physical device can be configured to look like multiple virtual devices called virtual device contexts (VDCs). A Layer 2, Layer 3, or port channel device interface can be assigned to one and only one VDC. VDCs interact with each other by running protocols on interfaces on which they are interconnected. Each VDC performs all the functions of the physical device. The API categories are as follows:
•
Query/Get APIs—Query data from the persistent database.
•
Modify APIs—Modify existing VDCs and resource templates.
•
Delete APIs—Delete VDCs or resource templates in the device.
bindPortsToVdcs
Binds a list of Ports to the specified VirtualNetworkElement
ValidationException is thrown if any of the following situation occurs:
•
If networkInterfaceInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If vdcInstanceNameId is null or empty or it is not of type InstanceNameId.
•
Only existing VirtualNetworkElement/NetworkInterface (exist in database) can be modified.
Parameters
opContext—Operational context
vdcInstanceNameId—InstanceNameId of VDC to which the corresponding NetworkInterface objects has to be configured.
networkInterfaceInstanceNameIdCol—List of InstanceNameId of NetworkInterface which will be configured to the given VDC.
Return Value
List of modified NetworkInterface objects that are persisted in the database.
bindVdcsWithResourceTemplate
Creates VdcResourceLimit from the specified ResourceTemplate and binds with the given VDCs.
ValidationException is thrown if any of the following situation occurs:
•
If vdcInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If resourceTemplateId is null or empty or it is not of type InstanceNameId.
•
Only existing VirtualNetworkElement (exist in database) can be modified.
Parameters
opContext—Operational context
resourceTemplateId—InstanceNameId of resourceTemplate to be configured along with VDC.
vdcInstanceNameIdCol—List of InstanceNameId of VDCs which will be applied with the given resource template.
Return Value
List of that are persisted with the specified resource limits.The returned collection will contain only the following associations and the rest will be cleared:
•
VdcResourceLimit corresponding to VirtualNetworkElement
•
VirtualNetworkElementStatus corresponding to VirtualNetworkElement
•
NetworkInterface present in the VirtualNetworkElement
•
AbstractNetworkElementStatus present in the VirtualNetworkElement
•
SshServerSetting corresponding to the VirtualNetworkElement
createResourceTemplates
Creates resource templates in the specified device.
ValidationException is thrown if any of the following situation occurs:
•
If neInstanceNameId is null or it is not of type InstanceNameId.
•
If resourceTemplateCol is null or empty or it is not of type ResourceTemplate.
FeatureException is thrown if any of the following situation occurs:
•
if neInstanceNameId is not the InstanceNameId of default VDC.
Parameters
opContext—Operational context
neInstanceNameId—InstanceNameId of default VirtualNetworkElement
resourceTemplateCol—List of new ResourceTemplate Objects.
Return Value
List of InstanceNameIds of ResourceTemplates that are persisted in the database.
createVdcs
Creates a VDC in the specified device.
FeatureException is thrown if any of the following situation occurs:
•
if neInstanceNameId is not the InstanceNameId of default VDC.
ValidationException is thrown if any of the following situation occurs:
•
If neInstanceNameId is null or it is not of type InstanceNameId.
•
If neInstanceNameId is not a valid VirtualNetworkElement InstanceNameId.
Parameters
opContext—Operational context
neInstanceNameId—InstanceNameId of the default VirtualNetworkElement
vdcCol—List of VirtualNetworkElement to be created
Return Value
Collection of VirtualNetworkElement that are going to be persisted in the database.The returned collection will have the following associations and the rest will be cleared:
•
VdcResourceLimit corresponding to VirtualNetworkElement
•
VirtualNetworkElementStatus corresponding to VirtualNetworkElement
•
NetworkInterface present in the VirtualNetworkElement
•
AbstractNetworkElementStatus present in the VirtualNetworkElement
•
SshServerSetting corresponding to the VirtualNetworkElement
createVdcsWithResourceTemplate
Creates VDCs along with the resource limits. Given an InstanceNameId of ResourceTemplate, corresponding VdcResourceLimit will be created along with VDC.
ValidationException is thrown if any of the following situation occurs:
•
If resourceTemplateId is null or it is not of type InstanceNameId.
•
Only existing ResourceTemplates (exist in database) can be used to create resourceLimits.
•
If vdcCol is null or empty or it is not of type VirtualNetworkElement.
Parameters
opContext—Operational context
resourceTemplateId—InstanceNameId of resourceTemplate to be configured along with VDC.
vdcCol—List of VirtualNetworkElement to be created.
Return Value
List of InstanceNameId of VDCs that are persistent in the database.
deleteResourceTemplates
Deletes one or more resource templates configured in the device.
ValidationException is thrown if any of the following situation occurs:
•
If resourceTemplateCol is null or empty or it is not of type InstanceNameId.
•
Only existing ResourceTemplates (exist in database) can be modified.
Parameters
opContext—Operational context
resourceTemplateCol—InstanceNameId of ResourceTemplates that are to be deleted.
Return Value
void
deleteVdcs
Deletes one or more VDCs from the device.
ValidationException is thrown if any of the following situation occurs:
•
If vdcInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
Only existing VirtualNetworkElement(exist in database) can be deleted.
Parameters
opContext—Operational context
vdcInstanceNameIdCol—List of InstanceNameId of VirtualNetworkElement that are to be deleted.
Return Value
void
getAllVpcIds
Returns all the Vpc ids in the network. This method is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 5.1(1) or later.
Parameters
opContext—Operational context
Return Value
List of Vpc IDs in the network.
getAllVpcsForTopology
Returns all the Vpcs in the network. This method is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 5.1(1) or later.
Parameters
opContext—Operational context
Return Value
All the Vpcs in the network. The returned list contains the list Vpc instances.
getVpcCapabilityOfNetworkElements
Returns state of vPC service whether vPC is enabled or disabled along with vPC feature capability information based on the hardware check in a list of network elements. Given the list of instance name IDs of the network elements, returns the list with pair of Boolean values. This method is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 5.1(1) or later.
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 pair of Boolean instances.
•
First boolean value TRUE represents hardware check successful in all the cards.
•
First boolean value FALSE represents hardware check is not successful any one of the cards.
•
Second boolean value TRUE represents vPC is enabled in the given network element.
•
Second boolean value FALSE represents vPC is disabled in the given network element..
getAllVdcsWithChassis
Gets the list of virtual network elements for the list of specified chassis.
Parameters
opContext—Operational context
InstanceNameId—List of chassis ids
Return Value
List of VirtualNetworkElement
getResourceTemplatesInNetworkElement
Returns ResourceTemplates configured in the chassis. Given the instanceNameId of the default VDC. The API returns the collection of resource templates configured in the device.
FeatureException is thrown if any of the following situation occurs:
•
if neInstanceNameId is not the InstanceNameId of default VDC.
ValidationException is thrown if any of the following situation occurs:
•
If neInstanceNameId is null or it is not of type InstanceNameId.
•
If neInstanceNameId is not a valid VirtualNetworkElement neInstanceNameId.
Parameters
opContext—Operational context
neInstanceNameId—InstanceNameId of the default VirtualNetworkElement
Return Value
List of ResourceTemplate configured in the default VDC. The returned Collection will contain the following associations and the rest will be cleared:
•
TemplateResourceLimit corresponding to ResourceTemplate
•
VirtualNetworkElement corresponding to ResourceTemplate
•
ResourceTemplate present in the TemplateResourceLimit
getVdcs
Returns VDC's corresponding to their instanceNameId's.
ValidationException is thrown if any of the following situation occurs:
•
If vdcInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If vdcInstanceNameIdCol is not a valid InstanceNameId of AbstractNetworkElement object.
Parameters
opContext—Operational context
vdcInstanceNameIdCol—InstanceNameId's of VirtualNetworkElement
Return Value
List of VirtualNetworkElement.The returned collection will have the following associations and the rest will be cleared.
•
VdcResourceLimit corresponding to VirtualNetworkElement
•
VirtualNetworkElementStatus corresponding to VirtualNetworkElement
•
NetworkInterface present in the VirtualNetworkElement
•
AbstractNetworkElementStatus present in the VirtualNetworkElement
•
SshServerSetting corresponding to the VirtualNetworkElement
getVdcsInChassis
Returns the collection of VirtualNetworkElement for the given chassis.
ValidationException is thrown if any of the following situation occurs:
•
If chassisId is null or it is not of type InstanceNameId.
•
If chassisId is not a valid Chassis InstanceNameId.
Parameters
opContext—Operational context
neInstanceNameId—InstanceNameId of Chassis.
Return Value
List of VirtualNetworkElement.The returned collection will have the following associations and the rest will be cleared.
•
VdcResourceLimit corresponding to VirtualNetworkElement
•
VirtualNetworkElementStatus corresponding to VirtualNetworkElement
•
NetworkInterface present in the VirtualNetworkElement
•
AbstractNetworkElementStatus present in the VirtualNetworkElement
•
SshServerSetting corresponding to the VirtualNetworkElement
getVdcsInChassises
Returns the collection of VirtualNetworkElement for the given chassises. This method is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 5.0(3) or later.
ValidationException is thrown if any of the following situation occurs:
•
If chassisId is null or it is not of type InstanceNameId.
•
If chassisId is not a valid Chassis InstanceNameId.
Parameters
opContext—Operational context
neInstanceNameId—InstanceNameId of Chassis.
Return Value
List of VirtualNetworkElement.The returned collection will have the following associations and the rest will be cleared.
•
VdcResourceLimit corresponding to VirtualNetworkElement
•
VirtualNetworkElementStatus corresponding to VirtualNetworkElement
•
NetworkInterface present in the VirtualNetworkElement
•
AbstractNetworkElementStatus present in the VirtualNetworkElement
•
SshServerSetting corresponding to the VirtualNetworkElement
modifyResourceTemplates
Modifies Resource Templates that are configured in the device.
ValidationException is thrown if any of the following situation occurs:
•
If resourceTemplateCol is null or empty or it is not of type ResourceTemplate.
•
Only existing ResourceTemplate (exist in database) can be modified.
Parameters
opContext—Operational context
resourceTemplateCol—List of modified ResourceTemplate objects.
Return Value
void
modifyVdcs
Modifies a list of configured VDC's.
ValidationException is thrown if any of the following situation occurs:
•
If vneCol is null or empty or it is not of type VirtualNetworkElement.
•
Only existing VirtualNetworkElement(exist in database) can be modified.
Parameters
opContext—Operational context
vneCol—List of Modified VirtualNetworkElement objects
Return Value
void
unbindVdcsWithResourceTemplate
Removes a specified VdcResourceLimit from the VirtualNetworkElement.
ValidationException is thrown if any of the following situation occurs:
•
If vneId is null or empty or it is not of type InstanceNameId.
•
If vdcResourceId is null or empty or it is not of type InstanceNameId.
•
Only existing VdcResourceLimit (exist in database) can be removed.
Parameters
opContext—Operational context
vdcResourceId—InstanceNameId of VdcResourceLimit to be configured along with VDC.
vneId—InstanceNameId of VDC from which the corresponding VdcResourceLimit has to be removed.
Return Value
void
validateVdcCreation
Validates if more VDCs can be created in the network element. This method is available for Cisco Nexus 7000 Series switches that run Cisco NX-OS Release 5.0(3) or later.
ValidationException is thrown if any of the following situation occurs:
•
If neInstanceNameIdCol is null or it is empty.
•
If neInstanceNameIdCol contains invalid network element InstanceNameId or null value.
•
If there is no equivalent network element object with the given InstanceNameId in the neInstanceNameIdCol.
Parameters
opContext - operational context.
neInstanceNameIdCol - a collection of InstanceNameId of the network element.
Return Value
•
List of strings set to null if more VDCs can be created in the device corresponding to the InstanceNameId of the network element.
•
List of strings set to the error message sent from the device if more VDCs cannot be created in the device corresponding to the InstanceNameId of the network element.