Cisco DCNM Web Services API Guide, Release 4.1
ConfigArchiveApp Service
Downloads: This chapterpdf (PDF - 108.0KB) The complete bookPDF (PDF - 7.86MB) | Feedback

ConfigArchiveApp Service

Table Of Contents

ConfigArchiveApp Service

Information About ConfigArchiveApp Service

createConfigArchiveTask

deleteConfigArchiveStatusHistoryTillDateForTask

deleteConfigArchiveTasks

deleteConfigFilesTillDate

deleteRollbackStatusHistoryTillDateForDevice

fetchCfgDiff

fetchNetworkElementConfigData

getAllConfigTasks

getArchivalDeviceStatusEntries

getArchivedNetworkElementConfigData

getConfigArchiveSettings

getConfigArchiveStatusHistoryForTask

getConfigVersions

getRollbackStatusHistoryForDevice

modifyConfigArchiveSettings

modifyConfigArchiveTask

modifyConfigVersion

performConfigArchive

performRollback

startConfigArchiveTask

stopConfigArchiveTask


ConfigArchiveApp Service


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

Information About ConfigArchiveApp Service

The ConfigArchive component allows you to address the configuration archival and restore operation on each device. The purpose of the configuration archiver is to periodically poll the monitored NX-OS devices in a network and archive their running and startup configurations. As a result, it is possible to reload a prior configuration if it has been saved. If the configuration has not been saved, you will have to recreate or reconstruct the configuration before you restore the service.

The ConfigArchive application allows you to do the following:

Track all configuration changes for a device at a scheduled interval or time.

Track when the configuration changes.

Retrieve the configuration archival history.

Roll back the history or roll back to a specific version.

Schedule the time for the configuration archival.

Obtain the raw configuration data of specific versions for particular devices.

createConfigArchiveTask

This API takes schedule for the config archival creates and starts the Config Archival Task according to schedule. The config Task include the list of device Instance Name Id's to be included in the scheduling task. Schedule can be either periodic schedule or Cron Schedule.

Parameters

opContext—Operational context

List—is the list of devices to be included in the config archival task.

schedule—is the schedule which can be a periodic schedule or a chronic schedule. The config archival service starts the archival process as per the schedule.

Return Value

void

deleteConfigArchiveStatusHistoryTillDateForTask

This API is used to delete the config archive status history till the given Date for the given task. .

Parameters

opContext—Operational context

instanceId—is the InstanceNameId of the config archive task.

timestamp—is the timestamp till what user wants to delete.

Return Value

void

deleteConfigArchiveTasks

This API is used to delete the existing config archive tasks.

Parameters

opContext—Operational context

InstanceIdList—is the List of instanceIds of the tasks that needs to be deleted.

Return Value

void

deleteConfigFilesTillDate

This API is used to delete the config files till the given Date. Both the archived config files as well as database metadata will be deleted.

Parameters

opContext—Operational context

vdcInstanceIdList—is the list of vdc instanceid's for which the configversion files needs to be deleted.

timestamp—is the timestamp till what user wants to delete.

Return Value

void

deleteRollbackStatusHistoryTillDateForDevice

This API is used to delete Rollback Status history till the given Date for the given list of vdc's

Parameters

opContext—Operational context

timestamp—is the timestamp till what user wants to delete.

Return Value

void

fetchCfgDiff

This API is used to retrieve the diffConfig commands between any two configuration files across archived configuration files, live(Startup/running) configuration data. The API first fetches the configuration file of the left device, if lVer is null, it fetches the live data else appropriate configuration file version is fetched. Similarly the API fetches for the second configuration file from the device or the configuration version.

Parameters

opContext—Operational context

lvdcInstanceId—Left selected device isntance name id.

lVer—Version of the configuration file for the left selected device. if it is null, the live data is considered.

lType—Whether the configuration file is of STARTUP or RUNNING. if it is null, RUNNING config is considered for the left selected device.

rvdcInstanceId—Right selected device isntance name id.

rVer—Version of the configuration file for the right selected device. if it is null, the live data is considered.

rType—Whether the configuration file is of STARTUP or RUNNING. if it is null, RUNNING config is considered for the right selected device.

Return Value

Returns the collection of Configuration-command-object-collection of given left file version(lVer) and right file version(rVer), where the configuration-command-object contains the information of the mapped configuration-command-object on the either version file.

fetchNetworkElementConfigData

This API is used to get the current configuration data for the given list of vdc's This config data will not be archived.

Parameters

opContext—is the opcontext.

vdcInstanceIdList—is the list of instanceNameId's of vdc's for which config data needs to be fetched.

type—

Return Value

getAllConfigTasks

