forked from housepbass/napalm-panos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request napalm-automation-community#38 from napalm-automat…
…ion/develop Release 0.4.0
- Loading branch information
Showing
13 changed files
with
304 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ pytest-json | |
pytest-pythonpath | ||
pylama | ||
flake8-import-order | ||
tox | ||
-r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
napalm-base>=0.18.0 | ||
pan-python | ||
netmiko>=0.5.0 | ||
netmiko>=1.0.0 | ||
requests-toolbelt | ||
xmltodict | ||
future |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
[pylama] | ||
linters = mccabe,pep8,pyflakes | ||
ignore = D203,C901 | ||
skip = build/*,.tox/* | ||
|
||
[pylama:pep8] | ||
max_line_length = 100 | ||
|
||
[tool:pytest] | ||
addopts = --cov=./ -vs | ||
[pytest] | ||
addopts = --cov=napalm_panos --cov-report term-missing -vs --pylama | ||
json_report = report.json | ||
jsonapi = true | ||
|
||
[coverage:run] | ||
include = | ||
napalm_panos/* | ||
|
||
source = napalm_panos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
|
||
setup( | ||
name="napalm-panos", | ||
version="0.3.0", | ||
version="0.4.0", | ||
packages=find_packages(), | ||
author="Gabriele Gerbino", | ||
author_email="[email protected]", | ||
|
124 changes: 124 additions & 0 deletions
124
...lldp_neighbors/one_neigh_per_int/_show__lldp__neighbors_all__neighbors___lldp___show_.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
<response status="success"> | ||
<result> | ||
<entry name="ethernet1/15"> | ||
<local> | ||
<index>30</index> | ||
<port-id>15</port-id> | ||
</local> | ||
<neighbors> | ||
<entry name="006cbc0000004769312f302f32"> | ||
<chassis-type>MAC address</chassis-type> | ||
<chassis-id>00:6c:bc:00:00:00</chassis-id> | ||
<port-type>Interface name</port-type> | ||
<port-id>Gi1/0/2</port-id> | ||
<port-description>GigabitEthernet1/0/2</port-description> | ||
<ttl>116</ttl> | ||
<system-name>peer00.lab.demo</system-name> | ||
<system-description>mock system description</system-description> | ||
<system-capabilities>B, R, | ||
</system-capabilities> | ||
<enabled-capabilities>B, R, | ||
</enabled-capabilities> | ||
<management-address> | ||
<entry name="10.0.0.1"> | ||
<address-type>ipv4</address-type> | ||
<interface-number>0</interface-number> | ||
<interface-type>System Port Number</interface-type> | ||
</entry> | ||
</management-address> | ||
</entry> | ||
</neighbors> | ||
</entry> | ||
<entry name="ethernet1/16"> | ||
<local> | ||
<index>31</index> | ||
<port-id>16</port-id> | ||
</local> | ||
<neighbors> | ||
<entry name="006cbc0000014769322f302f32"> | ||
<chassis-type>MAC address</chassis-type> | ||
<chassis-id>00:6c:bc:00:00:00</chassis-id> | ||
<port-type>Interface name</port-type> | ||
<port-id>Gi2/0/2</port-id> | ||
<port-description>GigabitEthernet2/0/2</port-description> | ||
<ttl>107</ttl> | ||
<system-name>peer01.lab.demo</system-name> | ||
<system-description>mock system description</system-description> | ||
<system-capabilities>B, R, | ||
</system-capabilities> | ||
<enabled-capabilities>B, R, | ||
</enabled-capabilities> | ||
<management-address> | ||
<entry name="10.0.0.1"> | ||
<address-type>ipv4</address-type> | ||
<interface-number>0</interface-number> | ||
<interface-type>System Port Number</interface-type> | ||
</entry> | ||
</management-address> | ||
</entry> | ||
</neighbors> | ||
</entry> | ||
<entry name="ethernet1/13"> | ||
<local> | ||
<index>28</index> | ||
<port-id>13</port-id> | ||
</local> | ||
<neighbors> | ||
<entry name="44f477000000353138"> | ||
<chassis-type>MAC address</chassis-type> | ||
<chassis-id>44:f4:77:00:00:00</chassis-id> | ||
<port-type>Locally assigned</port-type> | ||
<port-id>518</port-id> | ||
<port-description>mockdescription</port-description> | ||
<ttl>92</ttl> | ||
<system-name>peer01.lab.demo</system-name> | ||
<system-description>mock system description | ||
</system-description> | ||
<system-capabilities>B, R, | ||
</system-capabilities> | ||
<enabled-capabilities>B, R, | ||
</enabled-capabilities> | ||
<management-address> | ||
<entry name="10.0.0.2"> | ||
<address-type>ipv4</address-type> | ||
<interface-number>1</interface-number> | ||
<interface-type>Ifindex</interface-type> | ||
<oid>0.1.3.6.1.2.1.31.1.1.1.1.1.</oid> | ||
</entry> | ||
</management-address> | ||
</entry> | ||
</neighbors> | ||
</entry> | ||
<entry name="ethernet1/14"> | ||
<local> | ||
<index>29</index> | ||
<port-id>14</port-id> | ||
</local> | ||
<neighbors> | ||
<entry name="44f477000001353138"> | ||
<chassis-type>MAC address</chassis-type> | ||
<chassis-id>44:f4:77:00:00:01</chassis-id> | ||
<port-type>Locally assigned</port-type> | ||
<port-id>518</port-id> | ||
<port-description>mockdescription</port-description> | ||
<ttl>110</ttl> | ||
<system-name>peer02.lab.demo</system-name> | ||
<system-description>mock system description | ||
</system-description> | ||
<system-capabilities>B, R, | ||
</system-capabilities> | ||
<enabled-capabilities>B, R, | ||
</enabled-capabilities> | ||
<management-address> | ||
<entry name="10.0.0.3"> | ||
<address-type>ipv4</address-type> | ||
<interface-number>1</interface-number> | ||
<interface-type>Ifindex</interface-type> | ||
<oid>0.1.3.6.1.2.1.31.1.1.1.1.1.</oid> | ||
</entry> | ||
</management-address> | ||
</entry> | ||
</neighbors> | ||
</entry> | ||
</result> | ||
</response> |
1 change: 1 addition & 0 deletions
1
test/unit/mocked_data/test_get_lldp_neighbors/one_neigh_per_int/expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"ethernet1/13": [{"hostname": "peer01.lab.demo", "port": "518"}], "ethernet1/16": [{"hostname": "peer01.lab.demo", "port": "Gi2/0/2"}], "ethernet1/14": [{"hostname": "peer02.lab.demo", "port": "518"}], "ethernet1/15": [{"hostname": "peer00.lab.demo", "port": "Gi1/0/2"}]} |
14 changes: 14 additions & 0 deletions
14
..._route__type_bgp__type__destination_1.0.4.0_24__destination___route___routing___show_.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<response status="success"> | ||
<result> | ||
<flags>flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp, Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp</flags> | ||
<entry> | ||
<virtual-router>default</virtual-router> | ||
<destination>10.22.0.0/16</destination> | ||
<nexthop>10.0.0.1</nexthop> | ||
<metric/> | ||
<flags>A?B | ||
</flags> | ||
<age>2832970</age> | ||
<interface/></entry> | ||
</result> | ||
</response> |
1 change: 1 addition & 0 deletions
1
test/unit/mocked_data/test_get_route_to/one_route/expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"10.22.0.0/16": [{"protocol": "bgp", "last_active": false, "next_hop": "10.0.0.1", "outgoing_interface": "", "preference": -1, "inactive_reason": "", "current_active": true, "age": 2832970, "routing_table": "default", "selected_next_hop": false, "protocol_attributes": {}}]} |
34 changes: 34 additions & 0 deletions
34
..._route__type_bgp__type__destination_1.0.4.0_24__destination___route___routing___show_.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<response status="success"> | ||
<result> | ||
<flags>flags: A:active, ?:loose, C:connect, H:host, S:static, ~:internal, R:rip, O:ospf, B:bgp, Oi:ospf intra-area, Oo:ospf inter-area, O1:ospf ext-type-1, O2:ospf ext-type-2, E:ecmp</flags> | ||
<entry> | ||
<virtual-router>default</virtual-router> | ||
<destination>10.0.0.128/30</destination> | ||
<nexthop>10.0.0.1</nexthop> | ||
<metric>0</metric> | ||
<flags>A C | ||
</flags> | ||
<age/> | ||
<interface>tunnel.34</interface> | ||
</entry> | ||
<entry> | ||
<virtual-router>default</virtual-router> | ||
<destination>10.0.0.132/30</destination> | ||
<nexthop>10.0.0.2</nexthop> | ||
<metric>0</metric> | ||
<flags>A C | ||
</flags> | ||
<age/> | ||
<interface>tunnel.35</interface> | ||
</entry> | ||
<entry> | ||
<virtual-router>default</virtual-router> | ||
<destination>192.168.1.1/32</destination> | ||
<nexthop>0.0.0.0</nexthop> | ||
<metric>0</metric> | ||
<flags>A H | ||
</flags> | ||
<age/> | ||
<interface/></entry> | ||
</result> | ||
</response> |
1 change: 1 addition & 0 deletions
1
test/unit/mocked_data/test_get_route_to/several_routes/expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"10.0.0.128/30": [{"protocol": "connect","current_active": true,"age": -1,"routing_table": "default","next_hop": "10.0.0.1","outgoing_interface": "tunnel.34","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }], "192.168.1.1/32": [{"protocol": "host", "current_active": true,"age": -1,"routing_table": "default","next_hop": "0.0.0.0","outgoing_interface": "","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }], "10.0.0.132/30": [{"protocol": "connect","current_active": true,"age": -1,"routing_table": "default","next_hop": "10.0.0.2","outgoing_interface": "tunnel.35","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[tox] | ||
envlist = py27,py34,py35 | ||
|
||
[testenv] | ||
deps = | ||
-rrequirements-dev.txt | ||
|
||
commands= | ||
py.test |