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

SwitchProfileApp Service

Table Of Contents

SwitchProfileApp Service

Information About SwitchProfileApp Service

abortBufferedConfigFromSwitchProfile

addConfigSyncPeerSwitchesToSwitchProfile

createSwitchProfileForNetworkElements

deleteAllBufferedConfiguration

deleteBufferedConfiguration

deleteSwitchProfiles

disableSwitchProfileSupport

enableSwitchProfileSupport

fetchBufferedConfiguration

getAllNetworkElements

getCfsGlobalSetttings

getSwitchProfiles

getSwitchProfilesInNetworkElements

modifySwitchProfilesInNetworkElement

performCommitBufferedConfigFromSwitchProfile

performImportRunningConfigToBuffer

removeConfigSyncPeerSwitchesFromSwitchProfile

validateBufferedConfigFromSwitchProfile


SwitchProfileApp Service


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

Information About SwitchProfileApp Service

This interface defines all the APIs exposed by the SwitchProfileApp service facade.

abortBufferedConfigFromSwitchProfile

Performs an abort operation to the buffered configuration of given SwitchProfile object in the device.

ValidationException is thrown if any of the following situation occurs:

If the switchProfileId is null.

If the switchProfileId is not a valid SwitchProfile InstanceNameId.

Parameters

opContext—Operational context.

switchProfileId—The instance name id of the SwitchProfile.

Return Value

void.

addConfigSyncPeerSwitchesToSwitchProfile

Associates the given ConfigSyncPeerSwitch collection to an existing SwitchProfile object.

ValidationException is thrown if any of the following situation occurs:

If switchProfileId is null.

If switchProfileId is not a valid SwitchProfile InstanceNameId.

If aConfigSyncPeerSwitchCol collection is null or the collection is empty.

SwitchProfileException is thrown if any of the following situation occurs:

If the element of aConfigSyncPeerSwitchCol already exist for the given SwitchProfile.

If the aConfigSyncPeerSwitchCol contains ConfigSyncPeerSwitch element which has invalid IPAddress.

Parameters

opContext—Operational context.

switchProfileId—The instance name id of the SwitchProfile.

ConfigSyncPeerSwitchCol—The collection of ConfigSyncPeerSwitch that needs to be added to SwitchProfile.

Return Value

Instance name id of the ConfigSyncPeerSwitch.

createSwitchProfileForNetworkElements

Create a SwitchProfile object in one or more than one network elements. Given the list of InstanceNameId of network elements and a SwitchProfile object, creates the corresponding switch-profile instances in the device and returns its list of InstanceNameId.

ValidationException is thrown 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 name of the switch-profile exceeds 64 characters.

IntegrityException is thrown if the following situation occurs:

Any of the SwitchProfile already exists in the database.

Parameters

opContext—Operational context.

neInstanceNameIdCol—List of InstanceNameIds of the network elements.

aSwitchProfile—The SwitchProfile object that needs to be created.

Return Value

List of InstanceNameId of the newly created SwitchProfile object.

deleteAllBufferedConfiguration

Deletes all the buffered configuration of given SwitchProfile Object.

ValidationException is thrown if any of the following situation occurs:

The switchProfileId is null.

The switchProfileId is not a valid SwitchProfile InstanceNameId.

Parameters

opContext—Operational context.

switchProfileId—The instance name id of the SwitchProfile.

Return Value

void

deleteBufferedConfiguration

Deletes the selected buffered configuration settings of a given SwitchProfile object.

ValidationException is thrown if any of the following situation occurs:

The switchProfileId is null.

The switchProfileId is not a valid SwitchProfile InstanceNameId.

SwitchProfileException is thrown if the following situation occurs:

The seqNoRange or subModeCmdSeqNoCol is invalid.

Parameters

opContext—Operational context.

switchProfileId—The instance name id of the switch profile.

seqNoRange—The IntegerRange of sequence number id range of the buffered configuration to the SwitchProfile.

subModeCmdSeqNoCol—A list of sub-mode commands ids of the buffered configuration to the SwitchProfile.

Return Value

void.

deleteSwitchProfiles

Deletes one or more SwitchProfile objects.

ValidationException is thrown if any of the following situation occurs:

The switchProfileIdCol collection is either null or empty.

The switchProfileIdCol collection contains an element that is not of type SwitchProfile InstanceNameId.

The switchProfileIdCol collection contains a SwitchProfile that does not exist in the database.

Parameters

opContext—Operational context.

switchProfileIdCol—A list of InstanceNameId of the SwitchProfile objects.

includePeerSwitches—Set to TRUE for deleting all the switch profiles locally as well as across peer-switches. Set to FALSE for deleting all the switch profiles locally.

Return Value

void.

disableSwitchProfileSupport

Disables the configuration on one or more network elements. This API is applicable only for devices that are running Cisco DC-OS which supports switch-profile feature.

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—A list of InstanceNameId of the Network Element for which the switch-profile support should be disabled.

Return Value

void.

enableSwitchProfileSupport

Enables the configuration on one or more network elements. This API is applicable only for devices that are running Cisco DC-OS which supports switch-profile feature.

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—A list of InstanceNameId of the Network Element for which the switch-profile support should be enabled.

Return Value

void.

fetchBufferedConfiguration

Fetch current buffered configuration for the given SwitchProfile object.

