napalm: Junos SRX cluster get_environment() returns null. 15.1X49-D130.6

Description of Issue/Question

Note: Please check https://guides.github.com/features/mastering-markdown/ to see how to properly format your request.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

(Place an x between the square brackets where applicable)

  • Yes
  • [] No

Setup

napalm version

(Paste verbatim output from pip freeze | grep napalm between quotes below)

napalm==2.5.0

Network operating system version

(Paste verbatim output from show version - or equivalent - between quotes below)

node0:
--------------------------------------------------------------------------
Hostname: node0
Model: srx345-dual-ac
Junos: 15.1X49-D130.6
JUNOS Software Release [15.1X49-D130.6]

node1:
--------------------------------------------------------------------------
Hostname: node1
Model: srx345-dual-ac
Junos: 15.1X49-D130.6
JUNOS Software Release [15.1X49-D130.6]

Steps to Reproduce the Issue

Error Traceback

(Paste the complete traceback of the exception between quotes below)

No errors, per se.  Just empty dataset being returned.

I inspected the elements at:
https://github.com/napalm-automation/napalm/blob/develop/napalm/junos/junos.py#L381

And also `environment_data` at:
https://github.com/napalm-automation/napalm/blob/develop/napalm/junos/junos.py#L381

All elements are empty.  I confirmed connectivity and results being returned with the `get_facts()` which does indeed work as desired.


About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (10 by maintainers)

Commits related to this issue

Most upvoted comments

It doesn’t seem to be supported on the SRX platform with fixed power supplies. I would suspect it’s relying on the routing-engine data. I can’t find any command to gather more info for the branch devices.

That’s an interesting idea. I hadn’t thought to examine the cli data. And, not surprisingly, it looks like JNPR is doing the wrong thing.

show chassis environment | display xml

<rpc-reply xmlns:junos="http://xml.juniper.net/junos/15.1X49/junos">
    <multi-routing-engine-results>

        <multi-routing-engine-item>

            <re-name>node0</re-name>

            <environment-information xmlns="http://xml.juniper.net/junos/15.1X49/junos-chassis">
                <environment-item>
                    <name>Routing Engine</name>
                    <class>Temp</class>
                    <status>OK</status>
                    <temperature junos:celsius="39">39 degrees C / 102 degrees F</temperature>
                </environment-item>
                <environment-item>
                    <name>Routing Engine CPU</name>
                    <status>OK</status>
                    <temperature junos:celsius="68">68 degrees C / 154 degrees F</temperature>
                </environment-item>
                <environment-item>
                    <name>SRX340 Chassis fan 0</name>
                    <class>Fans</class>
                    <status>OK</status>
                    <comment>Spinning at normal speed</comment>
                </environment-item>
                <environment-item>
                    <name>SRX340 Chassis fan 1</name>
                    <class>Fans</class>
                    <status>OK</status>
                    <comment>Spinning at normal speed</comment>
                </environment-item>
                <environment-item>
                    <name>SRX340 Chassis fan 2</name>
                    <class>Fans</class>
                    <status>OK</status>
                    <comment>Spinning at normal speed</comment>
                </environment-item>
                <environment-item>
                    <name>SRX340 Chassis fan 3</name>
                    <class>Fans</class>
                    <status>OK</status>
                    <comment>Spinning at normal speed</comment>
                </environment-item>
                <environment-item>
                    <name>Power Supply 0</name>
                    <class>Power</class>
                    <status>OK</status>
                </environment-item>
                <environment-item>
                    <name>Power Supply 1</name>
                    <class>Power</class>
                    <status>OK</status>
                </environment-item>
            </environment-information>
        </multi-routing-engine-item>

        <multi-routing-engine-item>

            <re-name>node1</re-name>

            <environment-information xmlns="http://xml.juniper.net/junos/15.1X49/junos-chassis">
                <environment-item>
                    <name>Routing Engine</name>
                    <class>Temp</class>
                    <status>OK</status>
                    <temperature junos:celsius="43">43 degrees C / 109 degrees F</temperature>
                </environment-item>
                <environment-item>
                    <name>Routing Engine CPU</name>
                    <status>OK</status>
                    <temperature junos:celsius="71">71 degrees C / 159 degrees F</temperature>
                </environment-item>
                <environment-item>
                    <name>SRX340 Chassis fan 0</name>
                    <class>Fans</class>
                    <status>OK</status>
                    <comment>Spinning at normal speed</comment>
                </environment-item>
                <environment-item>
                    <name>SRX340 Chassis fan 1</name>
                    <class>Fans</class>
                    <status>OK</status>
                    <comment>Spinning at normal speed</comment>
                </environment-item>
                <environment-item>
                    <name>SRX340 Chassis fan 2</name>
                    <class>Fans</class>
                    <status>OK</status>
                    <comment>Spinning at normal speed</comment>
                </environment-item>
                <environment-item>
                    <name>SRX340 Chassis fan 3</name>
                    <class>Fans</class>
                    <status>OK</status>
                    <comment>Spinning at normal speed</comment>
                </environment-item>
                <environment-item>
                    <name>Power Supply 0</name>
                    <class>Power</class>
                    <status>OK</status>
                </environment-item>
                <environment-item>
                    <name>Power Supply 1</name>
                    <class>Power</class>
                    <status>OK</status>
                </environment-item>
            </environment-information>
        </multi-routing-engine-item>

    </multi-routing-engine-results>
    <cli>
        <banner>{primary:node0}</banner>
    </cli>
</rpc-reply>

show chassis environment | display xml rpc

<rpc-reply xmlns:junos="http://xml.juniper.net/junos/15.1X49/junos">
    <rpc>
        <get-environment-information>
        </get-environment-information>
    </rpc>
    <cli>
        <banner>{primary:node0}</banner>
    </cli>
</rpc-reply>