Skip to content

canu report

Canu report commands.

canu report [OPTIONS] COMMAND [ARGS]...

network

Commands that report on the entire network.

canu report network [OPTIONS] COMMAND [ARGS]...

cabling

Report the cabling of all switches (Aruba, Dell, or Mellanox) on the network by using LLDP.

Pass in either a comma separated list of IP addresses using the –ips option

OR

Pass in a file of IP addresses with one address per line.

There are three different connection types that will be shown in the results.

  1. ‘===>’ Outbound connections

  2. ‘<===’ Inbound connections

  3. ‘<==>’ Bi-directional connections

There are two different ‘–view’ options, ‘switch’ and ‘equipment’.

  1. The ‘–view switch’ option displays a table for every switch IP address passed in showing connections.

  2. The ‘–view equipment’ option displays a table for each mac address connection. This means that servers and switches will both display incoming and outgoing connections.

If the neighbor name is not in LLDP, the IP and vlan information are displayed by looking up the MAC address in the ARP table and mac address table.

If there is a duplicate port, the duplicates will be highlighted in ‘bright white’.

Ports highlighted in ‘blue’ contain the string “ncn” in the hostname.

Ports are highlighted in ‘green’ when the port name is set with the interface name.

noqa: D301

Args:

ctx: CANU context settings
ips: Comma separated list of IPv4 addresses of switches
ips_file: File with one IPv4 address per line
username: Switch username
password: Switch password
view: View of the cabling results.
kea_lease_file: Name of the JSON file containing Kea leases
sls_file: Name of the JSON file containing SLS system data
smd_file: Name of the JSON file containing SMD ethernetInterfaces
heuristic_lookups: Turn off annotations to LLDP data based on common device use


```
log_
```

: Level of logging.
out: Name of the output file
canu report network cabling [OPTIONS]

Options

--ips( )

Comma separated list of IPv4 addresses of switches

--ips-file( )

File with one IPv4 address per line

--username( )

Switch username

  • Default

    admin

--password( )

Switch password

--view( )

View of the cabling results.

  • Default

    switch

  • Options

    switch | equipment

--kea-lease-file( )

Kea leases in JSON format from API call used for MAC-to-hostname lookups.

--sls-file( )

SLS file in JSON format from API call used for MAC-to-hostname lookups.

--smd-file( )

SMD ethernetInterfaces in JSON format from API call used for MAC-to-hostname lookups.

--heuristic-lookups()

Make educated guesses and hints about what device is based on MAC.

--log( )

Level of logging.

  • Options

    DEBUG | INFO | WARNING | ERROR

--out( )

Output results to a file

firmware

Report the firmware versions of all switches (Aruba, Dell, or Mellanox) on the network.

Pass in either a comma separated list of IP addresses using the ‘–ips’ option

OR

Pass in a file of IP addresses with one address per line using the ‘–ips-file’ option

There are three different statuses found in the report.

  • 🛶 Pass: Indicates that the switch passed the firmware verification.

  • ❌ Fail: Indicates that the switch failed the firmware verification, in the generated table, a list of expected firmware versions for that switch is displayed.

  • 🔺 Error: Indicates that there was an error connecting to the switch, check the Errors table for the specific error.


noqa: D301, B950

Args:

ctx: CANU context settings
csm: CSM version
ips: Comma separated list of IPv4 addresses of switches
ips_file: File with one IPv4 address per line
username: Switch username
password: Switch password


```
json_
```

: Bool indicating json output
out: Name of the output file

Returns:

json_formatted: If JSON is selected, returns output
canu report network firmware [OPTIONS]

Options

--csm( )

Required CSM network version

  • Options

    1.0 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6

--ips( )

Comma separated list of IPv4 addresses of switches

--ips-file( )

File with one IPv4 address per line

--username( )

Switch username

  • Default

    admin

--password( )

Switch password

--json()

Output JSON

--out( )

Output results to a file

version

Report Switch Version.

Args:

ctx: CANU context settings
username: Switch username
password: Switch password
sls_file: JSON file containing SLS data
sls_address: The address of SLS
network: The network that is used to connect to the switches.


```
log_
```

: enable logging
canu report network version [OPTIONS]

Options

--sls-file( )

File containing system SLS JSON data.

--network( )

The network that is used to connect to the switches.

  • Default

    HMN

  • Options

    HMN | CMN

--log()

enable logging.

--username( )

Switch username

  • Default

    admin

--password( )

Switch password

--sls-address( )

  • Default

    api-gw-service-nmn.local

switch

Report switch commands.

canu report switch [OPTIONS] COMMAND [ARGS]...

cabling

Report the live cabling of a switch on the network by using LLDP.

LLDP data which is missing the neighbor hostname will optionally be filled out with data from Kea, SLS, SMD and heuristic hints - in that order if all data sources are provided. If there is a duplicate port, the duplicates will be highlighted in ‘bright white’.

Ports highlighted in ‘blue’ contain the string “ncn” in the hostname.

Ports are highlighted in ‘green’ when the port name is set with the interface name.


noqa: D301, B950

Args:

ctx: CANU context settings
ip: Switch IPv4 address
username: Switch username
password: Switch password
kea_lease_file: Name of the JSON file containing Kea leases
sls_file: Name of the JSON file containing SLS system data
smd_file: Name of the JSON file containing SMD ethernetInterfaces
heuristic_lookups: Turn off annotations to LLDP data based on common device use


```
log_
```

: Level of logging.
out: Name of the output file
canu report switch cabling [OPTIONS]

Options

--ip( )

Required The IP address of the switch

--username( )

Switch username

  • Default

    admin

--password( )

Switch password

--kea-lease-file( )

Kea leases in JSON format from API call used for MAC-to-hostname lookups.

--sls-file( )

SLS file in JSON format from API call used for MAC-to-hostname lookups.

--smd-file( )

SMD ethernetInterfaces in JSON format from API call used for MAC-to-hostname lookups.

--heuristic-lookups()

Make educated guesses and hints about what device is based on MAC.

--log( )

Level of logging.

  • Options

    DEBUG | INFO | WARNING | ERROR

--out( )

Output results to a file

firmware

Report the firmware of a switch (Aruba, Dell, or Mellanox) on the network.

There are two different statuses that might be indicated.

  • 🛶 - Pass: Indicates that the switch passed the firmware verification.

  • ❌ - Fail: Indicates that the switch failed the firmware verification. A list of expected firmware versions will be displayed.


noqa: D301, B950

Args:

ctx: CANU context settings
csm: CSM version
ip: Switch IPv4 address
username: Switch username
password: Switch password


```
json_
```

: Bool indicating json output
verbose: Bool indicating verbose output
out: Name of the output file
canu report switch firmware [OPTIONS]

Options

--csm( )

Required CSM network version

  • Options

    1.0 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6

--ip( )

Required The IP address of the switch

--username( )

Switch username

  • Default

    admin

--password( )

Switch password

--json()

Output JSON

--verbose()

Verbose mode

--out( )

Output results to a file