Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the file to support Cap F on output #156

Merged
merged 2 commits into from
Jan 21, 2019

Conversation

amb1s1
Copy link
Contributor

@amb1s1 amb1s1 commented Oct 11, 2017

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

juniper_junos_show_interfaces.template

SUMMARY

Support the matching of subinterfaces on Juniper 2200 switches.

Before no sub-interfaces

    "interfaces": {
        "changed": false,
        "failed": false,
        "response": [
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/0",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/1",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/2",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/3",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/4",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/5",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/6",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/7",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/8",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/9",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/10",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/11",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/12",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/13",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/14",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/15",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/16",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/17",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/18",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/19",
                "link_status": "Down",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/20",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/21",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/22",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/23",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "bme0",
                "link_status": "Up",
                "mtu": "1576"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Software-Pseudo",
                "interface": "dsc",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "GRE",
                "interface": "gre",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "IP-over-IP",
                "interface": "ipip",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "VLAN",
                "interface": "jsrv",
                "link_status": "Up",
                "mtu": "1518"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Loopback",
                "interface": "lo0",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "LSI",
                "interface": "lsi",
                "link_status": "Up",
                "mtu": "1496"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "me0",
                "link_status": "Down",
                "mtu": "1514"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "GRE",
                "interface": "mtun",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "PIM-Decapsulator",
                "interface": "pimd",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "PIM-Encapsulator",
                "interface": "pime",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Interface-Specific",
                "interface": "tap",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "VLAN",
                "interface": "vlan",
                "link_status": "Up",
                "mtu": "1518"
            }
        ],
        "response_list": []
    }
}
```

After showing the sub-interfaces

```
"interfaces": {
        "changed": false,
        "failed": false,
        "response": [
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/0",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/0.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/1",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/1.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/2",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/2.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/3",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/3.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/4",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/4.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/5",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/5.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/6",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/6.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/7",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/7.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/8",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/8.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/9",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/9.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/10",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/10.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/11",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/11.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/12",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/12.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/13",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/13.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/14",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/14.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/15",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/15.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/16",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/16.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/17",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/17.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/18",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/18.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/19",
                "link_status": "Down",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/19.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/20",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/20.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/21",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/21.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/22",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/22.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "ge-0/0/23",
                "link_status": "Up",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "ge-0/0/23.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "bme0",
                "link_status": "Up",
                "mtu": "1576"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "bme0.32768",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Software-Pseudo",
                "interface": "dsc",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "GRE",
                "interface": "gre",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "IP-over-IP",
                "interface": "ipip",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "VLAN",
                "interface": "jsrv",
                "link_status": "Up",
                "mtu": "1518"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "jsrv.1",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Loopback",
                "interface": "lo0",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "LSI",
                "interface": "lsi",
                "link_status": "Up",
                "mtu": "1496"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Ethernet",
                "interface": "me0",
                "link_status": "Down",
                "mtu": "1514"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "me0.0",
                "link_status": "",
                "mtu": ""
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "GRE",
                "interface": "mtun",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "PIM-Decapsulator",
                "interface": "pimd",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "PIM-Encapsulator",
                "interface": "pime",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "Interface-Specific",
                "interface": "tap",
                "link_status": "Up",
                "mtu": "Unlimited"
            },
            {
                "admin_state": "Enabled",
                "hardware_type": "VLAN",
                "interface": "vlan",
                "link_status": "Up",
                "mtu": "1518"
            },
            {
                "admin_state": "",
                "hardware_type": "",
                "interface": "vlan.153",
                "link_status": "",
                "mtu": ""
            }
        ],
        "response_list": []
    }
}
```

@GGabriele
Copy link
Contributor

Hi @amb1s1 , thanks for your PR!

Can you add a test case showing subinterfaces too? You can relate to this , just add one more raw file and a parsed one too

@itdependsnetworks
Copy link
Contributor

what he said :)

@itdependsnetworks
Copy link
Contributor

ping :)

@jmcgill298 jmcgill298 merged commit 91fe7a4 into networktocode:master Jan 21, 2019
jvanderaa pushed a commit that referenced this pull request Nov 10, 2021
* Update the file to support Cap F on output

* Add raw example for bug-fix PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants