diff options
author | hagbard <vyosdev@derith.de> | 2019-08-21 19:13:02 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2019-08-21 19:13:02 -0700 |
commit | 30dab3a6201976ec220f0d9e1371ea2496601b26 (patch) | |
tree | d3a76e68dd1e9eafbe4b6c581c810120a1cd21e0 | |
parent | ee2625a5c35fe670ad7cf43059ee75aba3dfa25f (diff) | |
download | vyos-documentation-30dab3a6201976ec220f0d9e1371ea2496601b26.tar.gz vyos-documentation-30dab3a6201976ec220f0d9e1371ea2496601b26.zip |
[interfaceconfig] - linkstate callable via property
-rw-r--r-- | docs/contributing/vyos-api/interface-config.rst | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/docs/contributing/vyos-api/interface-config.rst b/docs/contributing/vyos-api/interface-config.rst index cfd7c03a..f4e06c14 100644 --- a/docs/contributing/vyos-api/interface-config.rst +++ b/docs/contributing/vyos-api/interface-config.rst @@ -107,7 +107,7 @@ Sets an interface state either to adminitrativly up or down, regardless of the r interface_instance = Interface("eth2") interface_instance.linkstate = 'up' print (interface_instance.linkstate) - print (interface_instance.get_link_state()) + print (interface_instance.linkstate) .. code-block:: sh @@ -115,11 +115,6 @@ Sets an interface state either to adminitrativly up or down, regardless of the r ip link show dev eth2 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 -get_link_state() -~~~~~~~~~~~~~~~~ -Returns the link status of an interface which can be either ``up``, ``down`` or ``unknown``. The link status ``unknown`` is often visible on uninitialized wireguard interfaces, once traffic was successfully sent and received it will change to state ``up``. However, it is not recommended to assume that wireguard is correctly configured by the interface status, since multiple peers can be configured on a single interface and if only 1 out of 10 is working, the interface status will shown as ``up``. - - remove_interface() ^^^^^^^^^^^^^^^^^^ Removes an interface from the system, given as parameter of the objects instance. @@ -141,7 +136,7 @@ Sets the MTU on a network interface. .. code-block:: sh interface_instance.mtu = 9000 - ''' read mtu from interfacr + ''' read mtu from interface ''' print(interface_instance.mtu) |