Module network :: Class Interface
[hide private]
[frames] | no frames]

Class Interface

source code

   object --+    
            |    
base.AxObject --+
                |
               Interface


Implementation of the aXAPI network.interface.* method to 
manage the interface configuration as getAll/get/set/ipv4.add/ipv4.delete/ipv6.add/ipv6.delete, 
and interface global.set/global.get 

Usage:
    # interface with options:
    # port_num         (required) interface number
    # type             interface type, always be ‘ethernet’
    # name             interface name
    # status           interface status, disabled(0) or enabled(1)
    # mac_addr         interface MAC address
    # duplexity        interface duplexity setting, ‘auto’,’ half’ or ‘full’
    # speed            interface speed setting, ‘auto’, ‘10M’, ‘100M’ or ‘1G’
    # flow_ctl         flow control
    # normal_rate      ICMP normal rate, if this option is set, ICMP rate limit is enabled, if
    #                  this option is not set, ICMP rate limit is disabled on this virtual port.
    # lockup_rate      ICMP lockup rate
    # lockup_period    ICMP lockup period
    # ipv4_addr_list   tag for the collection of interface IPv4 info list
    #     ipv4_addr         IPv4 address of this interface
    #     ipv4_mask         IPv4 mask
    # ipv4_acl         IPv4 access list
    # ipv6_addr_list   tag for the collection of interface IPv6 info list
    #     ipv6_addr                     interface IPv6 address
    #     ipv6_prefix_len               interface IPv6 prefix length
    #     ipv6_is_any_cast_addr         yes(1), no(0)
    #     ipv6_auto_link_local          whether to link local address automatic or not
    #     ipv6_link_local_config        tag for interfaces IPv6 link local configuration.
    #         ipv6_link_local_addr            IPv6 link local address
    #         ipv6_link_local_prefix          IPv6 link local prefix length
    #         ipv6_link_local_is_any_cast     yes(1), no(0)
    # ipv6_acl                  IPv6 access list
    # allow_promiscuous_vip     allow promiscuous VIP status, disabled(0) or enabled(1)
    # tcp_sync_cookie           TCP syn cookie status, disabled(0) or enabled(1)
    # ha_status                 interface HA status, disabled(0) or enabled(1)
    # ha_type                   none(0), router-interface(1), server-interface(2) or both(3)
    # ha_heartbeat              status when HA status enabled, disabled(0) or enabled(1)
    # ha_vlan                   vlan id, only when interface HA status is enabled(1)
    
    # Example: 

Instance Methods [hide private]
 
configure(self)
method: network.interface.set Configure an interface.
source code
 
deleteIpv4Address(self, addr, mask)
method: network.interface.ipv4.delete Delete the IPv4 address, addr/mask for given interface.
source code
 
addIpv4Address(self, addr, mask)
method: network.interface.ipv4.add Add the IPv4 address, addr/mask for given interface.
source code
 
deleteIpv6Address(self, v6_addr, v6_addr_prefix_len)
method: network.interface.ipv6.delete Delete the IPv6 address, v6_addr/v6_addr_prefix_len for given interface.
source code
 
addIpv6Address(self, v6_addr, v6_addr_prefix_len)
method: network.interface.ipv6.add Add the IPv6 address, v6_addr/v6_addr_prefix_len for given interface.
source code
 
deleteAllIPv4Addr(self) source code
 
deleteAllIPv6Addr(self) source code

Inherited from base.AxObject: __getattr__, __getitem__, __init__, __repr__, __setattr__, __setitem__, __str__, dump, getInfo, getObjectDict, getRequestPostDataJson, getRequestPostDataXml

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Static Methods [hide private]
 
getAll()
method : network.interface.getAll Returns a list of interface configuration in Interface instance.
source code
 
get(port_num)
method: network.interface.get Get the interface configuration by given port number.
source code
Class Variables [hide private]
  __display__ = ['port_num', 'status', 'name']
  __obj_name__ = 'interface'
  __xml_convrt__ = {'interface_list': 'interface', 'ipv4_addr_li...

Inherited from base.AxObject: __obj_readonly__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get(port_num)
Static Method

source code 

method: network.interface.get Get the interface configuration by given port number.

Overrides: base.AxObject.get

Class Variable Details [hide private]

__xml_convrt__

Value:
{'interface_list': 'interface',
 'ipv4_addr_list': 'ipv4',
 'ipv6_addr_list': 'ipv6'}