community.network.ce_link_status module – Get interface link status on HUAWEI CloudEngine switches.
Note
This module is part of the community.network collection (version 5.0.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.ce_link_status
.
Synopsis
Get interface link status on HUAWEI CloudEngine switches.
Aliases: network.cloudengine.ce_link_status
Parameters
Parameter |
Comments |
---|---|
For the interface parameter, you can enter |
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.
This module requires the netconf system service be enabled on the remote device being managed.
Recommended connection is
netconf
.This module also works with
local
connections for legacy playbooks.
Examples
- name: Link status test
hosts: cloudengine
connection: local
gather_facts: false
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: Get specified interface link status information
community.network.ce_link_status:
interface: 40GE1/0/1
provider: "{{ cli }}"
- name: Get specified interface type link status information
community.network.ce_link_status:
interface: 40GE
provider: "{{ cli }}"
- name: Get all interfaces link status information
community.network.ce_link_status:
interface: all
provider: "{{ cli }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Interface link status information Returned: always Sample: |