Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

IPports API returns wrong address #48

@PeiwenChen

Description

@PeiwenChen

@ganeshnalawade
The IPports API returns wrong address. Please fix it.

Junos::Ez::IPports::Provider(ndev, :ip_ports)
ip_interfaces = ndev.ip_ports.catalog
puts ip_interfaces

It prints this

xxx
"vlan.97"=>{:_active=>true, :_exist=>true, :admin=>:up, :address=>"172.11.0.1/16172.11.0.16/16"}}

The address is wrong, it should be seperated with comma:
172.11.0.1/16, 172.11.0.16/16

This is what I saw on the router. There are two <ifa-local> addresses.

<physical-interface>
            <name>vlan</name>
            <admin-status>up</admin-status>
            <oper-status>up</oper-status>
            <logical-interface>
                <name>vlan.97</name>
                <admin-status>up</admin-status>
                <oper-status>up</oper-status>
                <filter-information>
                </filter-information>
                <address-family>
                    <address-family-name>inet</address-family-name>
                    <interface-address>
                        <ifa-local junos:emit="emit">172.11.0.1/16</ifa-local>
                    </interface-address>
                    <interface-address>
                        <ifa-local junos:emit="emit">172.11.0.16/16</ifa-local>
                    </interface-address>
                </address-family>       
            </logical-interface>
        </physical-interface>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions