Source code for ixnetwork.ixn_protocol_stack

"""
Classes and utilities to manage IXN protocol stack objects.

@author yoram@ignissoft.com
"""

from ixnetwork.ixn_object import IxnObject


[docs]class IxnProtocolStack(IxnObject):
[docs] def action(self, oper): self.api.execute(oper, self.obj_ref())
[docs] def start(self): self.action('start')
[docs] def stop(self): self.action('stop')
[docs]class IxnProtocolEndpoint(IxnProtocolStack): pass
[docs]class IxnEthernetEndpoint(IxnProtocolEndpoint): def __init__(self, **data): """ Create new Ethernet endpoint object in the API. :param parent: parent port object. """ data['parent'] = data['parent'].get_child_static('protocolStack') data['objType'] = 'ethernetEndpoint' super(self.__class__, self).__init__(**data)
[docs]class IxnDcbxEndpoint(IxnProtocolEndpoint): def __init__(self, **data): """ Create new DCBX endpoint object in the API. :param parent: parent port object. """ data['parent'] = IxnObject(parent=data['parent'].get_child_static('protocolStack'), objType='ethernet') data['objType'] = 'dcbxEndpoint' super(self.__class__, self).__init__(**data)
[docs]class IxnFcoeClientEndpoint(IxnProtocolEndpoint): def __init__(self, **data): """ Create new FCoE client endpoint object in the API. :param parent: parent port object. """ data['parent'] = IxnObject(parent=data['parent'].get_child_static('protocolStack'), objType='ethernet') data['objType'] = 'fcoeClientEndpoint' super(self.__class__, self).__init__(**data)
[docs]class IxnFcoeForwarderEndpoint(IxnProtocolEndpoint): def __init__(self, **data): """ Create new FCoE forwarder endpoint object in the API. :param parent: parent port object. """ data['parent'] = IxnObject(parent=data['parent'].get_child_static('protocolStack'), objType='ethernet') data['objType'] = 'fcoeFwdEndpoint' super(self.__class__, self).__init__(**data)
[docs]class IxnRange(IxnProtocolStack): def __init__(self, **data): """ Create new range object in the API. :param parent: parent endpoint object. """ data['objType'] = 'range' super(self.__class__, self).__init__(**data)