Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Commit 081db8c

Browse files
author
Michael Smith
committed
2 parents 5afe904 + 310866f commit 081db8c

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

tests/acitoolkit_test.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,6 +2036,33 @@ def test_get_table(self):
20362036
epgs = EPG.get(session, app, tenant)
20372037
self.assertTrue(isinstance(EPG.get_table(epgs)[0], Table))
20382038

2039+
class TestLiveL2ExtDomain(TestLiveAPIC):
2040+
"""
2041+
Test L2ExtDomain class
2042+
"""
2043+
def test_get(self):
2044+
session = self.login_to_apic()
2045+
l2ext_domains = L2ExtDomain.get(session)
2046+
for l2ext_domain in l2ext_domains:
2047+
self.assertTrue(isinstance(l2ext_domain, L2ExtDomain))
2048+
2049+
class TestLiveL3ExtDomain(TestLiveAPIC):
2050+
"""
2051+
Test L3ExtDomain class
2052+
"""
2053+
def test_get(self):
2054+
session = self.login_to_apic()
2055+
l3ext_domains = L3ExtDomain.get(session)
2056+
for l3ext_domain in l3ext_domains:
2057+
self.assertTrue(isinstance(l3ext_domain, L3ExtDomain))
2058+
2059+
def test_get_json(self):
2060+
session = self.login_to_apic()
2061+
l3ext_domains = L3ExtDomain.get(session)
2062+
for l3ext_domain in l3ext_domains:
2063+
l3ext_domain_json = l3ext_domain.get_json()
2064+
self.assertTrue(type(l3ext_domain_json) is dict)
2065+
20392066

20402067
class TestLiveEPGDomain(TestLiveAPIC):
20412068
"""
@@ -2062,6 +2089,11 @@ def test_get(self):
20622089
session = self.login_to_apic()
20632090
endpoints = Endpoint.get(session)
20642091

2092+
def test_get_table(self):
2093+
session = self.login_to_apic()
2094+
endpoints = Endpoint.get(session)
2095+
self.assertTrue(isinstance(Endpoint.get_table(endpoints)[0], Table))
2096+
20652097

20662098
class TestApic(TestLiveAPIC):
20672099
def base_test_setup(self):
@@ -2515,6 +2547,18 @@ def test_contract_scope(self):
25152547
resp = session.push_to_apic(tenant.get_url(), data=tenant.get_json())
25162548
self.assertTrue(resp.ok)
25172549

2550+
def test_get_table(self):
2551+
session = self.login_to_apic()
2552+
tenants = Tenant.get(session)
2553+
self.assertTrue(len(tenants) > 0)
2554+
total_contracts = []
2555+
for tenant in tenants:
2556+
contracts = Contract.get(session, tenant)
2557+
for contract in contracts:
2558+
total_contracts.append(contract)
2559+
2560+
self.assertIsInstance(Contract.get_table(contracts)[0], Table)
2561+
25182562

25192563
class TestLiveOSPF(TestLiveAPIC):
25202564
def test_no_auth(self):
@@ -2674,6 +2718,8 @@ def test_monitor_stats(self):
26742718
live.addTest(unittest.makeSuite(TestLivePortChannel))
26752719
live.addTest(unittest.makeSuite(TestLiveAppProfile))
26762720
live.addTest(unittest.makeSuite(TestLiveEPG))
2721+
live.addTest(unittest.makeSuite(TestLiveL2ExtDomain))
2722+
live.addTest(unittest.makeSuite(TestLiveL3ExtDomain))
26772723
live.addTest(unittest.makeSuite(TestLiveEPGDomain))
26782724
live.addTest(unittest.makeSuite(TestLiveContracts))
26792725
live.addTest(unittest.makeSuite(TestLiveEndpoint))

0 commit comments

Comments
 (0)