ce_link_status - Get interface link status on HUAWEI CloudEngine switches.

Synopsis

  • Get interface link status on HUAWEI CloudEngine switches.

Options

parameter required default choices comments
interface
yes
For the interface parameter, you can enter all to display information about all interface, an interface type such as 40GE to display information about interfaces of the specified type, or full name of an interface such as 40GE1/0/22 or vlanif10 to display information about the specific interface.

Examples

- name: Link status test
  hosts: cloudengine
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli

  tasks:

  - name: Get specified interface link status information
    ce_link_status:
      interface: 40GE1/0/1
      provider: "{{ cli }}"

  - name: Get specified interface type link status information
    ce_link_status:
      interface: 40GE
      provider: "{{ cli }}"

  - name: Get all interface link status information
    ce_link_status:
      interface: all
      provider: "{{ cli }}"

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
result
Interface link status information
always dict {'40ge2/0/8': {'Outbound drop(pkts)': '0', 'Inbound rate(pkts/sec)': '0', 'Outbound error(pkts)': '0', 'Outbound broadcast(pkts)': '1', 'Outbound multicast(pkts)': '20152', 'Outbound rate(byte/sec)': '11', 'Inbound multicast(pkts)': '20151', 'Current IPv4 state': 'down', 'Inbound error(pkts)': '0', 'Outbound octets(bytes)': '7235021', 'Current IPv6 state': 'down', 'Inbound unicast(pkts)': '0', 'Current physical state': 'up', 'Inbound broadcast(pkts)': '0', 'Current link state': 'up', 'Outbound rate(pkts/sec)': '0', 'Inbound octets(bytes)': '7314813', 'Outbound unicast(pkts)': '0', 'Inbound drop(pkts)': '0', 'Speed': '40GE', 'Inbound rate(byte/sec)': '11'}}

Notes

Note

  • Current physical state shows an interface’s physical status.
  • Current link state shows an interface’s link layer protocol status.
  • Current IPv4 state shows an interface’s IPv4 protocol status.
  • Current IPv6 state shows an interface’s IPv6 protocol status.
  • Inbound octets(bytes) shows the number of bytes that an interface received.
  • Inbound unicast(pkts) shows the number of unicast packets that an interface received.
  • Inbound multicast(pkts) shows the number of multicast packets that an interface received.
  • Inbound broadcast(pkts) shows the number of broadcast packets that an interface received.
  • Inbound error(pkts) shows the number of error packets that an interface received.
  • Inbound drop(pkts) shows the total number of packets that were sent to the interface but dropped by an interface.
  • Inbound rate(byte/sec) shows the rate at which an interface receives bytes within an interval.
  • Inbound rate(pkts/sec) shows the rate at which an interface receives packets within an interval.
  • Outbound octets(bytes) shows the number of the bytes that an interface sent.
  • Outbound unicast(pkts) shows the number of unicast packets that an interface sent.
  • Outbound multicast(pkts) shows the number of multicast packets that an interface sent.
  • Outbound broadcast(pkts) shows the number of broadcast packets that an interface sent.
  • Outbound error(pkts) shows the total number of packets that an interface sent but dropped by the remote interface.
  • Outbound drop(pkts) shows the number of dropped packets that an interface sent.
  • Outbound rate(byte/sec) shows the rate at which an interface sends bytes within an interval.
  • Outbound rate(pkts/sec) shows the rate at which an interface sends packets within an interval.
  • Speed shows the rate for an Ethernet interface.

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/ce_link_status_module.html