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

support sonic-mgmt multi-dut gen-mg for LC #3419

Closed
wants to merge 184 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
d9de985
support sonic-mgmt multi-dut gen-mg for LC
Apr 29, 2021
85e3181
[framework]Implement mux-cable flap counter in mux_simulator_server (…
bingwang-ms Mar 31, 2021
20121be
[Dynamic Buffer Calc] Enhance dynamic buffer calculation test (#3074)
stephenxs Mar 31, 2021
ff32b73
[kvm]: add bgp/test_bgp_update_timer.py to t0 topo (#3243)
lguohan Mar 31, 2021
c0b01b1
[Qos] Update SAI QoS tests to include LAG ports in the tests (#3119)
smaheshm Mar 31, 2021
4defc64
remove unused template file (#3250)
ramakristipati Apr 1, 2021
6be0686
Update 'get_crm_facts' helper function (#3247)
bingwang-ms Apr 1, 2021
d49bf4b
[dualtor]Implement Server -> Standby ToR orchagent test cases. (#3111)
bingwang-ms Apr 1, 2021
0f8b25d
[dualtor]: Mock all y_cable methods for mux sim (#3242)
theasianpianist Apr 1, 2021
39ef1c9
[ACL] Fix ACL rules are not ready yet when test cases are started in …
shihhsien-wang Apr 1, 2021
3efeb21
Add tests for new APIs for chassis and convert existing API tests to …
rawal01 Apr 1, 2021
2335d1f
Change topology mark of test_bgp_gr_helper.py from t1 to any (#3248)
wangxin Apr 1, 2021
1b70f4a
Fixed test_platform_info.py for MSN4600C (#3203)
ppikh Apr 1, 2021
8c0d234
[dualtor]: Recover interfaces after set_drop action (#3237)
theasianpianist Apr 1, 2021
acbab76
Set warm reboot downtime expectation to 0s (#3257)
vaibhavhd Apr 1, 2021
99df398
[dualtor]: Add link down test cases (#3183)
theasianpianist Apr 1, 2021
9fe927b
[SNMP][LLDP][multi-asic]: Modify LLDP test case to (#3226)
SuvarnaMeenakshi Apr 1, 2021
677d2b4
[reporting] Add support for uploading pdu status info from devutils (…
daall Apr 1, 2021
01f6644
Log bgp routing status in SSH VM thread (#3225)
shi-su Apr 1, 2021
ef7698f
[PFCWD][MASIC] Update pfcwd tests cases to run on multi ASIC platform…
smaheshm Apr 2, 2021
1a560be
Skip pfc pause lossless test (#3253)
neethajohn Apr 2, 2021
e5fe4a4
Announce route support for T2 chassis topology (#3115)
oxygen980 Apr 2, 2021
7efa1f0
[reporting] Fix root for pdu status data upload (#3265)
daall Apr 2, 2021
111612e
[garp_service]: Make module scoped (#3244)
theasianpianist Apr 2, 2021
5a200b0
fix dhcp relay pytest (#3268)
Apr 2, 2021
dc3383c
Warmboot KVM tests - replace docker-exec 1s timeout with 5s (#3266)
vaibhavhd Apr 3, 2021
ec59acf
Add soft-reboot to upgrade path test (#3144)
sujinmkang Apr 3, 2021
5df25a8
[Mellanox] Enable dynamic buffer calculation after reloading minigrap…
stephenxs Apr 3, 2021
57b1ae5
[Everflow] Add a 50msec buffer for stability in EverFlow Test (#3271)
vivekrnv Apr 4, 2021
d975bbb
[SFlow] Dynamic Agent-id and ifindex issue resolved (#3261)
vivekrnv Apr 5, 2021
a8e9c5d
Advance reboot test - timing measurement and status collection (#3246)
vaibhavhd Apr 5, 2021
c860db1
[multi-asic] changes to crm tests to support multi asic platforms (…
arlakshm Apr 5, 2021
768d4f4
[dualtor] Add server down test case (#3231)
bingwang-ms Apr 6, 2021
54683c1
Fix enabld/disable rsyslog rate limitation. (#3279)
bingwang-ms Apr 6, 2021
0aafa43
[Mellanox] Fixed allowed CPU temperature (#3202)
ppikh Apr 6, 2021
7ce0117
[test_fgnhg] Test enhancement for link operational change and matchmo…
anish-n Apr 6, 2021
69622a7
Simplify the code for getting DUT management IP (#3281)
wangxin Apr 7, 2021
0ab18df
Increse timeout for shuting down and starting VM (#3267)
bingwang-ms Apr 7, 2021
9f0e916
Update 'get_disabled_container_list'. (#3280)
bingwang-ms Apr 7, 2021
1b4377d
[dualtor-bgp]: Improve BGP failure tests (#3286)
theasianpianist Apr 7, 2021
af55da6
[dualtor][DualTorIO] Fix thread hang waiting for io_ready (#3262)
lolyu Apr 8, 2021
72b4a14
[dualtor][test_ipinip] Fix bugs (#3249)
lolyu Apr 8, 2021
91599b7
Update dynamic_th value in existing table instead of creating a new o…
neethajohn Apr 8, 2021
01cc5d8
Warm reboot test logging changes, and wait for finalizer to finish (#…
vaibhavhd Apr 8, 2021
46b6acd
[report uploader] bundle up all reports and upload together (#3292)
yxieca Apr 8, 2021
2f4f937
Improve the regex for matching all ERR syslog (#3282)
wangxin Apr 8, 2021
ad0f348
[dualtor] Add script testing heartbeat failure scenario (#3273)
wangxin Apr 9, 2021
01a394d
Improve the method of getting interface MAC address (#3283)
wangxin Apr 9, 2021
fd78ded
Fix incorrect logging of 'is_failed' (#3287)
wangxin Apr 9, 2021
f7a23ac
Modified SNMP, LLDP and PC testcases for T2 topology (#2935)
oxygen980 Apr 9, 2021
e8a953b
Added recover_method param for sanity_check. (#3163)
Apr 9, 2021
5643722
[devutils] add pdu_failure support (#3227)
yxieca Apr 9, 2021
8888613
Fix a typo in qos test (#3301)
stephenxs Apr 9, 2021
20cc296
Add regex to match BFN device which combined L2 and L3 drop counters …
bratashX Apr 9, 2021
32c1a3d
Add local port mirroring test plan and test cases (#3050)
vcheketx Apr 9, 2021
9306c8a
Modified crm/tacacs/autorestart testcases to use enum_rand_one_* fixt…
oxygen980 Apr 9, 2021
d347928
[multi-asic] Enable Everflow policier test case (#3295)
abdosi Apr 9, 2021
2f70e79
[test_vlan] Test case for QinQ packet switched based on outer vlan ta…
anish-n Apr 9, 2021
6a4f287
[Keysight] Changes to bind ptf_ip with keysight-api-server container …
nirmalya-keysight Apr 9, 2021
e32bfcd
Add test cases for SIP/DIP_LINK_LOCAL (#3304)
bratashX Apr 9, 2021
a73f32b
[pytest] Add test to add properties to Spytest Junit-xml file (#3200)
lolyu Apr 9, 2021
32174fa
[multi-asic]: Add set of test cases to be run on multi-asic (#3239)
SuvarnaMeenakshi Apr 9, 2021
83478b8
[sonic] wait for switch become reachable after load minigraph (#3305)
yxieca Apr 9, 2021
1b9824e
Use string upto the first '_' to check if this is a supported topolog…
sanmalho-git Apr 9, 2021
5006dbe
[pytest] Improve log format (#3299)
lolyu Apr 10, 2021
c5cff49
Test plan for LAG on Distributed VOQ System (#3033)
oxygen980 Apr 12, 2021
b7f1d56
[Mellanox][QoS] Fix an error in checking whether shared headroom pool…
stephenxs Apr 12, 2021
208ab4b
[multi asic] Change the fib test to support multi asic platform (#3214)
arlakshm Apr 12, 2021
bdff22c
Modifying remove_topo to selectively remove keysight_api_server (#3215)
nirmalya-keysight Apr 12, 2021
c8d46fa
[pfcwd] Add test to verify PFCWD functionality after toggling port (#…
volodymyrsamotiy Apr 12, 2021
0e1522f
[dualtor]: Increase allowed disruption time (#3308)
theasianpianist Apr 12, 2021
cc41a57
Skip crm test for acl if DATAACL table doesn't exist. (#3313)
bingwang-ms Apr 13, 2021
aa6a844
[dualtor] Implement dualtor T1 -> Standby Tor orchagent test cases. …
bingwang-ms Apr 13, 2021
40fcbb5
[dualtor] add 'test_link_drop' (#3289)
lolyu Apr 13, 2021
adb71de
[pytest.ini]: Restore color to log levels (#3318)
theasianpianist Apr 13, 2021
a4f917c
[Dual Tor] Allow early stop for send and sniffer threads (#3296)
vaibhavhd Apr 13, 2021
9fe4509
[multi-asic] Fix ACL testcase for multi-asic (#3316)
abdosi Apr 13, 2021
7db315c
[Mellanox] Remove check for /var/run/hw-management/config/suspend (#3…
Junchao-Mellanox Apr 13, 2021
ec05114
[Mellanox] Enable mocking regular file (#3310)
Junchao-Mellanox Apr 13, 2021
33f2c7c
[everflow] stabilize policer test (#3315)
stepanblyschak Apr 13, 2021
fd4aec9
Update test_crm_fdb_entry to support multi asic. (#3311)
bingwang-ms Apr 14, 2021
48a6161
[multi-asic] fix everflow ipv6 test (#3326)
abdosi Apr 14, 2021
8698ae4
[SAI QoS] Update saitest for PGHeadroomWatermarkTest, QSharedWatermar…
smaheshm Apr 14, 2021
59763d5
[lab] Rename devices in sample connection graph (#3325)
neethajohn Apr 14, 2021
d3b6559
[pretest]: Inject mux client simulator to host (#3319)
theasianpianist Apr 14, 2021
a448a4b
[minigraph]: Generate correct sequential IPv6 server addrs (#3330)
theasianpianist Apr 15, 2021
abc9b23
Improve run_tests.sh to support ignore or include test folders (#3322)
wangxin Apr 15, 2021
ade897c
[warm-reboot] Start finalizer-check after control plane is UP (#3329)
vaibhavhd Apr 15, 2021
ea333cc
[upgrade_sonic] Do cleanup before installation (#3334)
lolyu Apr 15, 2021
f77d0db
Move 'get_disabled_container_list' to dut_utils.py (#3335)
bingwang-ms Apr 15, 2021
152c89f
Fix issue:#3328, In test_snmp_phy_entity.py there is 3 simple errors …
JibinBao Apr 15, 2021
27178ff
[rdma] Support portchannel interfaces in the topology (#3300)
baiwei0427 Apr 15, 2021
faabd80
[iface_namingmode] Change route for test_show_ip_route_v6 (#3212)
AndriiLozovyi Apr 15, 2021
df8d4a6
Parallelizing sanity check and log analyzer on DUTs in a multi-dut te…
sanmalho-git Apr 15, 2021
4fc8ae4
Add tests for validating the RESTAPIs exposed by SONiC (#3255)
sumukhatv Apr 15, 2021
5e4bdf6
[pdu] address a few PDU/PSU related issues (#3333)
yxieca Apr 15, 2021
b0b36c9
[test_curl] Fix mvrf test_curl (#3339)
AndriiLozovyi Apr 15, 2021
a2e5c22
Support for KVM based virtual T2 VoQ chassis (#3218)
sanmalho-git Apr 15, 2021
99afb4c
[dualtor-arp]: Make compatible with older images (#3307)
theasianpianist Apr 15, 2021
320f39b
[pytest]: Allow specifying specific DUT for multi-dut testbeds (#3327)
theasianpianist Apr 15, 2021
bffdfc5
Enhance test_sfp to deal with SFP xcvrs which can't reset (#3204)
andywongarista Apr 15, 2021
51be251
[dual_tor_io] Improve packet generation (#3314)
lolyu Apr 15, 2021
cab2673
[dualtor] Add neighbor entry orchagent testcase (#3031)
lolyu Apr 15, 2021
c12b6d8
[acl] Skip default deny rule test case for egress ACLs (#3341)
daall Apr 16, 2021
5fe486b
[dualtor][orchagent] Add active ToR neighbor testcase (#3349)
lolyu Apr 17, 2021
54a290c
Fix pipeline - use DUT name instead of testbed name in pytest cmd (#3…
vaibhavhd Apr 17, 2021
c6046f4
[rdma] Support L3 interfaces (#3347)
baiwei0427 Apr 18, 2021
516d4c4
Fix _ns_arg (#3348)
bingwang-ms Apr 19, 2021
31037f5
[dualtor]: Test fixes (#3342)
theasianpianist Apr 19, 2021
e3a69a8
Modified library/port_alias.py to have flexibility to include interna…
oxygen980 Apr 19, 2021
244e539
[port_utils] Update port_utils to match new z9332f port aliases (#3364)
daall Apr 20, 2021
c74200c
[dualtor] Add downstream standby mux toggle with route to server adde…
vaibhavhd Apr 20, 2021
a365bdf
[add topo] protect against none type (#3365)
yxieca Apr 20, 2021
982c763
[Mellanox] Removed invalid sensors path for msn2100 and msn2010 (#3363)
ppikh Apr 20, 2021
33e9b04
fix 'DEFAULT_NAMESPACE' is not defined or imported in test of test_fg…
JibinBao Apr 20, 2021
d3f56a4
Test cases for LAG on Distributed VOQ System (#3148)
oxygen980 Apr 20, 2021
b5b0aca
[Sub-ports] Added test case which validates that packets are routed b…
OleksandrKozodoi Apr 20, 2021
39a181f
[multi-asic]: Update test_interfaces test case for multi-asic platfor…
SuvarnaMeenakshi Apr 20, 2021
a75fced
Platform tests: remove autouse of loganalyzer fixture (#3356)
vaibhavhd Apr 20, 2021
d3d7a59
[advance_reboot] Check for IO variables value before reporting downti…
vaibhavhd Apr 21, 2021
fb34598
[rdma] Add support to generate minigraph for Tgen testbeds (#3317)
neethajohn Apr 21, 2021
01c30e1
[doc]: Update README.testbed.VsSetup.md (#3377)
judyjoseph Apr 21, 2021
67ceeda
Add topo files for tgen topology minigraph generation (#3340)
neethajohn Apr 21, 2021
0dc2509
Add back the support of pytest option "--host-pattern all" (#3367)
wangxin Apr 21, 2021
2bd7a84
added an explicit test skip for test_lag when no LAGs found (#3360)
antonptashnik Apr 21, 2021
24387ee
[crm] address CRM test issue on multi-dut testbed (#3388)
yxieca Apr 21, 2021
feda19d
[copp] Throttle server send-rate so that DUT does not get overwhelmed…
daall Apr 22, 2021
1c05763
[advance-reboot] Store timing data into a json file for warm/fast reb…
vaibhavhd Apr 22, 2021
507033b
[sonic fanout] make sure sonic fanout hostname type is str (#3390)
yxieca Apr 22, 2021
bead329
Ensure interface exists before adding neighbor (#3386)
shi-su Apr 22, 2021
9bc7fc7
[test_interface]: verify the interface mac equal to the router mac (#…
lguohan Apr 22, 2021
816a16d
Update dscp mode to uniform (#3374)
prsunny Apr 22, 2021
c03c9d0
[ASCI type] add variation of TD2 lspci signature (#3393)
yxieca Apr 22, 2021
ea5c1fe
Fix for Spytest issue:#3160 (#3394)
Abdul-Raheem10 Apr 22, 2021
bda3059
Fix 'del self.ports' exception in ptfadapter. (#3379)
bingwang-ms Apr 23, 2021
0fe6ca6
[rdma] Rename tgen topologies (#3391)
neethajohn Apr 23, 2021
dfee777
Fixed pfc_asym test case (#3370)
yvolynets-mlnx Apr 23, 2021
325db94
[rdma] Avoid add-topo failure when no VMs are associated with a testb…
neethajohn Apr 23, 2021
69eabf2
[rdma] Update PFC watchdog test cases to support L3 and portchannel i…
baiwei0427 Apr 23, 2021
3d75169
Fix the exabgp dump file growth issue (#3366)
wangxin Apr 25, 2021
e782f11
[sanity_check]: Run garp service and icmp responder (#3404)
theasianpianist Apr 26, 2021
226d0dd
[rdma] Enable test runs on tgen topology (#3403)
neethajohn Apr 26, 2021
6cf2979
Fix test_fdb_mac_expire on dualtor testbed. (#3399)
bingwang-ms Apr 27, 2021
804a935
[dualtor] Import fixture 'change_mac_addresses' and restart mux-simul…
wangxin Apr 27, 2021
41fa347
Fix importing issue for test report uploading (#3408)
wangxin Apr 27, 2021
0effceb
Specify dependent package 'aiohttp' for test reporting (#3409)
wangxin Apr 27, 2021
f36efb8
Add loganalyzer for sairedis for advanced reboot tests (#3378)
shi-su Apr 27, 2021
fcb293c
Bypass connection checker for ptfadapter (#3415)
bingwang-ms Apr 27, 2021
f65a9cd
[rdma] Update connection info for ixia api server (#3413)
neethajohn Apr 27, 2021
b5dc935
[Mellanox] Fixed issue: failed to recover mock file (#3407)
Junchao-Mellanox Apr 27, 2021
59d705c
[platform] fixed undefined variable in test test_platform_info.py (#3…
ppikh Apr 27, 2021
421adda
[rdma] Update ptfhost fixture to handle keysight api docker (#3414)
neethajohn Apr 27, 2021
07fa56d
[dualtor][orchagent] Add mac move testcases (#3395)
lolyu Apr 28, 2021
23ef435
[dualtor][orchagent]Fix bugs on mocked single tor (#3417)
lolyu Apr 29, 2021
c9bd8fe
[multi asic] multi asic changes for traffic_shift test (#3240)
judyjoseph Apr 29, 2021
2ffa240
Fix issue with MAC being present in FDB after fdb flush (#3420)
vcheketx Apr 30, 2021
b340494
[qos] Skip test when test port set is empty (#3425)
neethajohn Apr 30, 2021
3af2e9a
[rdma] Update Tgen API sample script (#3421)
baiwei0427 Apr 30, 2021
6f17cee
[rdma] Apply tgen marker at file level (#3432)
neethajohn Apr 30, 2021
66f3f87
[rdma] Fix teardown failure if Session is None (#3433)
neethajohn Apr 30, 2021
e1883d6
[sanity_check]: Fix crash due to invisible fixture (#3427)
theasianpianist May 1, 2021
ec9e14e
Add tests cont_link_flap, system_health, platform_info, reboot to run…
rawal01 May 2, 2021
c87c67b
[Ruijie] Add new platform B6510-48VS8CQ (#3406)
tim-rj May 2, 2021
71a3fcd
[qos] Enable PG Shared Watermark tests on Th2 (#3424)
neethajohn May 3, 2021
f9243a7
Check if expected log for a defined action shows up in syslog (#3332)
kellyyeh May 3, 2021
4557103
Fix the TUNNEL MUX config and use sonic-cfggen (#3431)
vaibhavhd May 3, 2021
2c36d34
Use supervisorctl to restart the thermalctl processes on pmon docker …
sanmalho-git May 4, 2021
219599b
[multi asic] Change the test_dip_sip for multi asic platforms (#3073)
arlakshm May 4, 2021
5244cb1
[multi asic] multi asic changes for iface name tests (#3238)
arlakshm May 4, 2021
0e463d0
return none if pdu controller hosts not defined in inventory (#3412)
rawal01 May 4, 2021
39bec8a
[vxlan/vnet] Enhance VNET test to verify source VxLAN port for receiv…
ayurkiv-nvda May 4, 2021
2082c35
[wr_arp] Fix vlan_port in the response packet (#3438)
vaibhavhd May 4, 2021
9364d88
Fix errors in MUX_CABLE table to config DB: add one-shot config (#3436)
vaibhavhd May 4, 2021
3f21ce3
[rdma] Disable loganalyzer for pfc reboot testcases (#3439)
neethajohn May 4, 2021
179fd49
Additional RESTAPI tests (#3346)
sumukhatv May 4, 2021
893ca34
Updated test params for QoS/MMU for Arista-7050CX3-32S-C32 & Arista-7…
vmittal-msft May 5, 2021
e67d536
Fix system health tests (#3437)
AntonHryshchuk May 5, 2021
7b9ae47
[sanity_check]: Enable recover for mux sanity (#3441)
theasianpianist May 5, 2021
759ff53
[pytest] Test the feature of monitoring critical processes by Monit. …
yozhao101 May 5, 2021
4f09f70
[multi-asic]: Add azure pipeline script to run kvm test (#3241)
SuvarnaMeenakshi May 5, 2021
0f52af2
[ixia/Keysight] Adding IxANVL automated deployment using PTF32 topolo…
aganguly-keysight May 6, 2021
a4b103c
Adapting fib test for T2 topology (#3135)
oxygen980 May 6, 2021
3142cdc
[crm] only set ARP cache limit setting when needed (#3389)
yxieca May 6, 2021
b78f5d6
support sonic-mgmt multi-dut gen-mg for LC
Apr 29, 2021
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
96 changes: 96 additions & 0 deletions ansible/TestbedProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ def makeLabSecrets(data, outfile):
"""
def makeLab(data, devices, testbed, outfile):
deviceGroup = data
start_switchid = 0
with open(outfile, "w") as toWrite:
for key, value in deviceGroup.items():
#children section
Expand All @@ -377,6 +378,7 @@ def makeLab(data, devices, testbed, outfile):
toWrite.write("[" + key + "]\n")
for host in value.get("host"):
entry = host
dev = devices.get(host.lower())

if "ptf" in key:
try: #get ansible host
Expand Down Expand Up @@ -416,6 +418,96 @@ def makeLab(data, devices, testbed, outfile):
entry += "\tansible_ssh_pass=" + ansible_ssh_pass
except:
print("\t\t" + host + ": ansible_ssh_pass not found")
try: #get hwsku
hwsku = dev.get("hwsku")
if hwsku is not None:
entry += "\thwsku=" + hwsku
except:
print("\t\t" + host + ": hwsku not found")

try: #get card_type
card_type = dev.get("card_type")
if card_type is not None:
entry += "\tcard_type=" + card_type
except:
print("\t\t" + host + ": card_type not found")

try: #get num_asics
num_asics = dev.get("num_asics")
if num_asics is not None:
entry += "\tnum_asics=" + str( num_asics )
except:
print("\t\t" + host + " num_asics not found")

if card_type != 'supervisor':
entry += "\tstart_switchid=" + str( start_switchid )
if num_asic is not None:
start_switchid += int( num_asic )
else:
start_switchid += 1

try: #get frontend_asics
frontend_asics = dev.get("frontend_asics")
if frontend_asics is not None:
entry += "\tfrontend_asics=" + frontend_asics.__str__()
except:
print("\t\t" + host + ": frontend_asics not found")

try: #get asics_host_ip
asics_host_ip = dev.get("asics_host_ip")
if asics_host_ip is not None:
entry += " \tasics_host_ip=" + str( asics_host_ip )
except:
print("\t\t" + host + " asics_host_ip not found")

try: #get asics_host_ipv6
asics_host_ipv6 = dev.get("asics_host_ipv6")
if asics_host_ipv6 is not None:
entry += "\tasics_host_ipv6=" + str( asics_host_ipv6 )
except:
print("\t\t" + host + " asics_host_ipv6 not found")

try: #get voq_inband_ip
voq_inband_ip = dev.get("voq_inband_ip")
if voq_inband_ip is not None:
entry += "\tvoq_inband_ip=" + str( voq_inband_ip )
except:
saravanansv marked this conversation as resolved.
Show resolved Hide resolved
print("\t\t" + host + " voq_inband_ip not found")

try: #get voq_inband_ipv6
voq_inband_ip = dev.get("voq_inband_ipv6")
if voq_inband_ip is not None:
entry += "\tvoq_inband_ipv6=" + str( voq_inband_ipv6 )
except:
print("\t\t" + host + " voq_inband_ipv6 not found")

try: #get voq_inband_intf
voq_inband_intf = dev.get("voq_inband_intf")
if voq_inband_intf is not None:
entry += "\tvoq_inband_intf=" + str( voq_inband_intf )
except:
print("\t\t" + host + " voq_inband_intf not found")

try: #get voq_inband_type
voq_inband_type = dev.get("voq_inband_type")
if voq_inband_type is not None:
entry += "\tvoq_inband_type=" + str( voq_inband_type )
except:
print("\t\t" + host + " voq_inband_type not found")

try: #get switch_type
switch_type = dev.get("switch_type")
if switch_type is not None:
entry += "\tswitch_type=" + str( switch_type )
except:
print("\t\t" + host + " switch_type not found")

try: #get max_cores
max_cores = dev.get("max_cores")
if max_cores is not None:
entry += "\tmax_cores=" + str( max_cores )
except:
print("\t\t" + host + " max_cores not found")

toWrite.write(entry + "\n")
toWrite.write("\n")
Expand Down Expand Up @@ -457,6 +549,10 @@ def makeVeos(data, veos, devices, outfile):
try:
ansible_host = devices.get(host.lower()).get("ansible").get("ansible_host")
entry += "\tansible_host=" + ansible_host.split("/")[0]
if dev.get("device_type") == "DevSonic":
entry += "\ttype=" + dev.get("type")
entry += "\thwsku=" + dev.get("hwsku")
entry += "\tcard_type=" + dev.get("card_type")
except:
try:
ansible_host = veos.get(key).get(host).get("ansible_host")
Expand Down
2 changes: 1 addition & 1 deletion ansible/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ sudo_exe = sudo
#sudo_flags = -H

# SSH timeout
timeout = 10
timeout = 30

# default user to use for playbooks if user is not specified
# (/usr/bin/ansible will use current user as default)
Expand Down
37 changes: 34 additions & 3 deletions ansible/config_sonic_basedon_testbed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
set_fact:
topo: "{{ testbed_facts['topo'] }}"

- name: set ptf image name
set_fact:
ptf_image: "{{ testbed_facts['ptf_image_name'] }}"

- name: set vm
set_fact:
vm_base: "{{ testbed_facts['vm_base'] }}"
Expand All @@ -71,14 +75,29 @@
delegate_to: localhost

- name: find interface name mapping and individual interface speed if defined from dut
port_alias: hwsku="{{ hwsku }}"
port_alias:
hwsku: "{{ hwsku }}"
card_type: "{{ card_type | default('fixed') }}"
hostname: "{{ inventory_hostname | default('') }}"
start_switchid: "{{ start_switchid | default(0) }}"
when: deploy is defined and deploy|bool == true

- name: find interface name mapping and individual interface speed if defined with local data
port_alias: hwsku="{{ hwsku }}" num_asic="{{ num_asics }}"
port_alias:
hwsku="{{ hwsku }}"
num_asic="{{ num_asics }}"
card_type: "{{ card_type | default('fixed') }}"
hostname: "{{ inventory_hostname | default('') }}"
start_switchid: "{{ start_switchid | default(0) }}"
delegate_to: localhost
when: deploy is not defined or deploy|bool == false

- name: set all VoQ information
set_fact:
all_sysports: "{{ all_system_ports | default( [] ) + item.value['ansible_facts']['sysports'] }}"
with_dict: "{{ hostvars }}"
when: item.value['ansible_facts']['sysports'] is defined

- name: find all enabled host_interfaces
set_fact:
host_if_indexes: "{{ vm_topo_config['host_interfaces_by_dut'][dut_index|int] | difference(vm_topo_config['disabled_host_interfaces_by_dut'][dut_index|int]) }}"
Expand Down Expand Up @@ -111,7 +130,7 @@
when: vm_file is not defined

- set_fact:
VM_topo: "{% if 'ptf' in topo %}False{% else %}True{% endif %}"
VM_topo: "{% if 'ptf' in topo or 'docker-keysight-api-server' in ptf_image %}False{% else %}True{% endif %}"
remote_dut: "{{ ansible_ssh_host }}"

- name: gather testbed VM informations
Expand Down Expand Up @@ -377,6 +396,18 @@
become: true
shell: config load_minigraph -y

- name: Wait for switch to become reachable again
become: false
local_action: wait_for
args:
host: "{{ ansible_host }}"
port: 22
state: started
search_regex: "OpenSSH_[\\w\\.]+ Debian"
delay: 10
timeout: 600
changed_when: false

- name: execute cli "config bgp startup all" to bring up all bgp sessions for test
become: true
shell: config bgp startup all
Expand Down
18 changes: 16 additions & 2 deletions ansible/devutils
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,19 @@ def action_pdu_status(parameters):
show_data_output(header, data, parameters['json'])


def action_pdu_failures(parameters):
header, data = action_pdu(parameters, 'status')
failures = []
for entry in data:
if parameters['json']:
if any(x['output_watts'] == '0' for x in entry['PDU status']):
failures.append(entry)
else:
if any(x['output_watts'] == '0' for x in entry[2]):
failures.append(entry)
show_data_output(header, failures, parameters['json'])


def action_pdu_off(parameters):
header, data = action_pdu(parameters, 'off')
show_data_output(header, data, parameters['json'])
Expand Down Expand Up @@ -324,9 +337,9 @@ def main():
parser.add_argument('-6', '--ipv6', help='Include IPv6', action='store_true',
required=False, default=False)
parser.add_argument('-a', '--action',
help='Action towards host(s): list, ping, run, ssh, console, pdu_status, pdu_on, pdu_off, pdu_reboot, default list',
help='Action towards host(s): list, ping, run, ssh, console, pdu_status, pdu_on, pdu_off, pdu_reboot, pdu_failures, default list',
type=str, required=False, default='list',
choices=['list', 'ping', 'ssh', 'console', 'run', 'pdu_status', 'pdu_on', 'pdu_off', 'pdu_reboot'])
choices=['list', 'ping', 'ssh', 'console', 'run', 'pdu_status', 'pdu_on', 'pdu_off', 'pdu_reboot', 'pdu_failures'])
parser.add_argument('--cmd', help="Command to run on all hosts",
type=str, required=False)
parser.add_argument('-g', '--group', help='Groups: all, sonic, ptf, pdu, default all',
Expand Down Expand Up @@ -358,6 +371,7 @@ def main():
'pdu_off': action_pdu_off,
'pdu_on': action_pdu_on,
'pdu_reboot': action_pdu_reboot,
'pdu_failures': action_pdu_failures,
}
parameters = {'hosts': hosts,
'limit': args.limit,
Expand Down
Loading