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

IpSourceGuardApp Service

Table Of Contents

IpSourceGuardApp Service

Information About IpSourceGuardApp Service

addIpSourceBindings

deleteAllIpSourceBindingsInInterfaces

deleteAllIpSourceBindingsInNetworkElements

deleteAllIpSourceBindingsInVlanOfAnInterface

deleteIpSourceBindings

disableIpSourceGuardInNetworkElement

disableIpSourceGuardOnInterfaces

enableIpSourceGuardOnInterfaces

getInterfacesWithIpSourceBindingsInNetworkElement

getIpSourceBindings

getIpSourceBindingsInInterface

getIpSourceBindingsInVlanOfAnInterface

getIpSourceGuardDisabledInterfacesInNetworkElement

getIpSourceGuardEnabledInterfacesInNetworkElement

getIpSourceGuardSettingOnInterfaces

getNumberOfDynamicBindingsInVlan

getNumberOfIpSourceBindingsInInterfaces

getNumberOfIpSourceBindingsInVlans

modifyIpSourceBindings


IpSourceGuardApp Service


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

Information About IpSourceGuardApp Service

This chapter defines the APIs exposed by the IP Source Guard service feature.

addIpSourceBindings

Creates a static binding entry, given the binding entry object.

ValidationException is thrown if any of the following situation occurs:

If ipSourceBindingobject does not contain value for abstractNetworkElementRef.

If the AbstractNetworkElement specified by abstractNetworkElementRef in the ipSourceBinding object does not exist in the database.

If the ipSourceBinding object does not contain value for networkInterfaceRef.

If the NetworkInterface specified by networkInterfaceRef in the ipSourceBindingobject does not exist in the database.

If the ipSourceBinding object does not contain value for vlanRef.

If the (@link com.cisco.dcbu.dcm.model.VLAN.VlanExternal} specified by vlanRef in the ipSourceBinding object does not exist in the database.

IntegrityException is thrown if the ipSourceBinding object already exist.

PropertiesException is thrown if any of the following situation occurs:

If any of the attributes of the ipSourceBindingobject is not valid.

If the lease expiry time specified for the ipSourceBinding object, got expired.

Parameters

ipSourceBindings—A collection of an object of type IpSourceBinding. This object represents an entry in IP source binding table in the device.

Return Value

A collection of the new binding entry.

deleteAllIpSourceBindingsInInterfaces

Deletes all static binding entries configured in an interface, given the InstanceNameId of the interface.

ValidationException is thrown if any of the following situation occurs:

If the argument passed interfaceInstanceNameId is not a valid interface instance name ID.

If the interface does not contain any static IP source binding associated to it.

Parameters

interfaceInstanceNameIds—- A collection of InstanceNameId of the interface, whose static binding entries are to be deleted.

Return Value

void

deleteAllIpSourceBindingsInNetworkElements

Deletes all static binding entries in a given network element, given the InstanceNameId of the network element.

ValidationException is thrown if any of the following situation occurs:

If the argument passed neInstanceNameId is not a valid network element instance name ID.

If the network element does not exist in the database.

If the network element does not contain any IpSourceBinding associated to it.

Parameters

networkElementIds—- A Collection InstanceNameId of the network element in which bindings are to be deleted.

Return Value

void

deleteAllIpSourceBindingsInVlanOfAnInterface

Deletes all static binding entries configured in a given VLAN in an interface, given the InstanceNameId of the interface and VLAN.

ValidationException is thrown if any of the following situation occurs:

If the argument interfaceInstanceNameId is null or not a valid interface instance name ID.

If the interface does not exist in the database.

If the argument vlanInstanceNameId is null or not a valid VLAN instance name ID.

If the VLAN does not exist in the database.

If the VLAN does not contain any IpSourceBinding associated to it

Parameters

opContext—Operational context

interfaceInstanceNameId—- InstanceNameId of the interface in which bindings are to be deleted for the given VLAN.

vlanInstanceNameId—- InstanceNameId of the VLAN in which the bindings are to be deleted.

Return Value

void

deleteIpSourceBindings

Deletes a static binding entry from the IP source binding table. InstanceNameId of the IP source binding.

ValidationException is thrown if any of the following situation occurs:

If ipSourceBindingInstanceNameId is null or not a valid IP source binding instance name ID.

If the IP source binding does not exist in the database.

Parameters

ipSourceBindingInstanceNameIds—- A Collection of InstanceNameId of the IP source binding that is to be deleted.

Return Value

void

disableIpSourceGuardInNetworkElement

Disables IP source guard in all interfaces in a network element, given the instance name ID of the network element.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid network element InstanceNameId.

If the network element does not exist in the database.

Parameters

opContext—Operational context

neInstanceNameId—- InstanceNameId of the network element.

Return Value

void

disableIpSourceGuardOnInterfaces

Disables IP source guard in a given collection of interfaces.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid switched network interface InstanceNameId.

If the interface does not exist in the database.

Parameters

opContext—Operational context

interfaceInstanceNameIds—- A collection of InstanceNameId of interfaces in which IP source guard is to be disabled.

Return Value

void

enableIpSourceGuardOnInterfaces

Enables IP source guard in a given collection of interfaces.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid switched network interface InstanceNameId.

If the interface does not exist in the database.

Parameters

opContext—Operational context

interfaceInstanceNameIds—- A collection of InstanceNameId of interfaces in which IP source guard is to be enabled.

Return Value

void

getInterfacesWithIpSourceBindingsInNetworkElement

Returns the interfaces having static bindings configured in them, given the InstanceNameId of the network element. The network element is the device in which the interface is present.

ValidationException is thrown any of the following situations occurs:

If the argument passed is null or it is not a valid network element InstanceNameId.

If the network element does not exist in the database.

Parameters

opContext—Operational context

neInstanceNameId—- InstanceNameId of network element

Return Value

A collection of interfaces in the network element in which static bindings are configured. Returned collection will have InstanceNameIds of interface objects having static bindings.In the returned list of objects, only the following associations will be present, and all other associations will be cleared.

IpSourceBindingassociation.

com.cisco.dcbu.dcm.model.interfaces.NetworkinterfaceInstanceNameId association.

getIpSourceBindings

Returns IpSourceBinding object corresponding to the instance Id.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid IP source binding InstanceNameId.

If the IP source binding does not exist in the database.

Parameters

ipSourceBindingInstanceNameIds—- A collection of InstanceNameId of IpSourceBinding object representing an entry in the IP Source binding table.

Return Value

A collection of an object of type IpSourceBinding.In the returned object, only the following associations will be present, and all other associations will be cleared.

AbstractNetworkElement association.

NetworkInterface association.

VlanExternal association.

getIpSourceBindingsInInterface

Returns the static bindings configured in an interface, given the InstanceNameId of the interface.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid interface InstanceNameId.

If the interface does not exist in the database.

Parameters

opContext—Operational context

interfaceInstanceNameId—- InstanceNameId of the interface

Return Value

A collection of static binding configured in the given interface. Returned collection will have objects of type IpSourceBinding. In the returned list of objects, only the following associations will be present and other associations will be cleared.

AbstractNetworkElement association.

NetworkInterface association.

VlanExternal association.

getIpSourceBindingsInVlanOfAnInterface

Returns the static bindings configured in a VLAN in an interface, given the InstanceNameId of the VLAN and the interface.

ValidationException is thrown if any of the following situation occurs:

If the argument interfaceInstanceNameId passed is null or it is not a valid interface InstanceNameId.

If the interface does not exist in the database.

If the argument vlanInstanceNameId passed is null or it is not a valid VLAN InstanceNameId.

If the VLAN does not exist in the database.

Parameters

opContext—Operational context

interfaceInstanceNameId—- InstanceNameId of the interface

vlanInstanceNameId—- InstanceNameId of a VLAN in the interface

Return Value

A collection of static binding configured in given VLAN in an interface. Returned collection will have objects of type IpSourceBinding.In the returned list of objects, only the following associations will be present, and all other associations will be cleared.

AbstractNetworkElement association.

NetworkInterface association.

VlanExternal association.

getIpSourceGuardDisabledInterfacesInNetworkElement

Returns all the interfaces in which IP Source Guard is disabled in a given network element.

ValidationException is thrown any of the following situations occurs:

If the argument passed is null or it is not a valid network element InstanceNameId.

If the network element does not exist in the database.

Parameters

opContext—Operational context

neInstanceNameId—- InstanceNameId of the network element.

Return Value

A collection of SwitchedNetworkInterface in which IP source guard is disabled, in the given network element.In the returned list of objects, only the following associations will be present and other associations will be cleared.

IP source guard association.

NetworkInterfaceName association.

getIpSourceGuardEnabledInterfacesInNetworkElement

Returns all the IP source guard enabled interfaces in a given network element.

ValidationException is thrown any of the following situations occurs:

If the argument passed is null or it is not a valid network element InstanceNameId.

If the network element does not exist in the database.

Parameters

opContext—Operational context

neInstanceNameId—- InstanceNameId of the network element.

Return Value

A collection of IP source guard enabled SwitchedNetworkInterface in the given network element.In the returned list of objects, only the following associations will be present and other associations will be cleared.

IP source guard association.

NetworkInterfaceName association.

getIpSourceGuardSettingOnInterfaces

Returns the IP source guard setting corresponding to a given interface.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid interface InstanceNameId.

If the interface does not exist in the database.

Parameters

opContext—Operational context

interfaceInstanceNameIds—- A collection of InstanceNameId of interfaces.

Return Value

A collection of IpSourceGuardSetting object corresponding to interfaces.

getNumberOfDynamicBindingsInVlan

Returns the number of dynamic bindings configured in a VLAN, given the InstanceNameId of the VLAN.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid VLAN InstanceNameId.

If the VLAN does not exist in the database.

Parameters

opContext—Operational context

vlanInstanceNameId—InstancNameId of the VLAN.

Return Value

An integer value representing the number of dynamic bindings configured in the VLAN.

getNumberOfIpSourceBindingsInInterfaces

Returns the number of static bindings configured in a collection of Interfaces, given the InstanceNameId of the Interfaces.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid Interface InstanceNameId.

Parameters

interfaceInstanceNameIds—- A collection of InstanceNameId of Interfaces. *

Return Value

A collection of integer values representing the number of static bindings configured in Interfaces.

getNumberOfIpSourceBindingsInVlans

Returns the number of static bindings configured in a collection of VLANs, given the InstanceNameId of the VLANs.

ValidationException is thrown if any of the following situation occurs:

If the argument passed is null or it is not a valid VLAN InstanceNameId.

If the VLAN does not exist in the database.

Parameters

opContext—Operational context

vlanInstanceNameIds—- A collection of InstanceNameId of VLANs.

Return Value

A collection of integer values representing the number of static bindings configured in VLANs

modifyIpSourceBindings

Updates the server with the modified Static IP Source binding entry.

ValidationException is thrown if any of the following situation occurs:

If the argument passed ipSourceBinding is null.

If the original ipSourceBinding does not exist in the database.

PropertiesException is thrown if any of the attributes of IpSourceBinding is not valid.

Example:

If the value for IpAddress is not specified.

If the value for the MacAddress is not specified

If the value for the lease expiry time is not specified and etc.

Parameters

ipSourceBinding—- A collection of modified IP Source binding entry of type IpSourceBinding

Return Value

void