-
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 #41 from napalm-automation-community/develop
Merge develop to master
- Loading branch information
Showing
12 changed files
with
805 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
|
||
setup( | ||
name="napalm-vyos", | ||
version="0.2.0", | ||
version="0.2.1", | ||
packages=find_packages(), | ||
author="Piotr Pieprzycki", | ||
author_email="[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
123 changes: 123 additions & 0 deletions
123
test/unit/mocked_data/test_get_config/normal/cat__config_config_boot.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,123 @@ | ||
interfaces { | ||
ethernet eth0 { | ||
address dhcp | ||
} | ||
ethernet eth1 { | ||
address 10.0.1.222/24 | ||
} | ||
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 | ||
} | ||
|
||
|
||
/* Warning: Do not remove the following line. */ | ||
/* === vyatta-config-version: "cluster@1:config-management@1:conntrack-sync@1:conntrack@1:cron@1:dhcp-relay@1:dhcp-server@4:firewall@5:ipsec@4:nat@4:qos@1:quagga@2:system@6:vrrp@1:wanloadbalance@3:webgui@1:webproxy@1:zone-policy@1" === */ | ||
/* Release version: VyOS 1.1.7 */ |
1 change: 1 addition & 0 deletions
1
test/unit/mocked_data/test_get_config/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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"running": "interfaces {\n ethernet eth0 {\n address dhcp\n duplex auto\n smp_affinity auto\n speed auto\n }\n ethernet eth1 {\n address 10.0.1.222/24\n duplex auto\n smp_affinity auto\n speed auto\n }\n loopback lo {\n address 10.2.2.2/32\n address 8.8.8.8/32\n }\n}\npolicy {\n prefix-list EXPORT {\n rule 1 {\n action permit\n prefix 172.16.2.0/24\n }\n rule 65535 {\n action permit\n prefix 10.2.2.2/32\n }\n }\n route-map EXPORT-POLICY {\n rule 1 {\n action permit\n match {\n ip {\n address {\n prefix-list EXPORT\n }\n }\n }\n }\n }\n}\nprotocols {\n bgp 65002 {\n neighbor 10.0.1.100 {\n remote-as 65001\n route-map {\n export EXPORT-POLICY\n }\n }\n redistribute {\n connected {\n route-map EXPORT-POLICY\n }\n }\n }\n}\nservice {\n snmp {\n community commro {\n authorization ro\n }\n contact [email protected]\n location PL,Krakow\n }\n ssh {\n disable-host-validation\n port 22\n }\n}\nsystem {\n config-management {\n commit-revisions 20\n }\n host-name vyos2\n login {\n banner {\n pre-login \"My banner for all devices\"\n }\n user vagrant {\n authentication {\n encrypted-password $6$fcHhBu3T$WLmiu6/txlEfWK5uh4mKE8v7qocuftsoAN1oHqPIIoogXAX8zS.SKhB105EExYU6yBy4cKHUD/Q6Mm7CUbVTr.\n plaintext-password \"\"\n public-keys vagrant {\n key AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ==\n type ssh-rsa\n }\n }\n level admin\n }\n user vyos {\n authentication {\n encrypted-password $1$yHIMnG/J$aWDkd3oDYSYps8twB5vpw1\n plaintext-password \"\"\n }\n level admin\n }\n }\n ntp {\n server 10.0.1.100 {\n }\n }\n package {\n auto-sync 1\n repository community {\n components main\n distribution helium\n password \"\"\n url http://packages.vyos.net/vyos\n username \"\"\n }\n }\n syslog {\n global {\n facility all {\n level notice\n }\n facility protocols {\n level debug\n }\n }\n }\n time-zone UTC\n}", "startup": "interfaces {\n ethernet eth0 {\n address dhcp\n }\n ethernet eth1 {\n address 10.0.1.222/24\n }\n loopback lo {\n address 10.2.2.2/32\n address 8.8.8.8/32\n }\n}\npolicy {\n prefix-list EXPORT {\n rule 1 {\n action permit\n prefix 172.16.2.0/24\n }\n rule 65535 {\n action permit\n prefix 10.2.2.2/32\n }\n }\n route-map EXPORT-POLICY {\n rule 1 {\n action permit\n match {\n ip {\n address {\n prefix-list EXPORT\n }\n }\n }\n }\n }\n}\nprotocols {\n bgp 65002 {\n neighbor 10.0.1.100 {\n remote-as 65001\n route-map {\n export EXPORT-POLICY\n }\n }\n redistribute {\n connected {\n route-map EXPORT-POLICY\n }\n }\n }\n}\nservice {\n snmp {\n community commro {\n authorization ro\n }\n contact [email protected]\n location PL,Krakow\n }\n ssh {\n disable-host-validation\n port 22\n }\n}\nsystem {\n config-management {\n commit-revisions 20\n }\n host-name vyos2\n login {\n banner {\n pre-login \"My banner for all devices\"\n }\n user vagrant {\n authentication {\n encrypted-password $6$fcHhBu3T$WLmiu6/txlEfWK5uh4mKE8v7qocuftsoAN1oHqPIIoogXAX8zS.SKhB105EExYU6yBy4cKHUD/Q6Mm7CUbVTr.\n plaintext-password \"\"\n public-keys vagrant {\n key AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ==\n type ssh-rsa\n }\n }\n level admin\n }\n user vyos {\n authentication {\n encrypted-password $1$yHIMnG/J$aWDkd3oDYSYps8twB5vpw1\n plaintext-password \"\"\n }\n level admin\n }\n }\n ntp {\n server 10.0.1.100 {\n }\n }\n package {\n auto-sync 1\n repository community {\n components main\n distribution helium\n password \"\"\n url http://packages.vyos.net/vyos\n username \"\"\n }\n }\n syslog {\n global {\n facility all {\n level notice\n }\n facility protocols {\n level debug\n }\n }\n }\n time-zone UTC\n}\n\n\n/* Warning: Do not remove the following line. */\n/* === vyatta-config-version: \"cluster@1:config-management@1:conntrack-sync@1:conntrack@1:cron@1:dhcp-relay@1:dhcp-server@4:firewall@5:ipsec@4:nat@4:qos@1:quagga@2:system@6:vrrp@1:wanloadbalance@3:webgui@1:webproxy@1:zone-policy@1\" === */\n/* Release version: VyOS 1.1.7 */\n", "candidate": ""} |
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,125 @@ | ||
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 | ||
} | ||
[edit] |
Oops, something went wrong.