Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ansible/README.test.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
- Replace {PTF_HOST} in each command line with the host name or IP of the PTF testbed host
- Replace {TESTBED_TYPE} in each command line with the type of the testbed being used

### ACL tests
```
ansible-playbook test_sonic.yml -i inventory --limit {DUT_NAME} --become --tags acltb_configure --extra-vars "run_dir=/tmp testbed_type={TESTBED_TYPE} ptf_host={PTF_HOST}"
ansible-playbook test_sonic.yml -i inventory --limit {DUT_NAME} --become --tags acltb_test --extra-vars "run_dir=/tmp testbed_type={TESTBED_TYPE} ptf_host={PTF_HOST}"
ansible-playbook test_sonic.yml -i inventory --limit {DUT_NAME} --become --tags acltb_cleanup --extra-vars "run_dir=/tmp testbed_type={TESTBED_TYPE} ptf_host={PTF_HOST}"
```
- Requires switch connected to a PTF testbed

### ARP tests
```
Expand Down
58 changes: 0 additions & 58 deletions ansible/action_plugins/switch.py

This file was deleted.

30 changes: 30 additions & 0 deletions ansible/basic_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

- hosts: sonic
gather_facts: no
tasks:

- name: Get process information in syncd docker
shell: docker exec -i syncd ps aux | grep /usr/bin/syncd
register: ps_out

- debug: var=ps_out.stdout_lines

- name: Verify that syncd process is running
assert: { that: "{{ ps_out.stdout_lines | length }} > 0"}

- name: Get syslog error information
shell: cat /var/log/syslog |tail -n 5000 |grep error
become: true
register: syslog_out
failed_when: false

- debug: var=syslog_out.stdout_lines

- name: Gathering minigraph facts about the device
minigraph_facts: host={{ inventory_hostname }}
connection: local
become: no
tags: always

- include: roles/test/tasks/interface.yml

247 changes: 0 additions & 247 deletions ansible/connection_plugins/switch.py

This file was deleted.

14 changes: 7 additions & 7 deletions ansible/files/creategraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import csv, sys, os
from lxml import etree

DEVICECSV = 'sonic_str_devices.csv'
LINKCSV = 'sonic_str_links.csv'
STARLAB_CONNECTION_GRAPH_ROOT_NAME = 'StarlabConnectionGraph'
STARLAB_CONNECTION_GRAPH_DPGL2_NAME = 'DevicesL2Info'
DEVICECSV = 'sonic_lab_devices.csv'
LINKCSV = 'sonic_lab_links.csv'
LAB_CONNECTION_GRAPH_ROOT_NAME = 'LabConnectionGraph'
LAB_CONNECTION_GRAPH_DPGL2_NAME = 'DevicesL2Info'

class LabGraph(object):

"""
This is used to create "graph" file of starlab for all connections and vlan info from csv file
This is used to create "graph" file of lab for all connections and vlan info from csv file
We(both engineer and lab technician) maintian and modify the csv file to keep track of the lab
infrastucture for Sonic development and testing environment.
"""
Expand Down Expand Up @@ -63,7 +63,7 @@ def generate_dpg(self):
l3inforoot = etree.SubElement(self.dpgroot, 'DevicesL3Info', {'Hostname': hostname})
etree.SubElement(l3inforoot, 'ManagementIPInterface', {'Name': 'ManagementIp', 'Prefix': managementip})
####### Build L2 information Here
l2inforoot = etree.SubElement(self.dpgroot, STARLAB_CONNECTION_GRAPH_DPGL2_NAME, {'Hostname': hostname})
l2inforoot = etree.SubElement(self.dpgroot, LAB_CONNECTION_GRAPH_DPGL2_NAME, {'Hostname': hostname})
vlanattr = {}
for link in self.links:
if link['StartDevice'] == hostname:
Expand All @@ -90,7 +90,7 @@ def create_xml(self):
'''

onexml = open(self.one_xmlfile, 'w')
root=etree.Element(STARLAB_CONNECTION_GRAPH_ROOT_NAME)
root=etree.Element(LAB_CONNECTION_GRAPH_ROOT_NAME)
root.append(self.pngroot)
root.append(self.dpgroot)
result = etree.tostring(root, pretty_print=True)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<StarlabConnectionGraph>
<LabConnectionGraph>
<PhysicalNetworkGraphDeclaration>
<Devices>
<Device Hostname="str-msn2700-01" HwSku="Mellanox-2700" Type="DevSonic"/>
Expand Down
File renamed without changes.
Loading