diff --git a/ansible/README.test.md b/ansible/README.test.md
index 3a7574e6b69..4b196ee6d68 100644
--- a/ansible/README.test.md
+++ b/ansible/README.test.md
@@ -1 +1,29 @@
-# Placeholder for SONiC tests
+# ansible playbooks for SONiC testing
+
+## Requirements
+- A testbed needed to be set up before hand. See [Testbed Readme](README_testbed.md) for more information.
+ -- Depending on the test, either a PTF testbed or a VM set testbed might be required.
+
+## Run Tests
+- Replace {DUT_NAME} in each command line with the host name of switch under test.
+
+### NTP Test
+```
+ansible-playbook test_sonic.yml -i inventory --limit {DUT_NAME} --become --tags ntp
+```
+
+### Syslog Test
+```
+ansible-playbook test_sonic.yml -i inventory --limit {DUT_NAME} --become --tags syslog
+```
+
+### SNMP Tests
+```
+ansible-playbook test_sonic.yml -i inventory --limit {DUT_NAME} --become --tags snmp,snmp_cpu,snmp_interfaces
+```
+
+### LLDP Test
+```
+ansible-playbook test_sonic.yml -i inventory --limit {DUT_NAME},lldp_neighbors --become --tags lldp
+```
+- Required switch connected to a VM set testbed.
diff --git a/ansible/README.testbed.md b/ansible/README.testbed.md
index 843386f2caa..16ebe47ab70 100644
--- a/ansible/README.testbed.md
+++ b/ansible/README.testbed.md
@@ -260,22 +260,23 @@ sent to the vlan interface. It allows us to inject packets from the PTF host to
### Deploy testbed with one VM set
1. clone sonic-mgmt repo to local directory
2. Edit 'ansible/veos' file. Put ip address of your server after 'ansible_host='
-3. Edit 'ansible/group_vars/vm_host'. Put your credentials to reach the server
-4. Check, that you can reach the server by running command 'ansible -i veos -m ping vm_host_1' from ansible directory. The output should contain 'pong'
-5. Edit 'ansible/group_vars/vm_host/main.yml'.
+3. Edit 'ansible/group_vars/eos/eos.yml' file. Put your internal snmp community string after 'snmp_rocommunity:'.
+4. Edit 'ansible/group_vars/vm_host'. Put your credentials to reach the server
+5. Check, that you can reach the server by running command 'ansible -i veos -m ping vm_host_1' from ansible directory. The output should contain 'pong'
+6. Edit 'ansible/group_vars/vm_host/main.yml'.
* 'root_path': path where VMs virtual disks resides
* 'vm_images_url': URL where VM images could be downloaded
* 'cd_image_filename': filename of cd image of veos
* 'hdd_image_filename': filename of hdd image of veos
* 'http_proxy': your http_proxy
* 'http_proxy': your https_proxy
-6. Edit 'ansible/host_vars/STR-ACS-SERV-01.yml'. It contains settings for STR-ACS-SERV-01. STR-ACS-SERV-02 contains similar settings which are applied to STR-ACS-SERV-02
+7. Edit 'ansible/host_vars/STR-ACS-SERV-01.yml'. It contains settings for STR-ACS-SERV-01. STR-ACS-SERV-02 contains similar settings which are applied to STR-ACS-SERV-02
* 'mgmt_gw': ip address of gateway for management interfaces of VM. See 3.2
* 'vm_X_enabled': true, if you want to run X vm set
* 'vm_X_vlan_base': vlan number which is used for connection to first port of DUT.
* 'vlans': list of vlan offsets for the VM FP ports. For example: if vlans equal to "5,6" it means that the VM frontpanel port 0 will be connected to vlan {{ vm_X_vlan_base + 5 - 1 }} and VM frontpanel port 1 will be connected to vlan {{ vm_X_vlan_base + 6 - 1 }}
-7. Edit 'ansible/minigraph/*.xml' files. You need to adjust following xml nodes to settings of your network:
+8. Edit 'ansible/minigraph/*.xml' files. You need to adjust following xml nodes to settings of your network:
* DeviceMiniGraph/DpgDec/DeviceDataPlaneInfo/ManagementIPInterfaces/ManagementIPInterface/Prefix/IPPrefix
* DeviceMiniGraph/DpgDec/DeviceDataPlaneInfo/ManagementIPInterfaces/ManagementIPInterface/PrefixStr
-8. Start testbed with command 'ANSIBLE_SCP_IF_SSH=y ansible-playbook -i veos start_vm_sets.yml --limit server_1 -e vm_set_1=true'
-9. Stop testbed with command 'ANSIBLE_SCP_IF_SSH=y ansible-playbook -i veos stop_vm_sets.yml --limit server_1 -e vm_set_1=true'
+9. Start testbed with command 'ANSIBLE_SCP_IF_SSH=y ansible-playbook -i veos start_vm_sets.yml --limit server_1 -e vm_set_1=true'
+10. Stop testbed with command 'ANSIBLE_SCP_IF_SSH=y ansible-playbook -i veos stop_vm_sets.yml --limit server_1 -e vm_set_1=true'
diff --git a/ansible/group_vars/eos/eos.yml b/ansible/group_vars/eos/eos.yml
new file mode 100644
index 00000000000..c1220425c6f
--- /dev/null
+++ b/ansible/group_vars/eos/eos.yml
@@ -0,0 +1,3 @@
+# snmp variables
+snmp_rocommunity: public
+
diff --git a/ansible/library/lldp_facts.py b/ansible/library/lldp_facts.py
index 0dc2eb88dc5..ff7cb3600b9 100644
--- a/ansible/library/lldp_facts.py
+++ b/ansible/library/lldp_facts.py
@@ -94,6 +94,7 @@ def __init__(self,dotprefix=False):
# From LLDP-MIB
self.lldp_rem_port_id = dp + "1.0.8802.1.1.2.1.4.1.1.7"
+ self.lldp_rem_port_desc = dp + "1.0.8802.1.1.2.1.4.1.1.8"
self.lldp_rem_sys_desc = dp + "1.0.8802.1.1.2.1.4.1.1.10"
self.lldp_rem_sys_name = dp + "1.0.8802.1.1.2.1.4.1.1.9"
self.lldp_rem_chassis_id = dp + "1.0.8802.1.1.2.1.4.1.1.5"
@@ -207,6 +208,7 @@ def main():
snmp_auth,
cmdgen.UdpTransportTarget((host, 161)),
cmdgen.MibVariable(p.lldp_rem_port_id,),
+ cmdgen.MibVariable(p.lldp_rem_port_desc,),
cmdgen.MibVariable(p.lldp_rem_sys_desc,),
cmdgen.MibVariable(p.lldp_rem_sys_name,),
cmdgen.MibVariable(p.lldp_rem_chassis_id,),
@@ -217,6 +219,7 @@ def main():
lldp_rem_sys = dict()
lldp_rem_port_id = dict()
+ lldp_rem_port_desc = dict()
lldp_rem_chassis_id = dict()
lldp_rem_sys_desc = dict()
@@ -243,6 +246,9 @@ def main():
if v.lldp_rem_port_id in current_oid:
lldp_rem_port_id[if_name] = current_val
continue
+ if v.lldp_rem_port_desc in current_oid:
+ lldp_rem_port_desc[if_name] = current_val
+ continue
if v.lldp_rem_chassis_id in current_oid:
lldp_rem_chassis_id[if_name] = current_val
continue
@@ -254,6 +260,7 @@ def main():
for intf in lldp_rem_sys.viewkeys():
lldp_data[intf] = {'neighbor_sys_name': lldp_rem_sys[intf],
+ 'neighbor_port_desc': lldp_rem_port_desc[intf],
'neighbor_port_id': lldp_rem_port_id[intf],
'neighbor_sys_desc': lldp_rem_sys_desc[intf],
'neighbor_chassis_id': lldp_rem_chassis_id[intf]}
diff --git a/ansible/minigraph/switch1.xml b/ansible/minigraph/switch1.xml
new file mode 100644
index 00000000000..0574573fb09
--- /dev/null
+++ b/ansible/minigraph/switch1.xml
@@ -0,0 +1,1051 @@
+
+
+
+
+
+ ARISTA01T0
+ 10.0.0.33
+ switch1
+ 10.0.0.32
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.0
+ ARISTA01T2
+ 10.0.0.1
+ 1
+ 180
+ 60
+
+
+ ARISTA02T0
+ 10.0.0.35
+ switch1
+ 10.0.0.34
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.2
+ ARISTA02T2
+ 10.0.0.3
+ 1
+ 180
+ 60
+
+
+ ARISTA03T0
+ 10.0.0.37
+ switch1
+ 10.0.0.36
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.4
+ ARISTA03T2
+ 10.0.0.5
+ 1
+ 180
+ 60
+
+
+ ARISTA04T0
+ 10.0.0.39
+ switch1
+ 10.0.0.38
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.6
+ ARISTA04T2
+ 10.0.0.7
+ 1
+ 180
+ 60
+
+
+ ARISTA05T0
+ 10.0.0.41
+ switch1
+ 10.0.0.40
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.8
+ ARISTA05T2
+ 10.0.0.9
+ 1
+ 180
+ 60
+
+
+ ARISTA06T0
+ 10.0.0.43
+ switch1
+ 10.0.0.42
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.10
+ ARISTA06T2
+ 10.0.0.11
+ 1
+ 180
+ 60
+
+
+ ARISTA07T0
+ 10.0.0.45
+ switch1
+ 10.0.0.44
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.12
+ ARISTA07T2
+ 10.0.0.13
+ 1
+ 180
+ 60
+
+
+ ARISTA08T0
+ 10.0.0.47
+ switch1
+ 10.0.0.46
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.14
+ ARISTA08T2
+ 10.0.0.15
+ 1
+ 180
+ 60
+
+
+ ARISTA09T0
+ 10.0.0.49
+ switch1
+ 10.0.0.48
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.16
+ ARISTA09T2
+ 10.0.0.17
+ 1
+ 180
+ 60
+
+
+ ARISTA10T0
+ 10.0.0.51
+ switch1
+ 10.0.0.50
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.18
+ ARISTA10T2
+ 10.0.0.19
+ 1
+ 180
+ 60
+
+
+ ARISTA11T0
+ 10.0.0.53
+ switch1
+ 10.0.0.52
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.20
+ ARISTA11T2
+ 10.0.0.21
+ 1
+ 180
+ 60
+
+
+ ARISTA12T0
+ 10.0.0.55
+ switch1
+ 10.0.0.54
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.22
+ ARISTA12T2
+ 10.0.0.23
+ 1
+ 180
+ 60
+
+
+ ARISTA13T0
+ 10.0.0.57
+ switch1
+ 10.0.0.56
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.24
+ ARISTA13T2
+ 10.0.0.25
+ 1
+ 180
+ 60
+
+
+ ARISTA14T0
+ 10.0.0.59
+ switch1
+ 10.0.0.58
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.26
+ ARISTA14T2
+ 10.0.0.27
+ 1
+ 180
+ 60
+
+
+ ARISTA15T0
+ 10.0.0.61
+ switch1
+ 10.0.0.60
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.28
+ ARISTA15T2
+ 10.0.0.29
+ 1
+ 180
+ 60
+
+
+ ARISTA16T0
+ 10.0.0.63
+ switch1
+ 10.0.0.62
+ 1
+ 180
+ 60
+
+
+ switch1
+ 10.0.0.30
+ ARISTA16T2
+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+
+
+
+ 64009
+ ARISTA09T0
+
+
+
+ 65200
+ ARISTA09T2
+
+
+
+ 64010
+ ARISTA10T0
+
+
+
+ 65200
+ ARISTA10T2
+
+
+
+ 64011
+ ARISTA11T0
+
+
+
+ 65200
+ ARISTA11T2
+
+
+
+ 64012
+ ARISTA12T0
+
+
+
+ 65200
+ ARISTA12T2
+
+
+
+ 64013
+ ARISTA13T0
+
+
+
+ 65200
+ ARISTA13T2
+
+
+
+ 64014
+ ARISTA14T0
+
+
+
+ 65200
+ ARISTA14T2
+
+
+
+ 64015
+ ARISTA15T0
+
+
+
+ 65200
+ ARISTA15T2
+
+
+
+ 64016
+ ARISTA16T0
+
+
+
+ 65200
+ ARISTA16T2
+
+
+
+
+
+
+
+
+
+ HostIP
+ Loopback0
+
+ 10.1.0.32/32
+
+ 10.1.0.32/32
+
+
+
+
+ HostIP
+ eth0
+
+ 10.0.0.100/24
+
+ 10.0.0.100/24
+
+
+
+
+
+ switch1
+
+
+
+
+
+ fortyGigE0/0
+ 10.0.0.0/31
+
+
+
+ fortyGigE0/4
+ 10.0.0.2/31
+
+
+
+ fortyGigE0/8
+ 10.0.0.4/31
+
+
+
+ fortyGigE0/12
+ 10.0.0.6/31
+
+
+
+ fortyGigE0/16
+ 10.0.0.8/31
+
+
+
+ fortyGigE0/20
+ 10.0.0.10/31
+
+
+
+ fortyGigE0/24
+ 10.0.0.12/31
+
+
+
+ fortyGigE0/28
+ 10.0.0.14/31
+
+
+
+ fortyGigE0/32
+ 10.0.0.16/31
+
+
+
+ fortyGigE0/36
+ 10.0.0.18/31
+
+
+
+ fortyGigE0/40
+ 10.0.0.20/31
+
+
+
+ fortyGigE0/44
+ 10.0.0.22/31
+
+
+
+ fortyGigE0/48
+ 10.0.0.24/31
+
+
+
+ fortyGigE0/52
+ 10.0.0.26/31
+
+
+
+ fortyGigE0/56
+ 10.0.0.28/31
+
+
+
+ fortyGigE0/60
+ 10.0.0.30/31
+
+
+
+ fortyGigE0/64
+ 10.0.0.32/31
+
+
+
+ fortyGigE0/68
+ 10.0.0.34/31
+
+
+
+ fortyGigE0/72
+ 10.0.0.36/31
+
+
+
+ fortyGigE0/76
+ 10.0.0.38/31
+
+
+
+ fortyGigE0/80
+ 10.0.0.40/31
+
+
+
+ fortyGigE0/84
+ 10.0.0.42/31
+
+
+
+ fortyGigE0/88
+ 10.0.0.44/31
+
+
+
+ fortyGigE0/92
+ 10.0.0.46/31
+
+
+
+ fortyGigE0/96
+ 10.0.0.48/31
+
+
+
+ fortyGigE0/100
+ 10.0.0.50/31
+
+
+
+ fortyGigE0/104
+ 10.0.0.52/31
+
+
+
+ fortyGigE0/108
+ 10.0.0.54/31
+
+
+
+ fortyGigE0/112
+ 10.0.0.56/31
+
+
+
+ fortyGigE0/116
+ 10.0.0.58/31
+
+
+
+ fortyGigE0/120
+ 10.0.0.60/31
+
+
+
+ fortyGigE0/124
+ 10.0.0.62/31
+
+
+
+
+
+
+
+
+
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/0
+ ARISTA01T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/4
+ ARISTA02T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/8
+ ARISTA03T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/12
+ ARISTA04T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/16
+ ARISTA05T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/20
+ ARISTA06T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/24
+ ARISTA07T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/28
+ ARISTA08T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/32
+ ARISTA09T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/36
+ ARISTA10T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/40
+ ARISTA11T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/44
+ ARISTA12T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/48
+ ARISTA13T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/52
+ ARISTA14T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/56
+ ARISTA15T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/60
+ ARISTA16T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/64
+ ARISTA01T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/68
+ ARISTA02T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/72
+ ARISTA03T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/76
+ ARISTA04T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/80
+ ARISTA05T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/84
+ ARISTA06T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/88
+ ARISTA07T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/92
+ ARISTA08T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/96
+ ARISTA09T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/100
+ ARISTA10T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/104
+ ARISTA11T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/108
+ ARISTA12T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/112
+ ARISTA13T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/116
+ ARISTA14T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/120
+ ARISTA15T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch1
+ fortyGigE0/124
+ ARISTA16T0
+ Ethernet1
+
+
+
+ switch1
+ ACS-S6000
+
diff --git a/ansible/minigraph/switch2.xml b/ansible/minigraph/switch2.xml
new file mode 100644
index 00000000000..61d383cc10e
--- /dev/null
+++ b/ansible/minigraph/switch2.xml
@@ -0,0 +1,1051 @@
+
+
+
+
+
+ ARISTA01T0
+ 10.0.0.33
+ switch2
+ 10.0.0.32
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.0
+ ARISTA01T2
+ 10.0.0.1
+ 1
+ 180
+ 60
+
+
+ ARISTA02T0
+ 10.0.0.35
+ switch2
+ 10.0.0.34
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.2
+ ARISTA02T2
+ 10.0.0.3
+ 1
+ 180
+ 60
+
+
+ ARISTA03T0
+ 10.0.0.37
+ switch2
+ 10.0.0.36
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.4
+ ARISTA03T2
+ 10.0.0.5
+ 1
+ 180
+ 60
+
+
+ ARISTA04T0
+ 10.0.0.39
+ switch2
+ 10.0.0.38
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.6
+ ARISTA04T2
+ 10.0.0.7
+ 1
+ 180
+ 60
+
+
+ ARISTA05T0
+ 10.0.0.41
+ switch2
+ 10.0.0.40
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.8
+ ARISTA05T2
+ 10.0.0.9
+ 1
+ 180
+ 60
+
+
+ ARISTA06T0
+ 10.0.0.43
+ switch2
+ 10.0.0.42
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.10
+ ARISTA06T2
+ 10.0.0.11
+ 1
+ 180
+ 60
+
+
+ ARISTA07T0
+ 10.0.0.45
+ switch2
+ 10.0.0.44
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.12
+ ARISTA07T2
+ 10.0.0.13
+ 1
+ 180
+ 60
+
+
+ ARISTA08T0
+ 10.0.0.47
+ switch2
+ 10.0.0.46
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.14
+ ARISTA08T2
+ 10.0.0.15
+ 1
+ 180
+ 60
+
+
+ ARISTA09T0
+ 10.0.0.49
+ switch2
+ 10.0.0.48
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.16
+ ARISTA09T2
+ 10.0.0.17
+ 1
+ 180
+ 60
+
+
+ ARISTA10T0
+ 10.0.0.51
+ switch2
+ 10.0.0.50
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.18
+ ARISTA10T2
+ 10.0.0.19
+ 1
+ 180
+ 60
+
+
+ ARISTA11T0
+ 10.0.0.53
+ switch2
+ 10.0.0.52
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.20
+ ARISTA11T2
+ 10.0.0.21
+ 1
+ 180
+ 60
+
+
+ ARISTA12T0
+ 10.0.0.55
+ switch2
+ 10.0.0.54
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.22
+ ARISTA12T2
+ 10.0.0.23
+ 1
+ 180
+ 60
+
+
+ ARISTA13T0
+ 10.0.0.57
+ switch2
+ 10.0.0.56
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.24
+ ARISTA13T2
+ 10.0.0.25
+ 1
+ 180
+ 60
+
+
+ ARISTA14T0
+ 10.0.0.59
+ switch2
+ 10.0.0.58
+ 1
+ 180
+ 60
+
+
+ switch2
+ 10.0.0.26
+ ARISTA14T2
+ 10.0.0.27
+ 1
+ 180
+ 60
+
+
+ ARISTA15T0
+ 10.0.0.61
+ switch2
+ 10.0.0.60
+ 1
+ 180
+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 65200
+ ARISTA05T2
+
+
+
+ 64006
+ ARISTA06T0
+
+
+
+ 65200
+ ARISTA06T2
+
+
+
+ 64007
+ ARISTA07T0
+
+
+
+ 65200
+ ARISTA07T2
+
+
+
+ 64008
+ ARISTA08T0
+
+
+
+ 65200
+ ARISTA08T2
+
+
+
+ 64009
+ ARISTA09T0
+
+
+
+ 65200
+ ARISTA09T2
+
+
+
+ 64010
+ ARISTA10T0
+
+
+
+ 65200
+ ARISTA10T2
+
+
+
+ 64011
+ ARISTA11T0
+
+
+
+ 65200
+ ARISTA11T2
+
+
+
+ 64012
+ ARISTA12T0
+
+
+
+ 65200
+ ARISTA12T2
+
+
+
+ 64013
+ ARISTA13T0
+
+
+
+ 65200
+ ARISTA13T2
+
+
+
+ 64014
+ ARISTA14T0
+
+
+
+ 65200
+ ARISTA14T2
+
+
+
+ 64015
+ ARISTA15T0
+
+
+
+ 65200
+ ARISTA15T2
+
+
+
+ 64016
+ ARISTA16T0
+
+
+
+ 65200
+ ARISTA16T2
+
+
+
+
+
+
+
+
+
+ HostIP
+ Loopback0
+
+ 10.1.0.32/32
+
+ 10.1.0.32/32
+
+
+
+
+ HostIP
+ eth0
+
+ 10.0.0.101/24
+
+ 10.0.0.101/24
+
+
+
+
+
+ switch2
+
+
+
+
+
+ Ethernet0
+ 10.0.0.0/31
+
+
+
+ Ethernet4
+ 10.0.0.2/31
+
+
+
+ Ethernet8
+ 10.0.0.4/31
+
+
+
+ Ethernet12
+ 10.0.0.6/31
+
+
+
+ Ethernet16
+ 10.0.0.8/31
+
+
+
+ Ethernet20
+ 10.0.0.10/31
+
+
+
+ Ethernet24
+ 10.0.0.12/31
+
+
+
+ Ethernet28
+ 10.0.0.14/31
+
+
+
+ Ethernet32
+ 10.0.0.16/31
+
+
+
+ Ethernet36
+ 10.0.0.18/31
+
+
+
+ Ethernet40
+ 10.0.0.20/31
+
+
+
+ Ethernet44
+ 10.0.0.22/31
+
+
+
+ Ethernet48
+ 10.0.0.24/31
+
+
+
+ Ethernet52
+ 10.0.0.26/31
+
+
+
+ Ethernet56
+ 10.0.0.28/31
+
+
+
+ Ethernet60
+ 10.0.0.30/31
+
+
+
+ Ethernet64
+ 10.0.0.32/31
+
+
+
+ Ethernet68
+ 10.0.0.34/31
+
+
+
+ Ethernet72
+ 10.0.0.36/31
+
+
+
+ Ethernet76
+ 10.0.0.38/31
+
+
+
+ Ethernet80
+ 10.0.0.40/31
+
+
+
+ Ethernet84
+ 10.0.0.42/31
+
+
+
+ Ethernet88
+ 10.0.0.44/31
+
+
+
+ Ethernet92
+ 10.0.0.46/31
+
+
+
+ Ethernet96
+ 10.0.0.48/31
+
+
+
+ Ethernet100
+ 10.0.0.50/31
+
+
+
+ Ethernet104
+ 10.0.0.52/31
+
+
+
+ Ethernet108
+ 10.0.0.54/31
+
+
+
+ Ethernet112
+ 10.0.0.56/31
+
+
+
+ Ethernet116
+ 10.0.0.58/31
+
+
+
+ Ethernet120
+ 10.0.0.60/31
+
+
+
+ Ethernet124
+ 10.0.0.62/31
+
+
+
+
+
+
+
+
+
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet0
+ ARISTA01T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet4
+ ARISTA02T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet8
+ ARISTA03T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet12
+ ARISTA04T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet16
+ ARISTA05T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet20
+ ARISTA06T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet24
+ ARISTA07T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet28
+ ARISTA08T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet32
+ ARISTA09T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet36
+ ARISTA10T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet40
+ ARISTA11T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet44
+ ARISTA12T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet48
+ ARISTA13T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet52
+ ARISTA14T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet56
+ ARISTA15T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet60
+ ARISTA16T2
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet64
+ ARISTA01T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet68
+ ARISTA02T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet72
+ ARISTA03T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet76
+ ARISTA04T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet80
+ ARISTA05T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet84
+ ARISTA06T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet88
+ ARISTA07T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet92
+ ARISTA08T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet96
+ ARISTA09T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet100
+ ARISTA10T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet104
+ ARISTA11T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet108
+ ARISTA12T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet112
+ ARISTA13T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet116
+ ARISTA14T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet120
+ ARISTA15T0
+ Ethernet1
+
+
+ DeviceInterfaceLink
+ switch2
+ Ethernet124
+ ARISTA16T0
+ Ethernet1
+
+
+
+ switch2
+ ACS-MSN2700
+
diff --git a/ansible/roles/eos/templates/spine.j2 b/ansible/roles/eos/templates/spine.j2
index 2fd594b6c89..e2003648d8e 100644
--- a/ansible/roles/eos/templates/spine.j2
+++ b/ansible/roles/eos/templates/spine.j2
@@ -9,7 +9,9 @@ username admin privilege 15 role network-admin secret 0 123456
clock timezone UTC
!
lldp run
+lldp management-address Management1
!
+snmp-server community {{ snmp_rocommunity }} ro
!
ip routing
ipv6 unicast-routing
diff --git a/ansible/roles/eos/templates/tor.j2 b/ansible/roles/eos/templates/tor.j2
index 1e1f8870cfa..38e42d78eed 100644
--- a/ansible/roles/eos/templates/tor.j2
+++ b/ansible/roles/eos/templates/tor.j2
@@ -9,7 +9,9 @@ username admin privilege 15 role network-admin secret 0 123456
clock timezone UTC
!
lldp run
+lldp management-address Management1
!
+snmp-server community {{ snmp_rocommunity }} ro
!
ip routing
ipv6 unicast-routing
diff --git a/ansible/roles/test/tasks/lldp.yml b/ansible/roles/test/tasks/lldp.yml
index 17199bb358c..d44b52eaf74 100644
--- a/ansible/roles/test/tasks/lldp.yml
+++ b/ansible/roles/test/tasks/lldp.yml
@@ -7,35 +7,33 @@
- name: Print neighbors in minigraph
debug: msg="{{ minigraph_neighbors }}"
-- name: Print underlay neighbors in minigraph
- debug: msg="{{ minigraph_underlay_neighbors }}"
-
- name: Gather information from lldp
lldp:
vars:
ansible_shell_type: docker
ansible_python_interpreter: docker exec -i lldp python
-- name: If underlay exists, use it.
+- name: Print lldp information
+ debug: msg="{{ lldp }}"
+
+- name: Verify LLDP information is available on most interfaces
+ assert: { that: "'{{ lldp|length }} > {{ minigraph_neighbors|length }} * 0.8'"}
+
+- name: Read port alias mapping
set_fact:
- minigraph_neighbors: "{{ minigraph_underlay_neighbors }}"
- when: minigraph_underlay_neighbors is defined
+ alias_map: "{{ lookup('file', 'roles/sonicv2/files/ssw/{{ sonic_hwsku }}/alias_map.json') | from_json }}"
- name: Compare the lldp neighbors name with minigraph neigbhors name (exclude the management port)
- assert: { that: "'{{ lldp[item]['chassis']['name'] }}' == '{{ minigraph_neighbors[item]['name'] }}'" }
+ assert: { that: "'{{ lldp[item]['chassis']['name'] }}' == '{{ minigraph_neighbors[alias_map[item]]['name'] }}'" }
with_items: lldp.keys()
when: item != "eth0"
- ignore_errors: yes
- #todo - samirja and johnar - need to implement a minigraph topology that matches the fanout otherwise it errors out
-- name: Compare the lldp neighbors interface with minigraph neigbhor interface(exclude the management port)
- assert: { that: "'{{ lldp[item]['port']['ifname'] }}' == '{{ minigraph_neighbors[item]['port'] }}'" }
+- name: Compare the lldp neighbors interface with minigraph neigbhor interface (exclude the management port)
+ assert: { that: "'{{ lldp[item]['port']['ifname'] }}' == '{{ minigraph_neighbors[alias_map[item]]['port'] }}'" }
with_items: lldp.keys()
when: item != "eth0"
- ignore_errors: yes
- #todo - samirja and johnar - need to implement a minigraph topology that matches the fanout otherwise it errors out
-- name: add host
- add_host: name={{ lldp[item]['chassis']['mgmt-ip'] }} groups=lldp_neighbors neighbor_interface={{lldp[item]['port']['ifname']}} dut_interface={{item}} hname={{lldp[item]['chassis']['mgmt-ip'] }}
+- name: Iterate throguh each lldp neighbor and verify the information received by neighbor are also correct
+ add_host: name={{ lldp[item]['chassis']['mgmt-ip'] }} groups=lldp_neighbors neighbor_interface={{lldp[item]['port']['ifname']}} dut_interface={{item}} hname={{lldp[item]['chassis']['mgmt-ip'] }} snmp_rocommunity={{ snmp_rocommunity }}
with_items: lldp.keys()
when: lldp[item]['chassis']['mgmt-ip'] is defined
diff --git a/ansible/roles/test/tasks/lldp_neighbor.yml b/ansible/roles/test/tasks/lldp_neighbor.yml
index 99ad4a56888..87bf48e887d 100644
--- a/ansible/roles/test/tasks/lldp_neighbor.yml
+++ b/ansible/roles/test/tasks/lldp_neighbor.yml
@@ -1,7 +1,10 @@
- name: Gather LLDP information from all neighbors by performing a SNMP walk
- lldp_facts: host={{ hname }} version=v2c community={{ snmp_rocommunity }}
+ lldp_facts: host={{ hname }} version=v2c community={{ snmp_rocommunity }}
connection: local
+- name: Print LLDP facts from neighbors
+ debug: msg="{{ ansible_lldp_facts }}"
+
- name: verify the dut system name field is not empty
assert: {that: "'{{ ansible_lldp_facts[neighbor_interface]['neighbor_sys_name'] }}' != ''"}
@@ -11,5 +14,9 @@
- name: verify the dut system description field is not empty
assert: {that: "'{{ ansible_lldp_facts[neighbor_interface]['neighbor_sys_desc'] }}' != ''"}
-- name: verify the dut port id field is published correctly
- assert: {that: "'{{ ansible_lldp_facts[neighbor_interface]['neighbor_port_id'] }}' == dut_interface"}
+- name: verify the dut port id field is not empty
+ assert: {that: "'{{ ansible_lldp_facts[neighbor_interface]['neighbor_port_id'] }}' != ''"}
+
+- name: verify the dut port description field is published correctly
+ assert: {that: "'{{ ansible_lldp_facts[neighbor_interface]['neighbor_port_desc'] }}' == dut_interface"}
+
diff --git a/ansible/roles/test/tasks/main.yml b/ansible/roles/test/tasks/main.yml
index 2bd05a16031..b59e60cdf31 100644
--- a/ansible/roles/test/tasks/main.yml
+++ b/ansible/roles/test/tasks/main.yml
@@ -7,4 +7,4 @@
# Actions for lldp_neighbors
- include: lldp_neighbor.yml
when: scope == 'lldp_neighbors'
-
+ tags: lldp
diff --git a/ansible/roles/test/tasks/sonic.yml b/ansible/roles/test/tasks/sonic.yml
index b38b3516730..b3a071d57de 100644
--- a/ansible/roles/test/tasks/sonic.yml
+++ b/ansible/roles/test/tasks/sonic.yml
@@ -14,22 +14,14 @@
include: snmp.yml
tags: snmp
-### when calling this QoS test, please add command line of which PTF docker image host to test against
-### -e "ptf_host=10.0.0.200"
-- fail: msg="Please set ptf_host variable"
- when: ptf_host is not defined
- tags: qos
-
-- name: Test QOS
- include: qos.yml
- when: host_saithrift is not defined
- tags: qos
-
-- name: Test QoS using SAI
- include: qos_sai.yml
- when: host_saithrift is defined
- tags: qos
+- name: Test SNMP CPU
+ include: snmp/cpu.yml
+ tags: snmp_cpu
+- name: Test SNMP Interfaces
+ include: snmp/interfaces.yml
+ tags: snmp_interfaces
+
### when callng BGP flaps test, please add command line of which VMs host to test against
### -e "vmhost_num='01'"
- fail: msg="Please set vmhost_num variable"
@@ -44,14 +36,6 @@
include: syslog.yml
tags: syslog
-- name: Test SNMP CPU
- include: snmp/cpu.yml
- tags: snmp_cpu
-
-- name: Test SNMP Interfaces
- include: snmp/interfaces.yml
- tags: snmp_interfaces
-
- name: Test Interface Flap from Neighbor
include: interface_up_down.yml
tags: link
@@ -66,9 +50,4 @@
include: arpall.yml
tags: arp
-### When calling this basic_route, Chip is setup with proper parameters and
-### SAI API used by syncd daemon are called. This test is mainly for validation purpose used by external vendors.
-- name: Test basic_router
- include: basic_router.yml
- tags: basic_router