ValidationException is thrown if any of the following situation occurs:

If switchProfileId is null.

If switchProfileId is not a valid SwitchProfile InstanceNameId.

Parameters

opContext—Operational context.

switchProfileId—The instance name id of the SwitchProfile

Return Value

A buffered configuration in the type of StringBuilder.

getAllNetworkElements

Returns all the devices that is supporting the SwitchProfile feature. Returns an empty collection if none of the devices supports SwitchProfile feature.

Parameters

opContext—Operational context.

Return Value

A collection of VirtualNetworkElement objects.

Following association will be available for each VirtualNetworkElemenet object:

CfsGlobalSetting

SwitchProfile

ConfigSyncPeerSwitch of each SwitchProfile

ConfigSyncSessionHistory of each SwitchProfile

getCfsGlobalSetttings

Returns a list of CfsGlobalSetting objects.

Parameters

opContext—Operational context.

neInstanceNameIdCol - List of InstanceNameId of NetworkElement.

Return Value

A list of CfsGlobalSetting objects.

getSwitchProfiles

Returns a collection of SwitchProfile objects against the given instance name IDs. The switch profile instance is populated with configSyncPeerSwitchCol. A SwitchPprofile instance may be empty if there are no peer switch that is configured to use the SwitchProfile. The switch profile may be populated with history that may have the following references:

ConfigSyncSessionHistory

lastCommitConfigSyncSessionRef

lastOutOfSyncConfigSyncSessionRef

lastConfigSyncSessionRef

ValidationException is thrown if any of the following situation occurs:

The argument passed is null for switchProfileIdCol

The argument passed is not a valid switch profile InstanceNameId.

Parameters

opContext—Operational context.

switchProfileIdCol—List of InstanceNameId corresponding to the switch profiles.

Return Value

A list of SwitchProfile instances that are present in the device.

getSwitchProfilesInNetworkElements

Returns a collection of switch-profile objects against the given the instance name ID of a switch profile. The switch profile instance is populated with configSyncPeerSwitchCol. A switch profile instance may be empty if no peer switch is configured to use the switch profile.

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 corresponding to the network elements.

Return Value

A list of SwitchProfile instances on the device.

modifySwitchProfilesInNetworkElement

Modify one or more switch-profile objects.

ValidationException is thrown if any of the following situation occurs:

The aSwitchProfileCol is null or the collection is empty.

The aSwitchProfileCol contains one or more null element, or the collection contains objects that are not of the type SwitchProfile.

The aSwitchProfileCol contains one or more SwitchProfile objects without AbstractNetworkElement association.

PropertiesException is thrown if any of the following situation occurs:

The aSwitchProfileCol collection, if any of the SwitchProfile attribute is not valid.

Parameters

opContext—Operational context.

aSwitchProfileCol—List of SwitchProfile instances which are modified.

Return Value

void.

performCommitBufferedConfigFromSwitchProfile

Perform commit operation to the buffered configuration of given SwitchProfile object in the device.

ValidationException is thrown if any of the following situation occurs:

If switchProfileId is null.

If switchProfileId is not a valid SwitchProfile InstanceNameId.

SwitchProfileException is thrown if any of the following situation occurs:

The commit is failed for buffered configuration.

Parameters

opContext—Operational context.

switchProfileId—The instance name id of the SwitchProfile.

Return Value

void.

performImportRunningConfigToBuffer

Perform import operations for running a configuration into the buffer of a given SwitchProfile object.

ValidationException is thrown if any of the following situation occurs:

The switchProfileId is null.

The switchProfileId is not a valid SwitchProfile InstanceNameId.

The action is null.

The importParameter is null for the action as IMPORT_INTERFACE_RUNNING_CONFIG.

The action has other than IMPORT_RUNNING_CONFIG_ALL or IMPORT_INTERFACE_RUNNING_CONFIG.

Parameters

opContext—Operational context.

switchProfileId—The instance name id of the SwitchProfile

importParam—The parameter which defines specific configuration to be import from running-config.

action—The allowed switch-profile action to import running-config.

Return Value

void.

removeConfigSyncPeerSwitchesFromSwitchProfile

Removes a ConfigSyncPeerSwitch from an existing SwitchProfile object:

ValidationException is thrown if any of the following situation occurs:

If switchProfileId is null.

If switchProfileId is not a valid SwitchProfile InstanceNameId.

If the configSyncPeerSwitchId is null

If configSyncPeerSwitchId is not a valid ConfigSyncPeerSwitch InstanceNameId.

SwitchProfileException is thrown if any of the following situation occurs:

If the element of configSyncPeerSwitchIdCol is not exist within the given SwitchProfile.

Parameters

opContext—Operational context.

switchProfileId—The instance name id of the SwitchProfile.

configSyncPeerSwitchIdCol—The Collection of ConfigSyncPeerSwitch that needs to be removed from SwitchProfile.

Return Value

void.

validateBufferedConfigFromSwitchProfile

Perform verify operation to the buffered configuration of given SwitchProfile object in the device.

ValidationException is thrown if any of the following situation occurs:

If switchProfileId is null.

If switchProfileId is not a valid SwitchProfile InstanceNameId.

Parameters

opContext—Operational context.

switchProfileId - The instance name id of the SwitchProfile.

Return Value

void.