This API gets all the config archive tasks that are created in the database. The config archive task can be either in active state or in inactive state. Each config archive task may involve one or more devices.

Parameters

opContext—Operational context

Return Value

getArchivalDeviceStatusEntries

This API is used to get the archival status information for each device given the instanceNameId of the device.

Parameters

vdcInstanceIdList—is the collection of instanceNameIds of the devices.

Return Value

Returns the collection of DeviceStatusEntries collection for each device instanceNameId.

getArchivedNetworkElementConfigData

This API is used to get the actual raw data of the configuration. It takes a list of vdc InstanceId's and list of versions and returns the list of ConfigData. ConfigData will have the data in compressed form, getText() method in it returns the uncompressed form. There will be one to one mapping between vdc instance Id and the version.

Parameters

opContext—Operational context

vdcInstanceIdList—is the list of vdc instanceid's for which config data needs to be fetched.

versionList—is the list of versions mapping to the vdc.

Return Value

getConfigArchiveSettings

This API is used to get Global Config Archive Settings. Config Archive Settings include the Max Version Count to return and max status history count to return.

Parameters

opContext—Operational context

Return Value

ConfigArchiveSettings which include statusHistoryCount and maxVersionCount

getConfigArchiveStatusHistoryForTask

The API is used to get the ConfigArchiveStatus History for the given task. from the database.

Parameters

opContext—Operational context

InstanceNameId.—is the InstanceNameId of task for which the config archive status history needs to be fetched.

Return Value

List is the list of ConfigFetchHistory type. ConfigFetchHistory will contain information about config archival operation,timestamp and the list of devices.

getConfigVersions

This API is used to fetch the ConfigHistoryMetadata for the list of vdc instance ids passed. It also takes config type as the parameter to check if the user has requested for Startup Config or Running Config

Parameters

opContext—Operational context

vdcInstanceId—vdcInstanceIdList is the instanceNameId's of the vdc's for which user is fetching the config metadata.

type—is the type of the configuration. Config type can be Running or Starting.

Return Value

List retuns a list of meta data of each config version.

getRollbackStatusHistoryForDevice

This API is used to get the RollbackStatusHistory for the given devices from the database.

Parameters

opContext—Operational context

vdcInstanceIdList—is the list of instanceNameIds of the vdcs for which roll back status history needs to be fetched.

Return Value

List is the list of RollbackHistory type. RollbackHistory will contain information about the device instanceNameId for which the roll back has been performed. timestamp, result and the description of the result.

modifyConfigArchiveSettings

This API is used to modify the values of Config Archive Settings.

Parameters

opContext—Operational context

setting—is the modified Config Archive Setting.

Return Value

void

modifyConfigArchiveTask

This API is used to modify the existing Config Archival Task. User can add new devices or delete existing devices to the existing task or he can modify the existing modified schedule.

Parameters

opContext—Operational context

taskId—is the taskId for which user which user wants to modify the schedule and devices

deviceIdList—is the new device Id List.

sch—is the new schedule

Return Value

void

modifyConfigVersion

This API is used to modify the existing config versions with the new comment in the Pojo.

Parameters

opContext—Operational context

configVersionList—is the list of configVersions that needs to be modifed.

Return Value

void

performConfigArchive

This API is used to perform the on demand config archive operation for the given list of vdc's.

Parameters

opContext—Operational context

vdcInstanceIdList—is the list of instanceNameId's of vdc's for which config archive operation needs to be deleted.

type—is the type specifying running or startup configuration.

Return Value

void

performRollback

This API takes the version of the config and the type for a particular vdc Instance Id and performs the roll back operation on the device.

Parameters

opContext—Operational context

vdcInstanceId—is the instanceNameId of the vdc for which user is doing rollback.

type—is the type of the configuration. Config type can be Running or Starting.

Version—is the version of the config file to which the user is performing the roll back operation. * @param saveToStartup is the boolean indicating whether the running configuration needs to be save to startup configurations.

Return Value

void

startConfigArchiveTask

This API is used to start the config archive task which is suspened earlier. If the VdcInstanceNameId is null, it will restart the task for all network elements involved in the task. Else only the job for a given vdc will be started.

Parameters

opContext—is the opcontext

taskInstanceNameId—is the instanceNameId of the task which needs to be started

vdcInstanceNameId—is the VdcInstanceNameId for which the job needs to started

Return Value

void

stopConfigArchiveTask

This API is used to stop the config archive task which is running. If the VdcInstanceNameId is null, it will stop the task for all network elements involved in the task. Else only the job for a given vdc will be stopped.

Parameters

opContext—is the opcontext

taskInstanceNameId—is the instanceNameId of the task which needs to be stopped

vdcInstanceNameId—is the VdcInstanceNameId for which the job needs to stopped

Return Value

void