Skip to content

Show Environment All - C9400s #958

@aknopper

Description

@aknopper

In src/genie/libs/parser/iosxe/cat9k/c9400/show_platform.py, it is not accounting for there being multiple switches with power supplies and fans.

Example from my 9400 with two switches:

Switch:1
 
Power                                                       Fan States
Supply  Model No              Type  Capacity  Status        1     2
------  --------------------  ----  --------  ------------  -----------
PS1     C9400-PWR-3200AC      ac    3200 W    active        good  good
PS2     C9400-PWR-3200AC      ac    3200 W    active        good  good
 
PS Current Configuration Mode : Combined
PS Current Operating State    : Combined
 
Power supplies currently active    : 2
Power supplies currently available : 2
 
 
Switch:2
 
Power                                                       Fan States
Supply  Model No              Type  Capacity  Status        1     2
------  --------------------  ----  --------  ------------  -----------
PS1     C9400-PWR-3200AC      ac    3200 W    active        good  good
PS2     C9400-PWR-3200AC      ac    3200 W    active        good  good
 
PS Current Configuration Mode : Combined
PS Current Operating State    : Combined
 
Power supplies currently active    : 2
Power supplies currently available : 2


Switch 1:
Fantray : good
Power consumed by Fantray : 540 Watts
Fantray airflow direction : side-to-side
Fantray beacon LED: off
Fantray status LED: green
SYSTEM : GREEN
Switch 2:
Fantray : good
Power consumed by Fantray : 540 Watts
Fantray airflow direction : side-to-side
Fantray beacon LED: off
Fantray status LED: green
SYSTEM : GREEN

Current schema:

'power_supply': {
            'slot': {
                Any(): {
                    'model_no': str,
                    'type': str,
                    'capacity': str,
                    'status': str,
                    'fan_1_state': str,
                    'fan_2_state': str,
                }
            },
            'current_configuration_mode': str,
            'current_operating_state': str,
            'currently_active': int,
            'currently_available': int,
        },
        'fantray': {
            'status': str,
            'power_consumed_by_fantray_watts': int,
            'fantray_airflow_direction': str,
            'fantray_beacon_led': str,
            'fantray_status_led': str,
            'system': str,
        }

I am thinking a "Switch" variable can come before power_supply and fantray, which can then track the multiple entries which could exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions