diff options
author | hagbard <vyosdev@derith.de> | 2019-08-21 10:27:57 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2019-08-21 10:27:57 -0700 |
commit | ee2625a5c35fe670ad7cf43059ee75aba3dfa25f (patch) | |
tree | 0f143c1e65948c5e033fd0ca586aa8931ab07aaf /docs/contributing | |
parent | eb5464fccabbc454d2e9e357e20555a4f55aaf00 (diff) | |
download | vyos-documentation-ee2625a5c35fe670ad7cf43059ee75aba3dfa25f.tar.gz vyos-documentation-ee2625a5c35fe670ad7cf43059ee75aba3dfa25f.zip |
[interfaceconfig] - macaddr, mtu and ifalias properties
Diffstat (limited to 'docs/contributing')
-rw-r--r-- | docs/contributing/vyos-api/interface-config.rst | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/docs/contributing/vyos-api/interface-config.rst b/docs/contributing/vyos-api/interface-config.rst index 547f7b8b..cfd7c03a 100644 --- a/docs/contributing/vyos-api/interface-config.rst +++ b/docs/contributing/vyos-api/interface-config.rst @@ -75,7 +75,6 @@ An interfaces ifalias variable is empty by default, but the variable is used for interface_instance = Interface("eth2") interface_instance.ifalias = "interface_alias" print (interface_instance.ifalias) - print (interface_instance.get_alias()) .. code-block:: sh @@ -84,10 +83,6 @@ An interfaces ifalias variable is empty by default, but the variable is used for link/ether 08:00:27:70:9c:a3 brd ff:ff:ff:ff:ff:ff alias interface_alias -get_alias() -~~~~~~~~~~~ -Reads the ifalias variable directly from the /sys/class/net/<interface>/ifalias and can be used to determine in a config a new value and what value is set in in the system. - del_alias() ~~~~~~~~~~~ Removes any content from the ifalias variable. @@ -135,11 +130,9 @@ Sets the mac address on a network interface. .. code-block:: sh - interface_instance.linkstate = 'up' - -get_macaddr() -~~~~~~~~~~~~~ -Returns the mac address of a network interface. + interface_instance.macaddr = '08:00:27:0e:6d:16' + ''' show current mac address set on the interface ''' + print(interface_instance.macaddr) Interface MTU ^^^^^^^^^^^^^ @@ -148,11 +141,8 @@ Sets the MTU on a network interface. .. code-block:: sh interface_instance.mtu = 9000 - - -get_mtu(self) -~~~~~~~~~~~~~ -Returns the MTU of a network interface. + ''' read mtu from interfacr + print(interface_instance.mtu) add_ipv4_addr(ipaddr=[]): |