-
Notifications
You must be signed in to change notification settings - Fork 27
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 #8 from ppieprzycki/master
Fix mock and vagrant tests
- Loading branch information
Showing
25 changed files
with
754 additions
and
236 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
David Barroso <[email protected]> | ||
Elisa Jasinska <[email protected]> | ||
Shota Muto | ||
Shota Muto <[email protected]> | ||
Piotr Pieprzycki <[email protected]> | ||
David Barroso <[email protected]> |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,17 +5,17 @@ | |
from setuptools import setup, find_packages | ||
from pip.req import parse_requirements | ||
|
||
__author__ = 'Shota Muto <[email protected]>' | ||
__author__ = 'Piotr Pieprzycki <[email protected]>' | ||
|
||
install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1()) | ||
reqs = [str(ir.req) for ir in install_reqs] | ||
|
||
setup( | ||
name="napalm-vyos", | ||
version="0.1.1", | ||
version="0.1.2", | ||
packages=find_packages(), | ||
author="Shota Muto", | ||
author_email="[email protected]", | ||
author="Piotr Pieprzycki", | ||
author_email="[email protected]", | ||
description="Network Automation and Programmability Abstraction Layer with Multivendor support", | ||
classifiers=[ | ||
'Topic :: Utilities', | ||
|
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
5 changes: 2 additions & 3 deletions
5
test/unit/mocked_data/test_get_arp_table/normal/show_arp.text
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,5 +1,4 @@ | ||
Address HWtype HWaddress Flags Mask Iface | ||
10.0.12.33 (incomplete) eth1 | ||
10.0.12.1 ether 08:00:27:60:0f:ee C eth1 | ||
10.0.2.2 ether 52:54:00:12:35:02 C eth0 | ||
10.0.2.3 ether 52:54:00:12:35:03 C eth0 | ||
10.0.1.100 ether 08:00:27:27:03:8e C eth1 | ||
10.0.2.2 ether 52:54:00:12:35:02 C eth0 |
43 changes: 0 additions & 43 deletions
43
test/unit/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_10_0_12_1.text
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
test/unit/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_10_0_1_100.text
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,36 @@ | ||
BGP neighbor is 10.0.1.100, remote AS 65001, local AS 65002, external link | ||
BGP version 4, remote router ID 10.0.2.100 | ||
BGP state = Established, up for 03w0d00h | ||
Last read 11:37:17, hold time is 180, keepalive interval is 60 seconds | ||
Neighbor capabilities: | ||
4 Byte AS: advertised and received | ||
Route refresh: advertised and received(old & new) | ||
Address family IPv4 Unicast: advertised and received | ||
Message statistics: | ||
Inq depth is 0 | ||
Outq depth is 0 | ||
Sent Rcvd | ||
Opens: 2 0 | ||
Notifications: 0 0 | ||
Updates: 1 0 | ||
Keepalives: 30257 30255 | ||
Route Refresh: 0 0 | ||
Capability: 0 0 | ||
Total: 30260 30255 | ||
Minimum time between advertisement runs is 30 seconds | ||
|
||
For address family: IPv4 Unicast | ||
Community attribute sent to this neighbor(both) | ||
Outbound path policy configured | ||
Route map for outgoing advertisements is *EXPORT-POLICY | ||
0 accepted prefixes | ||
|
||
Connections established 1; dropped 0 | ||
Last reset never | ||
Local host: 10.0.1.222, Local port: 179 | ||
Foreign host: 10.0.1.100, Foreign port: 44363 | ||
Nexthop: 10.0.1.222 | ||
Nexthop global: fe80::a00:27ff:feeb:7af9 | ||
Nexthop local: :: | ||
BGP connection: non shared network | ||
Read thread: on Write thread: off |
4 changes: 2 additions & 2 deletions
4
test/unit/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_summary.text
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,9 +1,9 @@ | ||
BGP router identifier 10.2.2.2, local AS number 65002 | ||
IPv4 Unicast - max multipaths: ebgp 1 ibgp 1 | ||
RIB entries 9, using 864 bytes of memory | ||
RIB entries 1, using 96 bytes of memory | ||
Peers 1, using 4560 bytes of memory | ||
|
||
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd | ||
10.0.12.1 4 65001 36938 33380 0 0 0 01w3d00h 4 | ||
10.0.1.100 4 65001 30254 30259 0 0 0 03w0d00h 0 | ||
|
||
Total number of neighbors 1 |
1 change: 1 addition & 0 deletions
1
test/unit/mocked_data/test_get_facts/normal/cat__proc_uptime___awk___print__1__.text
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 @@ | ||
1815398.39 |
2 changes: 1 addition & 1 deletion
2
test/unit/mocked_data/test_get_facts/normal/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 |
---|---|---|
@@ -1 +1 @@ | ||
{"os_version": "1.1.7", "uptime": "...", "interface_list": ["eth1", "eth0", "lo"], "vendor": "VyOS", "serial_number": "0", "model": "VirtualBox", "hostname": "vyos2", "fqdn": ""} | ||
{"os_version": "1.1.7", "uptime": "...", "interface_list": "...", "vendor": "VyOS", "serial_number": "0", "model": "VirtualBox", "hostname": "vyos2", "fqdn": ""} |
124 changes: 124 additions & 0 deletions
124
test/unit/mocked_data/test_get_facts/normal/show_configuration.text
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 @@ | ||
interfaces { | ||
ethernet eth0 { | ||
address dhcp | ||
duplex auto | ||
smp_affinity auto | ||
speed auto | ||
} | ||
ethernet eth1 { | ||
address 10.0.1.222/24 | ||
duplex auto | ||
smp_affinity auto | ||
speed auto | ||
} | ||
loopback lo { | ||
address 10.2.2.2/32 | ||
address 8.8.8.8/32 | ||
} | ||
} | ||
policy { | ||
prefix-list EXPORT { | ||
rule 1 { | ||
action permit | ||
prefix 172.16.2.0/24 | ||
} | ||
rule 65535 { | ||
action permit | ||
prefix 10.2.2.2/32 | ||
} | ||
} | ||
route-map EXPORT-POLICY { | ||
rule 1 { | ||
action permit | ||
match { | ||
ip { | ||
address { | ||
prefix-list EXPORT | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
protocols { | ||
bgp 65002 { | ||
neighbor 10.0.1.100 { | ||
remote-as 65001 | ||
route-map { | ||
export EXPORT-POLICY | ||
} | ||
} | ||
redistribute { | ||
connected { | ||
route-map EXPORT-POLICY | ||
} | ||
} | ||
} | ||
} | ||
service { | ||
snmp { | ||
community commro { | ||
authorization ro | ||
} | ||
contact [email protected] | ||
location PL,Krakow | ||
} | ||
ssh { | ||
disable-host-validation | ||
port 22 | ||
} | ||
} | ||
system { | ||
config-management { | ||
commit-revisions 20 | ||
} | ||
host-name vyos2 | ||
login { | ||
banner { | ||
pre-login "My banner for all devices" | ||
} | ||
user vagrant { | ||
authentication { | ||
encrypted-password $6$fcHhBu3T$WLmiu6/txlEfWK5uh4mKE8v7qocuftsoAN1oHqPIIoogXAX8zS.SKhB105EExYU6yBy4cKHUD/Q6Mm7CUbVTr. | ||
plaintext-password "" | ||
public-keys vagrant { | ||
key AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== | ||
type ssh-rsa | ||
} | ||
} | ||
level admin | ||
} | ||
user vyos { | ||
authentication { | ||
encrypted-password $1$yHIMnG/J$aWDkd3oDYSYps8twB5vpw1 | ||
plaintext-password "" | ||
} | ||
level admin | ||
} | ||
} | ||
ntp { | ||
server 10.0.1.100 { | ||
} | ||
} | ||
package { | ||
auto-sync 1 | ||
repository community { | ||
components main | ||
distribution helium | ||
password "" | ||
url http://packages.vyos.net/vyos | ||
username "" | ||
} | ||
} | ||
syslog { | ||
global { | ||
facility all { | ||
level notice | ||
} | ||
facility protocols { | ||
level debug | ||
} | ||
} | ||
} | ||
time-zone UTC | ||
} |
13 changes: 13 additions & 0 deletions
13
test/unit/mocked_data/test_get_facts/normal/show_version.text
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,13 @@ | ||
Version: VyOS 1.1.7 | ||
Description: VyOS 1.1.7 (helium) | ||
Copyright: 2016 VyOS maintainers and contributors | ||
Built by: [email protected] | ||
Built on: Wed Feb 17 09:57:31 UTC 2016 | ||
Build ID: 1602170957-4459750 | ||
System type: x86 64-bit | ||
Boot via: image | ||
Hypervisor: VMware | ||
HW model: VirtualBox | ||
HW S/N: 0 | ||
HW UUID: 9728B94A-52FA-4C1A-AC83-7C6CA76F6F13 | ||
Uptime: 12:44:18 up 21 days, 20 min, 1 user, load average: 0.00, 0.01, 0.05 |
Oops, something went wrong.