Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Azure/master to local fork #8

Merged
merged 99 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
566b338
Convert dip_sip ansible test to pytest (#1488)
noaOrMlnx Apr 6, 2020
a4af86b
[pmon daemon check] refactoring pmon daemon state check code (#1537)
yxieca Apr 6, 2020
44d7b8e
Fix test_techsupport.py so it could run with T1 topology (#1538)
noaOrMlnx Apr 6, 2020
5796f2e
[lgtm] Configure LGTM to analyze test code (#1544)
daall Apr 6, 2020
af6a644
[tests] Fix LGTM errors in tests folder (#1545)
daall Apr 6, 2020
00914a7
Convert vxlan-decap testing to pytest (#1518)
wangxin Apr 7, 2020
f8fde6d
Add the APC PSU support for SNMP PSU controller (#1461)
sujinmkang Apr 7, 2020
ff88973
[Mellanox] Fix issues for thermal control test cases (#1524)
Junchao-Mellanox Apr 7, 2020
21137ac
[pytest/hash] add hash key ingress-port test (#1509)
William-zx Apr 8, 2020
d1978ae
[advanced reboot] Add Paramiko module for device connection (#1542)
tahmed-dev Apr 8, 2020
db19699
[pytest] Port advanced reboot based test cases (sad path) (#1543)
tahmed-dev Apr 8, 2020
4c58f1c
Update the importing of conn_graph_facts after platform_fixtures.py i…
wangxin Apr 8, 2020
511b302
Create README.testbed.cEOS.md (#1549)
lguohan Apr 8, 2020
ff709d2
Configure and enable core uploader (#1522)
renukamanavalan Apr 8, 2020
3047be2
[tests/common/devices] Add FanoutHost (#1532)
Blueve Apr 9, 2020
fbe99f3
[tacacs]: replace shell command with service module (#1550)
lguohan Apr 9, 2020
162cbb0
[tests/lag]: Convert lag_fallback.yml to pytest (#1526)
Blueve Apr 9, 2020
ac00a89
[pytest] Fix get_asic_type method and logging (#1557)
tahmed-dev Apr 11, 2020
eeba0cf
Added iptables rules to make sure BGP don't ack back to BGP peer syn …
abdosi Apr 13, 2020
8964b16
[pytest/hash] Generate available send packet ports instead of hard co…
William-zx Apr 15, 2020
a2ad5d4
[fanout switch] build fanout switch list from device_conn map (#1566)
yxieca Apr 15, 2020
feeeb9e
Stop arp_update before crm test to prevent DUT learning mac address u…
iris00522 Apr 15, 2020
f7ec8f9
[pytest] Add replace fast-reboot script test option (#1563)
tahmed-dev Apr 15, 2020
1d3f69a
[pytest/creds]: load groups vars into creds for the dut (#1575)
lguohan Apr 16, 2020
a70266c
[pytest/common/devices] Remove immediately checking of shut/no_shut (…
Blueve Apr 16, 2020
418d665
SPyTest documentation initial version (#1565)
ramakristipati Apr 16, 2020
68ab54f
[tests/conftest] Read os_type from ansible inventory vars to construc…
Blueve Apr 16, 2020
313d4f4
[link flap] add link flap pytest (#1573)
yxieca Apr 16, 2020
498ea14
Fix sensor data for 3700 (#1568)
Junchao-Mellanox Apr 17, 2020
684317a
[Mellanox] Fix issue: remove non-exist sensor sysfs files (#1567)
Junchao-Mellanox Apr 17, 2020
44515b6
[pytest/snmp_lldp]: exclude mgmt interface from active interface list…
keboliu Apr 17, 2020
34d7833
[pytest/features] Add test for show features command (#1546)
pra-moh Apr 17, 2020
0c8f5b6
[pytest assersion] introduce assertion handling code (#1592)
yxieca Apr 21, 2020
7fa908c
[advanced-reboot] Refactor prepare ssh keys into ssh_utils (#1571)
tahmed-dev Apr 21, 2020
b2f29dd
[tests/pc] Use test_po_update.py in config.yml directly (#1589)
Blueve Apr 21, 2020
e346781
[pytest] Convert control plane assisted warm-reboot test (wr_arp) (#1…
tahmed-dev Apr 21, 2020
54f52b6
[recovery] introduce adaptive recover method (#1583)
yxieca Apr 21, 2020
2254d9b
[tests/lag_2] Refactor test_lag_2.py (#1582)
Blueve Apr 21, 2020
11e041f
[ansible] Fix symlink to ferret.conf.j2 (#1595)
tahmed-dev Apr 21, 2020
0662447
[test/procdockerstatsd] Verify daemon is active/running and uploads d…
pra-moh Apr 22, 2020
bb6f25f
[pfc_storm_icos.j2]: jinja2 template to start PFC storm on ICOS. (#1590)
Apr 22, 2020
c0f63c5
[pytest/hash] Add hash keys: 'src-mac', 'dst-mac', 'ip-proto', 'vlan-…
William-zx Apr 22, 2020
0c122da
[pytest/default_route_check]: check various aspect related to default…
lguohan Apr 22, 2020
1aa76ea
Fix below issue: (#1596)
abdosi Apr 23, 2020
cdf1343
[tests/lag_2] Use test_lag_2.py in lag_2.yml directly (#1602)
Blueve Apr 24, 2020
b99738c
[tests/sensors] Convert sensors_check.yml to pytest (#1601)
Blueve Apr 24, 2020
7d7a5e2
[tests/telemetry] Verify default config parameters (#1530)
pra-moh Apr 24, 2020
3882d42
[pytest/test_default_route]: support 4.9 kernel 201911/201811 release…
lguohan Apr 24, 2020
28b2e9e
[TestbedProcessing] Minor fixes to suite latest changes (#1604)
msosyak Apr 25, 2020
9a0e00f
[pytest]: reorg tests info subfolder (#1613)
lguohan Apr 26, 2020
2e8d641
[sanity_checks]: add critical process check in sanity checks (#1617)
lguohan Apr 26, 2020
7825453
[tests/sensors] Move test_sensors.py to domain specific folder (#1616)
Blueve Apr 27, 2020
e7dab70
Fix sensors_check link (#1611)
msosyak Apr 27, 2020
ce75e16
[pytest]: add get_ip_route_info in SonicHost (#1618)
lguohan Apr 27, 2020
23f9872
[Mellanox/platform]Compare CPU's temperature against critical thresho…
stephenxs Apr 28, 2020
6d1582c
[loganalyzer] Fail flag support in context manager and callback execu…
neethajohn Apr 29, 2020
7c988f7
[Mellanox] add test cases for dynamic minimum fan speed and psu fan s…
Junchao-Mellanox Apr 29, 2020
ab3ab7c
[pytest/nbrhost]: add neighbor config info in nbrhost class (#1621)
lguohan Apr 29, 2020
cfe549f
[vxlan-decap]: Flush ptf rx buffer before ptf send packet. (#1608)
iris00522 Apr 29, 2020
74536ef
add links to virtual switch testbed setup
lguohan Apr 29, 2020
19e92b1
[telemetry certs] deploy certs for telemetry in deploy-mg (#1614)
pra-moh Apr 30, 2020
40ac5ce
[pytest] Add support to populate DUT FDB entries (#1593)
tahmed-dev Apr 30, 2020
124baf1
Revert "[telemetry certs] deploy certs for telemetry in deploy-mg (#1…
lguohan Apr 30, 2020
6111cc0
[Mellanox]Fix sensor data for 3700/3700c/3800 (#1627)
stephenxs Apr 30, 2020
0931bdb
Ignore test in test_turn_on_off_psu_and_check_psustatus (#1606)
stephenxs Apr 30, 2020
8e608c3
Fixed fixture scope conflict for DUT monitor (#1630)
yvolynets-mlnx Apr 30, 2020
c912484
[test plans] Moving test plans from sonic-wiki repo to sonic-mgmt rep…
yxieca Apr 30, 2020
24dc050
[pytest/bgp_gr_test]: add bgp graceful restart helper test (#1623)
lguohan Apr 30, 2020
68fdda6
[Mellanox] Adjust test cases for fan led support (#1580)
Junchao-Mellanox Apr 30, 2020
c8aea29
Fixes in test_drop_counters.py (#1610)
yvolynets-mlnx Apr 30, 2020
980623d
[swap_syncd] Fix failures in swap syncd (#1632)
daall May 1, 2020
8db8d5c
[pytest]: fix typo in parse default route output (#1634)
lguohan May 1, 2020
21c94d6
Update README.md
xinliu-seattle May 1, 2020
979616a
Update README.md
xinliu-seattle May 1, 2020
c0cdedb
[pytest/ansible] Add support for multi-duts (#1432)
tahmed-dev May 5, 2020
1b4e047
Pytest organization proposal (#1605)
neethajohn May 5, 2020
d9bc3ab
[test/dir_bcast] Convert dir_bcast.yml to pytest (#1609)
Blueve May 5, 2020
9a8fc1e
[copp] Convert COPP test to pytest (#1633)
daall May 5, 2020
2b975c8
[doc]: Update document to specify non-empty password file (#1638)
smaheshm May 5, 2020
e355432
Revert "[copp] Convert COPP test to pytest (#1633)" (#1643)
lguohan May 5, 2020
4163834
[pytest] Fix ptf_runner issue introduced by COPP test conversion (#1644)
daall May 6, 2020
1b53125
[fast-reboot]: Fix IP range overlapping. (#1637)
nazariig May 6, 2020
9814959
Add support of specifying multiple inventory files (#1645)
wangxin May 7, 2020
f88cff2
[pytest] Fix module import issue when running whole test suite (#1642)
tahmed-dev May 7, 2020
c31a5fb
[advanced-reboot] Fix IP range overalapping (#1653)
tahmed-dev May 7, 2020
77e455d
Deprecate ansible_host.py (#1658)
wangxin May 12, 2020
ebd43dd
[Mellanox] Fix sensor data for SN4700 (#1660)
shlomibitton May 12, 2020
cbaef7e
[drop counters] Improve support for combined L2/L3 drop counters (#1649)
daall May 12, 2020
08748cb
[pytest/ntp] Use local time when behind proxy (#1640)
msosyak May 12, 2020
6e6c81d
[recover] improve adaptive recover methods (#1652)
yxieca May 12, 2020
4d1c2fd
[sensors] Added support of Montara nad Maverics platforms to sku-sens…
vsenchyshyn May 12, 2020
50a6bc1
[pytest] PFCWD config test (#1620)
neethajohn May 12, 2020
7cc4e87
[advanced-reboot] Fix testing hang when doing BGP shutdown on Arista …
vincentchiang-ec May 13, 2020
e5c5c5b
[file organization] Rename folder names to allow markers to work agai…
yxieca May 13, 2020
f11d076
Rename 'platform' directory to 'platform_tests' to prevent conflicts …
jleveque May 13, 2020
8a92685
Deprecate fixture testbed_devices (#1665)
wangxin May 15, 2020
86dc687
[Mellanox] Fix sensor data for 2010 (#1673)
Junchao-Mellanox May 15, 2020
18aabc9
Update Th buffer params for Alpha change (#1676)
neethajohn May 18, 2020
1e20ac6
[QoS] Fix qos issues (#1664)
stephenxs May 19, 2020
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
# Description
Tools for managing, configuring and monitoring SONiC

# CII Best Practices
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3933/badge)](https://bestpractices.coreinfrastructure.org/projects/3933)

# Contribution guide

All contributors must sign a contribution license agreement before contributions can be accepted.
[How to become a contributer](https://github.com/Azure/SONiC/wiki/Becoming-a-contributor)

Expand Down
1 change: 1 addition & 0 deletions ansible/README.testbed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- [Overview](doc/README.testbed.Overview.md)
- [Setup](doc/README.testbed.Setup.md)
- [Virtual Switch Testbed Setup](doc/README.testbed.VsSetup.md)
- [Topology](doc/README.testbed.Topology.md)
- [Configuration](doc/README.testbed.Config.md)
- [Minigraph](doc/README.testbed.Minigraph.md)
Expand Down
50 changes: 26 additions & 24 deletions ansible/TestbedProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

Requirement:
python version: 2.X
python package: PyYAML 3.12 (or later)
python package: PyYAML 3.12 (or later)

PyYaml Install Instructions:
[1] Download PyYAML from https://pyyaml.org/wiki/PyYAML
[1] Download PyYAML from https://pyyaml.org/wiki/PyYAML
[2] Unpack the archive
[3] Install the package by executing (python setup.py install)
[4] Test if installation was successful (python setup.py test)
[4] Test if installation was successful (python setup.py test)

Usage:
put TestbedProcessing.py and testbed.yaml under sonic-mgmt/ansible
python TestbedProcessing.py
Expand All @@ -25,12 +25,12 @@
Arguments:
-i : the testbed.yaml file to parse
-basedir : the basedir for the project
-backupdir : the backup directory for the files
-backupdir : the backup directory for the files

Script Procedure
[1] Backup the files we will be copying
[1] Backup the files we will be copying
[2] Load testbed.yaml into dictionaries for easy processing
[3] Generate the files via methods defined below
[3] Generate the files via methods defined below
"""

# ARGUMENTS TO PARSE
Expand Down Expand Up @@ -86,7 +86,7 @@

"""
represent_none(self, _)
modifies yaml to replace null values with blanks
modifies yaml to replace null values with blanks
SOURCE: https://stackoverflow.com/questions/37200150/can-i-dump-blank-instead-of-null-in-yaml-pyyaml/37201633#3720163
"""
def represent_none(self, _):
Expand All @@ -98,7 +98,7 @@ def represent_none(self, _):
generateDictionary(data, result, category)
@:parameter data - the dictionary to iterate through
@:parameter result - the resulting dictionary
Generates the dictionaries that are used when creating csv, yml, or text files
Generates the dictionaries that are used when creating csv, yml, or text files
"""
def generateDictionary(data, result, category):
for key, value in data[category].items():
Expand All @@ -108,7 +108,7 @@ def generateDictionary(data, result, category):
"""
makeMain(data, outfile)
@:parameter data - the dictionary to look through
@:parameter outfile - the file to write to
@:parameter outfile - the file to write to
makeMain generates the vm_host/main.yml file
it pulls two sets of information; dictionary data and proxy data
"""
Expand All @@ -122,7 +122,9 @@ def makeMain(data, outfile):
"skip_image_downloading": veos.get("skip_image_downloading"),
"vm_console_base": veos.get("vm_console_base"),
"memory": veos.get("memory"),
"max_fp_num": veos.get("max_fp_num")
"max_fp_num": veos.get("max_fp_num"),
"ptf_bp_ip": veos.get("ptf_bp_ip"),
"ptf_bp_ipv6": veos.get("ptf_bp_ipv6")
}
proxy = {
"proxy_env": {
Expand All @@ -141,21 +143,21 @@ def makeMain(data, outfile):
@:parameter data - the dictionary to look for (in this case: veos)
@:parameter outfile - the file to write to
generates /group_vars/vm_host/creds.yml
pulls ansible_user, ansible_password, ansible_sudo_pass from vm_host_ansible into a dictionary
pulls ansible_user, ansible_password, ansible_become_pass from vm_host_ansible into a dictionary
"""
def makeVMHostCreds(data, outfile):
veos = data
result = {
"ansible_user": veos.get("vm_host_ansible").get("ansible_user"),
"ansible_password": veos.get("vm_host_ansible").get("ansible_password"),
"ansible_sudo_password": veos.get("vm_host_ansible").get("ansible_sudo_pass")
"ansible_become_pass": veos.get("vm_host_ansible").get("ansible_become_pass")
}
with open(outfile, "w") as toWrite:
toWrite.write("---\n")
yaml.dump(result, stream=toWrite, default_flow_style=False)

"""
makeSonicLabDevices(data, outfile)
makeSonicLabDevices(data, outfile)
@:parameter data - the dictionary to look through (devices dictionary)
@:parameter outfile - the file to write to
generates files/sonic_lab_devices.csv by pulling hostname, managementIP, hwsku, and type
Expand Down Expand Up @@ -190,14 +192,14 @@ def makeSonicLabDevices(data, outfile):


"""
makeTestbed(data, outfile)
makeTestbed(data, outfile)
@:parameter data - the dictionary to look through (devices dictionary)
@:parameter outfile - the file to write to
generates /testbed.csv by pulling confName, groupName, topo, ptf_image_name, ptf_ip, server, vm_base, dut, and comment
error handling: checks if attribute values are None type or string "None"
"""
def makeTestbed(data, outfile):
csv_columns = "# conf-name,group-name,topo,ptf_image_name,ptf_ip,server,vm_base,dut,ptf,comment"
csv_columns = "# conf-name,group-name,topo,ptf_image_name,ptf,ptf_ip,server,vm_base,dut,comment"
topology = data
csv_file = outfile

Expand Down Expand Up @@ -236,7 +238,7 @@ def makeTestbed(data, outfile):
if not comment:
comment = ""

row = confName + "," + groupName + "," + topo + "," + ptf_image_name + "," + ptf_ip + "," + server + "," + vm_base + "," + dut + "," + ptf + "," + comment
row = confName + "," + groupName + "," + topo + "," + ptf_image_name + "," + ptf + "," + ptf_ip + "," + server + "," + vm_base + "," + dut + "," + comment
f.write(row + "\n")
except IOError:
print("I/O error: issue creating testbed.csv")
Expand All @@ -245,9 +247,9 @@ def makeTestbed(data, outfile):
"""
makeSonicLabLinks(data, outfile)
@:parameter data - the dictionary to look through (devices dictionary)
@:parameter outfile - the file to write to
@:parameter outfile - the file to write to
generates /files/sonic_lab_links.csv by pulling startPort, endPort, bandWidth, vlanID, vlanMode
error handling: checks if attribute values are None type or string "None"
error handling: checks if attribute values are None type or string "None"
"""
def makeSonicLabLinks(data, outfile):
csv_columns = "StartDevice,StartPort,EndDevice,EndPort,BandWidth,VlanID,VlanMode"
Expand Down Expand Up @@ -308,7 +310,7 @@ def makeEOSCreds(data, outfile):
"""
makeFanout_secrets(data, outfile)
@:parameter data - reads from devices dictionary
@:parameter outfile - the file to write to
@:parameter outfile - the file to write to
Makes /group_vars/fanout/secrets.yml
Finds the fanout secret credentials by using "fanout" as the value to search for under device_type
Under github and personal topology configuration, there is only one designated fanout switch credential
Expand Down Expand Up @@ -428,7 +430,7 @@ def makeLab(data, devices, testbed, outfile):
"""
makeVeos(data, veos, devices, outfile)
@:parameter data - reads from either veos-groups, this helps separate the function into 3 components; children, host, vars
@:parameter veos - reads from either veos
@:parameter veos - reads from either veos
@:parameter devices - reads from devices
@:parameter outfile - writes to veos
"""
Expand Down Expand Up @@ -487,8 +489,8 @@ def makeHostVar(data):

"""
updateDockerRegistry
@:parameter outfile - the file to write to
hard codes the docker registry to search locally rather than externally
@:parameter outfile - the file to write to
hard codes the docker registry to search locally rather than externally
"""
def updateDockerRegistry(docker_registry, outfile):
if (not docker_registry.get("docker_registry_host")) or (not docker_registry.get("docker_registry_username")) or (not docker_registry.get("docker_registry_password")):
Expand Down
50 changes: 49 additions & 1 deletion ansible/config_sonic_basedon_testbed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,17 @@
testbed_file: testbed.csv
when: testbed_file is not defined

- name: Set default dut index
set_fact:
dut_index: 0
when: dut_index is not defined

- name: Gathering testbed information
test_facts: testbed_name="{{ testbed_name }}" testbed_file="{{ testbed_file }}"
delegate_to: localhost

- fail: msg="The DUT you are trying to run test does not belongs to this testbed"
when: testbed_facts['dut'] != inventory_hostname
when: testbed_facts['duts'][dut_index] != inventory_hostname

- name: set testbed_type
set_fact:
Expand Down Expand Up @@ -144,6 +149,49 @@
become: true
when: stat_result.stat.exists is defined and stat_result.stat.exists

- name: Init account key and proxy
set_fact:
core_key: ""
core_proxy: ""

- name: read account key
set_fact:
core_key: "{{ corefile_uploader['azure_sonic_core_storage']['account_key'] }}"
when: corefile_uploader['azure_sonic_core_storage']['account_key'] is defined

- name: read https proxy
set_fact:
core_proxy: "{{ corefile_uploader['env']['https_proxy'] }}"
when: corefile_uploader['env']['https_proxy'] is defined

- name: Put secret in core_analyzer.rc.json
lineinfile:
name: /etc/sonic/core_analyzer.rc.json
regexp: '(^.*)account_key'
line: '\1account_key": "{{ core_key }}",'
backrefs: yes
become: true
when: core_key != ""

- name: Put https-proxy in core_analyzer.rc.json
lineinfile:
name: /etc/sonic/core_analyzer.rc.json
regexp: '(^.*)https_proxy'
line: '\1https_proxy": "{{ core_proxy }}"'
backrefs: yes
become: true
when: core_proxy != ""

- name: enable core uploader service
become: true
command: systemctl enable core_uploader.service
when: core_key != ""

- name: start core uploader service
become: true
command: systemctl start core_uploader.service
when: core_key != ""

- name: Replace snmp community string
lineinfile:
name: /etc/sonic/snmp.yml
Expand Down
2 changes: 1 addition & 1 deletion ansible/doc/README.testbed.VsSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ from the ```sonic-mgmt``` container. Then, test you can sudo without password pr
```
$ ./testbed-cli.sh -m veos.vtb -n 4 start-vms server_1 password.txt
```
- please note: Here "password.txt" is the ansible vault password file name/path. Ansible allows user use ansible vault to encrypt password files. By default, this shell script require a password file. If you are not using ansible vault, just create an empty file and pass the filename to the command line. The file name and location is created and maintained by user.
- please note: Here "password.txt" is the ansible vault password file name/path. Ansible allows user use ansible vault to encrypt password files. By default, this shell script require a password file. If you are not using ansible vault, just create a file with a dummy pasword and pass the filename to the command line. The file name and location is created and maintained by user.

Check that all VMs are up and running, and the passwd is ```123456```
```
Expand Down
131 changes: 131 additions & 0 deletions ansible/doc/README.testbed.cEOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# cEOS

This document discusses how to use cEOS as DUT neighbor device.

cEOS is the container-based EOS. All the software running inside
the container. Compared with vEOS, cEOS has much smaller memory
footprint.

Follow [instruction](README.testbed.VsSetup.md) to setup cEOS testbed.

In below example, there are four cEOS containers.

```
lgh@jenkins-worker-15:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fe48c207a51c ceosimage:4.23.2F-1 "/sbin/init systemd.…" 8 days ago Up 8 days ceos_vms6-1_VM0103
52297010e66a ceosimage:4.23.2F-1 "/sbin/init systemd.…" 8 days ago Up 8 days ceos_vms6-1_VM0102
8dd95269b312 ceosimage:4.23.2F-1 "/sbin/init systemd.…" 8 days ago Up 8 days ceos_vms6-1_VM0101
3a50dd481bfb ceosimage:4.23.2F-1 "/sbin/init systemd.…" 8 days ago Up 8 days ceos_vms6-1_VM0100
b91b48145def debian:jessie "bash" 8 days ago Up 8 days net_vms6-1_VM0103
d1ff26d84249 debian:jessie "bash" 8 days ago Up 8 days net_vms6-1_VM0102
1489f52b9617 debian:jessie "bash" 8 days ago Up 8 days net_vms6-1_VM0101
ce1214a008ed debian:jessie "bash" 8 days ago Up 8 days net_vms6-1_VM0100
```

## Resource consumption

A cEOS containers consumes around 1G memory.

```
lgh@jenkins-worker-15:~$ docker stats --no-stream
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 6
fe48c207a51c ceos_vms6-1_VM0103 2.04% 970.9MiB / 125.9GiB 0.75% 0B / 0B 365MB / 55.8GB 138
52297010e66a ceos_vms6-1_VM0102 2.19% 965.4MiB / 125.9GiB 0.75% 0B / 0B 237MB / 55.6GB 139
8dd95269b312 ceos_vms6-1_VM0101 1.93% 980.9MiB / 125.9GiB 0.76% 0B / 0B 300MB / 55.9GB 138
3a50dd481bfb ceos_vms6-1_VM0100 2.05% 970.2MiB / 125.9GiB 0.75% 0B / 0B 365MB / 56.1GB 138
```

## Network Setup

We first create a base container `net_${testbed_name}_${vm_name}`, inject six ethernet ports into the base container,
and then start cEOS `ceos_${testbed_name}_${vm_name}` container on top of the base container. The six ethernet ports
are used for
- 1 management port
- 4 front panel ports to DUT
- 1 backplane port to PTF docker

```
+------------+ +----+
| cEOS Ma0 +--------- VM0100-m ---+ br |
| | +----+
| |
| | +--------------+
| Et1 +----------VM0100-t0---+ br-VM0100-0 |
| | +--------------+
| |
| | +--------------+
| Et2 +----------VM0100-t1---+ br-VM0100-1 |
| | +--------------+
| |
| | +--------------+
| Et3 +----------VM0100-t2---+ br-VM0100-2 |
| | +--------------+
| |
| | +--------------+
| Et4 +----------VM0100-t3---+ br-VM0100-3 |
| | +--------------+
| |
| | +--------------+
| Et5 +----------VM0100-back--+ br-b-vms6-1 |
| | +--------------+
+------------+
```

## Configuration

The `/mnt/flash` in cEOS container is mount to `/data/ceos/ceos_${testbed_name}_${vm_name}` on the host. The `/mnt/flash`
contiains the configuration file and logs.

```
lgh@jenkins-worker-15:~$ ls -l /data/ceos/ceos_vms6-1_VM0100/
total 40
-rw-rw-r--+ 1 root root 924 Mar 31 07:35 AsuFastPktTransmit.log
drwxrwxr-x+ 2 root root 4096 Mar 31 03:31 Fossil
-rw-rw-r--+ 1 root root 568 Mar 31 07:35 SsuRestore.log
-rw-rw-r--+ 1 root root 568 Mar 31 07:35 SsuRestoreLegacy.log
drwxr-xr-x+ 4 897 88 4096 Mar 31 07:35 archive
drwxrwx---+ 3 root root 4096 Mar 18 06:12 debug
drwxrwxr-x+ 2 root root 4096 Mar 18 06:12 fastpkttx.backup
-rw-rw-r--+ 1 root root 180 Mar 31 07:35 kickstart-config
drwxrwxr-x+ 3 root root 4096 Apr 8 09:11 persist
-rw-rwxr--+ 1 root root 1915 Mar 18 06:12 startup-config
```

## Login

There are two ways to get into cEOS container

1. docker exec
```
lgh@jenkins-worker-15:~$ docker exec -it ceos_vms6-1_VM0100 Cli
ARISTA01T1>show int status
Port Name Status Vlan Duplex Speed Type Flags Encapsulation
Et1 connected in Po1 full unconf EbraTestPhyPort
Et2 connected 1 full unconf EbraTestPhyPort
Et3 connected 1 full unconf EbraTestPhyPort
Et4 connected 1 full unconf EbraTestPhyPort
Et5 backplane connected routed full unconf EbraTestPhyPort
Ma0 connected routed full 10G 10/100/1000
Po1 connected routed full unconf N/A

ARISTA01T1>
```

2. ssh
```
lgh@jenkins-worker-15:~$ ssh [email protected]
Password:
ARISTA01T1>show int status
Port Name Status Vlan Duplex Speed Type Flags Encapsulation
Et1 connected in Po1 full unconf EbraTestPhyPort
Et2 connected 1 full unconf EbraTestPhyPort
Et3 connected 1 full unconf EbraTestPhyPort
Et4 connected 1 full unconf EbraTestPhyPort
Et5 backplane connected routed full unconf EbraTestPhyPort
Ma0 connected routed full 10G 10/100/1000
Po1 connected routed full unconf N/A

ARISTA01T1>
```

Loading