Table Of Contents
HsrpApp Service
Information About HsrpApp Service
addHsrpGroupSetting
bindTrackingObjectToHsrpGroupSetting
disableHsrpService
enableHsrpService
getHsrpAuthenticationSetting
getHsrpGlobalSetting
getHsrpGroupSetting
getHsrpGroupSettingsInNetworkElement
getHsrpRouterStatus
getHsrpTimers
getIpInterfaceWithHsrpSettings
getTrackingObject
modifyAuthenticationSetting
modifyHsrpGroupSetting
modifyHsrpTimers
modifyIpInterfaceWithHsrpSettings
removeHsrpGroupSetting
unbindTrackingObjectFromHsrpGroupSetting
HsrpApp Service
This chapter describes the DCNM web services' API methods for the HsrpApp service.
Information About HsrpApp Service
The Hot Standby Router Protocol (HSRP) allows a transparent failover at the first-hop IP router. The protocol allows hosts to appear to use a single router and to maintain connectivity even if the actual first-hop router fails. HSRP enables two or more devices to work together in a group to provide an illusive virtual router service by sharing a virtual IP address and virtual MAC address. Through election (based on priority), one router (having the highest priority) in the HSRP group is elected as active and another router is elected as standby. Remaining routers will be in listening mode.
APIs are defined with the following categories:
1.
Query/Get APIs—Query data from the persisted database.
2.
Modify APIs—Modify existing HSRP group settings.
3.
Remove APIs—Disassociate HSRP group settings from one or more interfaces in the device.
addHsrpGroupSetting
Adds a HSRP group setting to one or more IpNetworkInterface.
ValidationException is thrown if any of the following situation occurs:
•
If ifInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If ifInstanceNameIdCol is not a valid InstanceNameId of IpNetworkInterface object.
•
If setting is null
•
If virtualIpAddress or secondaryIpAddressof a HsrpGroupSetting conflicts with the following.
–
IpAddress of IpNetworkInterface.
–
virtualIpAddress of other HsrpGroupSetting.
–
secondaryIpAddress of other HsrpGroupSetting.
•
If groupName of a HsrpGroupSetting conflicts with groupName of other HsrpGroupSettings in a device
IntegrityException is thrown if any of the following situation occurs:
•
If ifInstanceNameIdColcontains more than one instanceNameIds of Interfaces present in a device and
1.
virtualIpAddress is not null
2.
groupName is not null
PropertiesException is thrown if any of the following situation occurs:
•
In the hsrpGroupSetting object, if any one of the HsrpGroupSetting attribute is not valid.
Example:
1.
hsrpGroupName of a HsrpGroupSetting contains a space.
Parameters
opContext—Operational context
setting—HsrpGroupSetting with the parameters that needs to applied to one or more IpNetworkInterface
hni—HsrpNetworkInterfaceSetting with the parameters that needs to applied to one or more IpNetworkInterface
ifInstanceNameIdCol—List of InstanceNameId of one or more IpNetworkInterface
Return Value
List of HsrpGroupSetting
bindTrackingObjectToHsrpGroupSetting
Binds an existing HsrpGroup to track a new object.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpInstanceNameId is null or empty or it is not of type InstanceNameId.
•
If objectTrackingInstanceNameId is not a valid InstanceNameId of ObjectTrackingSetting object.
Parameters
opContext—Operational context
hsrpInstanceNameIdCol—List of InstanceNameId of HsrpGroupSetting
objectTrackingInstanceNameIdCol—List of InstanceNameId of ObjectTrackingSetting object.
decrementValue—Decrement Value
Return Value
void
disableHsrpService
Disables HsrpService in the device.Given the instance name ID of one or more network elements, hsrp will be disabled on those elements. ValidationException is thrown if any of the following situation occurs:
•
If neInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If neInstanceNameIdCol does not a valid AbstractNetworkElement InstanceNameId.
Parameters
opContext—Operational context
neInstanceNameIdCol—List of InstanceNameId of hsrp disabled AbstractNetworkElement
Return Value
void
enableHsrpService
Enables HsrpService in the device.Given the instance name ID of one or more network elements, hsrp will be enabled on those elements. This API is to enable "hsrp service" option globally in the device.
ValidationException is thrown if any of the following situation occurs:
•
If neInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If neInstanceNameIdCol does not a valid AbstractNetworkElement InstanceNameId.
Parameters
opContext—Operational context
neInstanceNameIdCol—List of InstanceNameId of AbstractNetworkElement
Return Value
void
getHsrpAuthenticationSetting
Returns a list of HsrpAuthenticationSetting corresponding to one or more HSRP groups. Given a list of InstanceNameId corresponding to HsrpGroupSetting, API returns a list of HsrpAuthenticationSetting corresponding to the HSRP groups.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpSettingInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If hsrpSettingInstanceNameIdCol is not a valid InstanceNameId of HsrpGroupSetting object.
Parameters
opContext—Operational context
hsrpSettingInstanceNameIdCol—List of InstanceNameId of HsrpGroupSetting
Return Value
List of HsrpAuthenticationSetting objects.In the returned list of objects, only the following associations will be present, and all other associations will be cleared.
•
HSRP group setting corresponding to HsrpAuthenticationSetting
•
Key Chain
getHsrpGlobalSetting
Returns a list of (@link HsrpGlobalSetting) objects. Each (@link HsrpGlobalSetting) object will have a Boolean attribute hsrpServiceEnable populated which indicates whether HSRP service is enabled/disabled on this device.
Parameters
opContext—Operational context
neInstanceNameIdCol—
Return Value
List of HsrpGlobalSetting objects.
getHsrpGroupSetting
Returns a list of HsrpGroupSetting objects corresponding to a list of InstanceNameId.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpSettingInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If hsrpSettingInstanceNameIdCol is not a valid InstanceNameId of HsrpGroupSetting object.
Parameters
opContext—Operational context
hsrpSettingInstanceNameIdCol—List of InstanceNameId corresponding to HsrpGroupSetting
Return Value
List of HsrpGroupSetting objects with all the associations populated.
getHsrpGroupSettingsInNetworkElement
Returns a list of HsrpGroupSetting corresponding to HSRP groups configured on a network element.
ValidationException is thrown if any of the following situation occurs:
•
If neInstanceNameId is null or it is not a valid InstanceNameId of a network element.
Parameters
opContext—Operational context
neInstanceNameId—InstanceNameId of the network element
Return Value
List of HsrpGroupSetting objects.In the returned list of objects, only the following associations will be present, and all other associations will be cleared.
•
IP network interface corresponding to HsrpGroupSetting
•
HSRP Router Status
getHsrpRouterStatus
Returns a list of HsrpRouterStatus corresponding to one or more HSRP groups. Given a list of InstanceNameId corresponding to HsrpGroupSetting, API returns a list of HsrpRouterStatus corresponding to the HSRP groups.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpSettingInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If hsrpSettingInstanceNameIdCol is not a valid InstanceNameId of HsrpGroupSetting object.
Parameters
opContext—Operational context
hsrpSettingInstanceNameIdCol—List of InstanceNameId of HsrpGroupSetting
Return Value
List of HsrpRouterStatus.
getHsrpTimers
Returns a list of HsrpTimersSetting objects corresponding to one or more HSRP groups. Given a list of InstanceNameId corresponding to HsrpGroupSetting, API returns a list of HsrpTimersSetting corresponding to the HSRP groups.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpSettingInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If hsrpSettingInstanceNameIdCol is not a valid InstanceNameId of HsrpGroupSetting object.
Parameters
opContext—Operational context
hsrpSettingInstanceNameIdCol—List of InstanceNameId of HsrpGroupSetting
Return Value
List of HsrpTimersSetting objects
getIpInterfaceWithHsrpSettings
Returns a list of IpNetworkInterface. Given a list of InstanceNameId corresponding to IpNetworkInterface, API returns a list of IpNetworkInterface with HsrpNetworkInterfaceSetting populated.
ValidationException is thrown if any of the following situation occurs:
•
If ipInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If ipInstanceNameIdCol is not a valid InstanceNameId of IpNetworkInterface object.
Parameters
opContext—Operational context
ipInstanceNameIdCol—List of InstanceNameId of IpNetworkInterface
Return Value
List of IpNetworkInterface.
getTrackingObject
Returns a list of HsrpGroupTracksObject corresponding to one or more HSRP groups. Given a list of InstanceNameId corresponding to HsrpGroupSetting, API returns a list of HsrpGroupTracksObject corresponding to the HSRP groups.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpSettingInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If hsrpSettingInstanceNameIdCol is not a valid InstanceNameId of HsrpGroupSetting object.
Parameters
opContext—Operational context
hsrpSettingInstanceNameIdCol—List of InstanceNameId of HsrpGroupSetting
Return Value
List of HsrpGroupTracksObject.
modifyAuthenticationSetting
Modifies HsrpAuthenticationSetting for one or more HsrpGroupSetting. KeyChain associations can also be built with HsrpAuthenticationSetting.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If hsrpInstanceNameIdCol is not a valid InstanceNameId of HsrpGroupSetting object.
•
If setting is null.
Parameters
opContext—Operational context
hsrpInstanceNameIdCol—list of InstanceNameId of HsrpGroupSetting
setting—HSRP authentication setting to be applied to HSRP groups.
Return Value
void
modifyHsrpGroupSetting
Modifies HsrpGroupSetting on one or more network elements.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpGroupSettingCol is null or empty or it is not of type HsrpGroupSetting.
•
Only existing HsrpGroupSetting ( exist in database ) can be modified.
•
virtualIpAddress or secondaryIpAddressof a HsrpGroupSetting conflicts with the following.
1.
IpAddress of IpNetworkInterface.
2.
virtualIpAddress of other HsrpGroupSetting.
3.
secondaryIpAddress of other HsrpGroupSetting.
•
groupName of a HsrpGroupSetting conflicts with groupName of other HsrpGroupSettings in a device
PropertiesException is thrown if any of the following situation occurs:
•
In the hsrpGroupSettingCol collection, if any one of the HsrpGroupSetting attribute is not valid.
Example:
1.
hsrpGroupName of a HsrpGroupSetting contains a space.
Parameters
opContext—Operational context
hsrpGroupSettingCol—List of modified HsrpGroupSetting objects.
Return Value
List of HsrpGroupSetting
modifyHsrpTimers
Modifies HsrpTimersSetting for one or more HsrpGroupSetting.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If hsrpInstanceNameIdCol is not a valid InstanceNameId of HsrpGroupSetting object.
•
If hsrpTimers is null.
Parameters
opContext—Operational context
hsrpInstanceNameIdCol—List of InstanceNameId of HsrpGroupSetting
hsrpTimers—HSRP timer setting to be applied to HSRP groups.
Return Value
List of updated HsrpTimersSetting objects
modifyIpInterfaceWithHsrpSettings
Given a list of InstanceNameId corresponding to IpNetworkInterface and a HsrpNetworkInterfaceSettingobject, API modifies the HsrpNetworkInterfaceSetting associated with a IpNetworkInterface ValidationException is thrown if any of the following situation occurs:
•
If ipInstanceNameIdCol is null or empty or it is not of type InstanceNameId.
•
If ipInstanceNameIdCol is not a valid InstanceNameId of IpNetworkInterface object.
Parameters
opContext—Operational context
ipInstanceNameIdCol—List of InstanceNameId of IpNetworkInterface
hni—HsrpNetworkInterfaceSetting with the parameters that needs to applied to one or more IpNetworkInterface
Return Value
void
removeHsrpGroupSetting
Removes a list of Hsrp Groups HsrppGroupSetting for a IpNetworkInterface.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpGroupIdCol is null or empty or it is not of type InstanceNameId.
•
If neInstanceNameId is not a valid IpNetworkInterface object.
Parameters
opContext—Operational context
hsrpGroupIdCol—List of InstanceNameId of HsrpGroupSetting
ifInstanceNameId—InstanceNameId of the IpNetworkInterface object
Return Value
void
unbindTrackingObjectFromHsrpGroupSetting
Unbinds a HSRP group from the specified tracked objects so that the status of the group is no longer influenced by the status of the tracked objects.
ValidationException is thrown if any of the following situation occurs:
•
If hsrpInstanceNameId is not a valid InstanceNameId of HsrpGroupSetting.
•
If objectTrackingInstanceNameId is not a valid InstanceNameId of ObjectTrackingSetting object.
Parameters
opContext—
hsrpInstanceNameIdCol—List of InstanceNameId of HsrpGroupSetting
objectTrackingInstanceNameIdCol—List of InstanceNameId of ObjectTrackingSetting
Return Value
void