ixnetwork package¶
Subpackages¶
Submodules¶
ixnetwork.ixn_app module¶
Classes and utilities to manage IXN application.
@author yoram@ignissoft.com
-
class
ixnetwork.ixn_app.
IxnApp
(logger, api_wrapper=None)[source]¶ Bases:
trafficgenerator.trafficgenerator.TrafficGenerator
IxNetwork driver. Equivalent to IxNetwork Application.
-
protocol_abort
(protocol)[source]¶ Abort all protocols and wait for all protocols to stop.
- Raises:
- TgnError: if some protocol failed to stop.
-
protocol_start
(protocol)[source]¶ Start a protocol and wait for all protocols to start.
Raises TgnError: if some protocol failed to start.
-
protocol_stop
(protocol)[source]¶ Stop all protocols and wait for all protocols to stop.
- Raises:
- TgnError: if some protocol failed to stop.
-
protocols_start
()[source]¶ Start all protocols.
It is the calling function responsibility to wait for all protocols to start.
-
protocols_stop
()[source]¶ Stop all protocols.
It is the calling function responsibility to wait for all protocols to stop.
-
root
= None¶
-
ixnetwork.ixn_hw module¶
Classes and utilities to manage IXN HW.
@author yoram@ignissoft.com
-
class
ixnetwork.ixn_hw.
IxnCard
(**data)[source]¶ Bases:
ixnetwork.ixn_hw.IxnPhyBase
-
attributes_names
= ('description',)¶
-
children_types
= {'ports': ('port', 'portId', 'Port ')}¶
-
-
class
ixnetwork.ixn_hw.
IxnChassis
(**data)[source]¶ Bases:
ixnetwork.ixn_hw.IxnPhyBase
-
attributes_names
= ('chassisType', 'chassisVersion')¶
-
children_types
= {'modules': ('card', 'cardId', 'Slot ')}¶
-
-
class
ixnetwork.ixn_hw.
IxnPhyPort
(**data)[source]¶ Bases:
ixnetwork.ixn_hw.IxnPhyBase
-
attributes_names
= ('description',)¶
-
children_types
= {}¶
-
ixnetwork.ixn_interface module¶
Classes and utilities to manage IXN protocol interface objects.
@author yoram@ignissoft.com
-
class
ixnetwork.ixn_interface.
IxnInterfaceL3
(**data)[source]¶ Bases:
ixnetwork.ixn_object.IxnObject
,trafficgenerator.tgn_object.TgnL3
-
ixnetwork.ixn_interface.
filter_ints_based_on_vlan
(interfaces, vlan, count=1)[source]¶ Filter list of interfaces based on VLAN presence or absence criteria.
Parameters: - interfaces – list of interfaces to filter.
- vlan – boolean indicating whether to filter interfaces with or without VLAN.
- vlan – number of expected VLANs (note that when vlanEnable == False, vlanCount == 1)
Returns: interfaces with VLAN(s) if vlan == True and vlanCount == count else interfaces without VLAN(s).
Todo: add vlanEnable and vlanCount to interface/range/deviceGroup classes.
ixnetwork.ixn_object module¶
Base classes and utilities to manage IxNetwork (IXN).
author: | yoram@ignissoft.com |
---|
-
class
ixnetwork.ixn_object.
IxnObject
(**data)[source]¶ Bases:
trafficgenerator.tgn_object.TgnObject
Base class for all IXN classes.
-
api
= None¶
-
get_attribute
(attribute)[source]¶ Parameters: attribute – requested attributes. Returns: attribute value. Raises TgnError: if invalid attribute.
-
get_child_static
(objType, seq_number=None)[source]¶ Returns IxnObject representing the requested child without reading it from the IXN.
Statically build the child object reference based on the requested object type and sequence number and build the IxnObject with this calculated object reference. Ideally we would prefer to never use this function and always read the child dynamically but this has huge impact on performance so we use the static approach wherever possible.
-
get_children
(*types)[source]¶ Read (getList) children from IXN.
Use this method to align with current IXN configuration.
Parameters: types – list of requested children. Returns: list of all children objects of the requested types.
-
get_obj_class
(obj_type)[source]¶ Returns the object class based on parent and object types.
In most cases the object class can be derived from object type alone but sometimes the same object type name is used for different object types so the parent (or even grandparent) type is required in order to determine the exact object type. For example, interface object type can be child of vport or router (ospf etc.). In the first case the required class is IxnInterface while in the later case it is IxnObject.
Parameters: obj_type – IXN object type. Returns: object class if specific class else IxnObject.
-
logger
= None¶
-
root
= None¶
-
str_2_class
= {}¶
-
ixnetwork.ixn_port module¶
Classes and utilities to manage IXN port (vport) objects.
@author yoram@ignissoft.com
-
class
ixnetwork.ixn_port.
IxnPort
(**data)[source]¶ Bases:
ixnetwork.ixn_object.IxnObject
-
location
= None¶
-
reserve
(location=None, force=False, wait_for_up=True, timeout=80)[source]¶ Reserve port and optionally wait for port to come up.
Parameters: - location – port location as ‘ip/module/port’. If None, the location will be taken from the configuration.
- force – whether to revoke existing reservation (True) or not (False) - NOT SUPPORTED YET.
- wait_for_up – True - wait for port to come up, False - return immediately.
- timeout – how long (seconds) to wait for port to come up.
-
ixnetwork.ixn_protocol module¶
Classes and utilities to manage IXN classical protocols objects.
@author yoram@ignissoft.com
-
class
ixnetwork.ixn_protocol.
IxnBgpRouteRange
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnRouteRange
Represents IXN BGP route range.
-
class
ixnetwork.ixn_protocol.
IxnBgpRouter
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolServer
Represents IXN BGP router.
-
class
ixnetwork.ixn_protocol.
IxnIgmpHost
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolServer
Represents IXN IGMP host.
-
class
ixnetwork.ixn_protocol.
IxnIgmpQuerier
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolServer
Represents IXN IGMP querier.
-
class
ixnetwork.ixn_protocol.
IxnIsisRouteRange
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnRouteRange
Represents IXN ISIS route range.
-
class
ixnetwork.ixn_protocol.
IxnIsisRouter
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolRouter
Represents IXN ISIS router.
-
interface_attribute
= 'interfaceId'¶
-
objType
= 'router'¶
-
-
class
ixnetwork.ixn_protocol.
IxnLacp
(**data)[source]¶ Bases:
ixnetwork.ixn_object.IxnObject
Represents IXN LACP object.
-
class
ixnetwork.ixn_protocol.
IxnLdpRouteRange
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnRouteRange
Represents IXN LDP route range.
-
class
ixnetwork.ixn_protocol.
IxnLdpRouter
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolRouter
Represents IXN ISIS router.
-
interface_attribute
= 'protocolInterface'¶
-
objType
= 'router'¶
-
-
class
ixnetwork.ixn_protocol.
IxnOpenFlowDevice
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolRouter
Represents IXN OpenFlow device.
-
interface_attribute
= 'protocolInterfaces'¶
-
objType
= 'device'¶
-
-
class
ixnetwork.ixn_protocol.
IxnOspfRouteRange
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnRouteRange
Represents IXN OSPF route range.
-
class
ixnetwork.ixn_protocol.
IxnOspfRouter
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolRouter
Represents IXN OSPF router.
-
objType
= 'router'¶
-
-
class
ixnetwork.ixn_protocol.
IxnOspfV3Router
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolRouter
Represents IXN OSPFv3 router.
-
objType
= 'router'¶
-
-
class
ixnetwork.ixn_protocol.
IxnPimsmRouter
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolRouter
Represents IXN PIM-SM router.
-
objType
= 'router'¶
-
-
class
ixnetwork.ixn_protocol.
IxnPimsmSource
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnRouteRange
Represents IXN BGP route range.
-
class
ixnetwork.ixn_protocol.
IxnProtocol
(**data)[source]¶ Bases:
ixnetwork.ixn_object.IxnObject
Base class for IXN classical protocol objects (e.g. OSPF router, IGMP Querier, MLD Host etc.).
-
ixn_ints
= {}¶
-
-
class
ixnetwork.ixn_protocol.
IxnProtocolRouter
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocol
Base class for IXN router (e.g. OSPF router etc.).
-
interface_attribute
= 'interfaces'¶
-
-
class
ixnetwork.ixn_protocol.
IxnProtocolServer
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocol
Base class for IXN protocol server (e.g. IGMP Querier, MLD Host etc.).
-
class
ixnetwork.ixn_protocol.
IxnRouteRange
(**data)[source]¶ Bases:
ixnetwork.ixn_object.IxnObject
,trafficgenerator.tgn_object.TgnL3
Base class for IXN route ranges.
-
class
ixnetwork.ixn_protocol.
IxnStpBridge
(**data)[source]¶ Bases:
ixnetwork.ixn_protocol.IxnProtocolRouter
Represents IXN STP bridge.
-
interface_attribute
= 'interfaceId'¶
-
objType
= 'bridge'¶
-
ixnetwork.ixn_protocol_stack module¶
Classes and utilities to manage IXN protocol stack objects.
@author yoram@ignissoft.com
ixnetwork.ixn_root module¶
@author yoram@ignissoft.com
ixnetwork.ixn_statistics_view module¶
@author yoram@ignissoft.com
-
class
ixnetwork.ixn_statistics_view.
IxnStatisticsView
(view)[source]¶ Bases:
object
Base class for all statistics view.
Note that Flow Statistics are poorly supported in this version as the object name spans over multiple column.
-
get_counter
(obj_name, counter_name)[source]¶ Parameters: - counter_name – requested counter name.
- stat_name – requested statistics name.
Returns: int, the value of the requested counter for the requested object.
-
get_counters
(counter_name)[source]¶ Parameters: stat_name – requested counter name. Returns: ints, all values of the requested counter for all objects.
-
get_object_stats
(obj_name)[source]¶ Parameters: obj_name – requested object name Returns: all statistics values for the requested object.
-
get_stat
(obj_name, stat_name)[source]¶ Parameters: - obj_name – requested object name.
- stat_name – requested statistics name.
Returns: str, the value of the requested statics for the requested object.
-
ixnetwork.ixn_topology module¶
@author yoram@ignissoft.com
-
class
ixnetwork.ixn_topology.
IxnDeviceGroup
(**data)[source]¶ Bases:
ixnetwork.ixn_topology.IxnTopologyBaseClass
Represents IXN device group.
-
class
ixnetwork.ixn_topology.
IxnMultivalueBase
(**data)[source]¶ Bases:
ixnetwork.ixn_topology.IxnTopologyBaseClass
Represents IXN device group.
-
class
ixnetwork.ixn_topology.
IxnNextGenProtocol
(**data)[source]¶ Bases:
ixnetwork.ixn_topology.IxnTopologyBaseClass
Represents IXN device group.
-
class
ixnetwork.ixn_topology.
IxnNgpfEthernet
(**data)[source]¶ Bases:
ixnetwork.ixn_topology.IxnNextGenProtocol
-
protocol
= 'ethernet'¶
-
-
class
ixnetwork.ixn_topology.
IxnNgpfIpv4
(**data)[source]¶ Bases:
ixnetwork.ixn_topology.IxnNextGenProtocol
-
protocol
= 'ipv4'¶
-
-
class
ixnetwork.ixn_topology.
IxnTopology
(**data)[source]¶ Bases:
ixnetwork.ixn_topology.IxnTopologyBaseClass
Represents IXN topology.
Currently supports topology under single port only.
-
class
ixnetwork.ixn_topology.
IxnTopologyBaseClass
(**data)[source]¶ Bases:
ixnetwork.ixn_object.IxnObject
-
action_2_status
= {'start': 'started', 'stop': 'notStarted'}¶
-
ixnetwork.ixn_traffic module¶
@author yoram@ignissoft.com
-
class
ixnetwork.ixn_traffic.
IxnFlowGroup
(**data)[source]¶ Bases:
ixnetwork.ixn_object.IxnObject
Base class for all IXN flow groups.
-
class
ixnetwork.ixn_traffic.
IxnL23FlowGroup
(**data)[source]¶ Bases:
ixnetwork.ixn_traffic.IxnFlowGroup
L23 flow group
-
class
ixnetwork.ixn_traffic.
IxnL23QuickFlowGroup
(**data)[source]¶ Bases:
ixnetwork.ixn_traffic.IxnFlowGroup
L23 quick flow group
-
class
ixnetwork.ixn_traffic.
IxnL23TrafficItem
(**data)[source]¶ Bases:
ixnetwork.ixn_traffic.IxnTrafficItem
L23 traffic item.
-
class
ixnetwork.ixn_traffic.
IxnQuickTrafficItem
(**data)[source]¶ Bases:
ixnetwork.ixn_traffic.IxnTrafficItem
L23 traffic item.
Module contents¶
@author yoram@ignissoft.com