@itentialopensource/adapter-apic 0.12.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CALLS.md +138 -0
- package/adapter.js +2078 -0
- package/adapterBase.js +38 -0
- package/entities/ApplicationProfileOperations/action.json +25 -0
- package/entities/ApplicationProfileOperations/schema.json +19 -0
- package/entities/BridgeDomainOperations/action.json +65 -0
- package/entities/BridgeDomainOperations/schema.json +21 -0
- package/entities/EPGOperations/action.json +86 -0
- package/entities/EPGOperations/schema.json +33 -0
- package/entities/TenantOperations/action.json +87 -0
- package/entities/TenantOperations/schema.json +22 -0
- package/entities/VLANPoolOperations/action.json +147 -0
- package/entities/VLANPoolOperations/schema.json +25 -0
- package/entities/VMMDomainOperations/action.json +46 -0
- package/entities/VMMDomainOperations/schema.json +31 -0
- package/entities/VRFOperations/action.json +45 -0
- package/entities/VRFOperations/schema.json +20 -0
- package/package.json +2 -2
- package/pronghorn.json +1104 -2
- package/report/adapterInfo.json +7 -7
- package/report/cisco-aci-apic-openapi.json +801 -0
- package/test/integration/adapterTestIntegration.js +585 -0
- package/test/unit/adapterBaseTestUnit.js +1 -1
- package/test/unit/adapterTestUnit.js +820 -0
|
@@ -1692,5 +1692,825 @@ describe('[unit] Apic Adapter Test', () => {
|
|
|
1692
1692
|
}
|
|
1693
1693
|
}).timeout(attemptTimeout);
|
|
1694
1694
|
});
|
|
1695
|
+
|
|
1696
|
+
describe('#getAllTenants - errors', () => {
|
|
1697
|
+
it('should have a getAllTenants function', (done) => {
|
|
1698
|
+
try {
|
|
1699
|
+
assert.equal(true, typeof a.getAllTenants === 'function');
|
|
1700
|
+
done();
|
|
1701
|
+
} catch (error) {
|
|
1702
|
+
log.error(`Test Failure: ${error}`);
|
|
1703
|
+
done(error);
|
|
1704
|
+
}
|
|
1705
|
+
}).timeout(attemptTimeout);
|
|
1706
|
+
});
|
|
1707
|
+
|
|
1708
|
+
describe('#getTenant - errors', () => {
|
|
1709
|
+
it('should have a getTenant function', (done) => {
|
|
1710
|
+
try {
|
|
1711
|
+
assert.equal(true, typeof a.getTenant === 'function');
|
|
1712
|
+
done();
|
|
1713
|
+
} catch (error) {
|
|
1714
|
+
log.error(`Test Failure: ${error}`);
|
|
1715
|
+
done(error);
|
|
1716
|
+
}
|
|
1717
|
+
}).timeout(attemptTimeout);
|
|
1718
|
+
it('should error if - missing tenantName', (done) => {
|
|
1719
|
+
try {
|
|
1720
|
+
a.getTenant(null, null, (data, error) => {
|
|
1721
|
+
try {
|
|
1722
|
+
const displayE = 'tenantName is required';
|
|
1723
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-getTenant', displayE);
|
|
1724
|
+
done();
|
|
1725
|
+
} catch (err) {
|
|
1726
|
+
log.error(`Test Failure: ${err}`);
|
|
1727
|
+
done(err);
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
} catch (error) {
|
|
1731
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1732
|
+
done(error);
|
|
1733
|
+
}
|
|
1734
|
+
}).timeout(attemptTimeout);
|
|
1735
|
+
});
|
|
1736
|
+
|
|
1737
|
+
describe('#getTenantWithFullSubtree - errors', () => {
|
|
1738
|
+
it('should have a getTenantWithFullSubtree function', (done) => {
|
|
1739
|
+
try {
|
|
1740
|
+
assert.equal(true, typeof a.getTenantWithFullSubtree === 'function');
|
|
1741
|
+
done();
|
|
1742
|
+
} catch (error) {
|
|
1743
|
+
log.error(`Test Failure: ${error}`);
|
|
1744
|
+
done(error);
|
|
1745
|
+
}
|
|
1746
|
+
}).timeout(attemptTimeout);
|
|
1747
|
+
it('should error if - missing tenantName', (done) => {
|
|
1748
|
+
try {
|
|
1749
|
+
a.getTenantWithFullSubtree(null, null, (data, error) => {
|
|
1750
|
+
try {
|
|
1751
|
+
const displayE = 'tenantName is required';
|
|
1752
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-getTenantWithFullSubtree', displayE);
|
|
1753
|
+
done();
|
|
1754
|
+
} catch (err) {
|
|
1755
|
+
log.error(`Test Failure: ${err}`);
|
|
1756
|
+
done(err);
|
|
1757
|
+
}
|
|
1758
|
+
});
|
|
1759
|
+
} catch (error) {
|
|
1760
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1761
|
+
done(error);
|
|
1762
|
+
}
|
|
1763
|
+
}).timeout(attemptTimeout);
|
|
1764
|
+
});
|
|
1765
|
+
|
|
1766
|
+
describe('#createTenantOrEnvironment - errors', () => {
|
|
1767
|
+
it('should have a createTenantOrEnvironment function', (done) => {
|
|
1768
|
+
try {
|
|
1769
|
+
assert.equal(true, typeof a.createTenantOrEnvironment === 'function');
|
|
1770
|
+
done();
|
|
1771
|
+
} catch (error) {
|
|
1772
|
+
log.error(`Test Failure: ${error}`);
|
|
1773
|
+
done(error);
|
|
1774
|
+
}
|
|
1775
|
+
}).timeout(attemptTimeout);
|
|
1776
|
+
it('should error if - missing body', (done) => {
|
|
1777
|
+
try {
|
|
1778
|
+
a.createTenantOrEnvironment(null, null, (data, error) => {
|
|
1779
|
+
try {
|
|
1780
|
+
const displayE = 'body is required';
|
|
1781
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createTenantOrEnvironment', displayE);
|
|
1782
|
+
done();
|
|
1783
|
+
} catch (err) {
|
|
1784
|
+
log.error(`Test Failure: ${err}`);
|
|
1785
|
+
done(err);
|
|
1786
|
+
}
|
|
1787
|
+
});
|
|
1788
|
+
} catch (error) {
|
|
1789
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1790
|
+
done(error);
|
|
1791
|
+
}
|
|
1792
|
+
}).timeout(attemptTimeout);
|
|
1793
|
+
});
|
|
1794
|
+
|
|
1795
|
+
describe('#createTenantResource - errors', () => {
|
|
1796
|
+
it('should have a createTenantResource function', (done) => {
|
|
1797
|
+
try {
|
|
1798
|
+
assert.equal(true, typeof a.createTenantResource === 'function');
|
|
1799
|
+
done();
|
|
1800
|
+
} catch (error) {
|
|
1801
|
+
log.error(`Test Failure: ${error}`);
|
|
1802
|
+
done(error);
|
|
1803
|
+
}
|
|
1804
|
+
}).timeout(attemptTimeout);
|
|
1805
|
+
it('should error if - missing tenantName', (done) => {
|
|
1806
|
+
try {
|
|
1807
|
+
a.createTenantResource(null, null, null, (data, error) => {
|
|
1808
|
+
try {
|
|
1809
|
+
const displayE = 'tenantName is required';
|
|
1810
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createTenantResource', displayE);
|
|
1811
|
+
done();
|
|
1812
|
+
} catch (err) {
|
|
1813
|
+
log.error(`Test Failure: ${err}`);
|
|
1814
|
+
done(err);
|
|
1815
|
+
}
|
|
1816
|
+
});
|
|
1817
|
+
} catch (error) {
|
|
1818
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1819
|
+
done(error);
|
|
1820
|
+
}
|
|
1821
|
+
}).timeout(attemptTimeout);
|
|
1822
|
+
it('should error if - missing body', (done) => {
|
|
1823
|
+
try {
|
|
1824
|
+
a.createTenantResource('fakeparam', null, null, (data, error) => {
|
|
1825
|
+
try {
|
|
1826
|
+
const displayE = 'body is required';
|
|
1827
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createTenantResource', displayE);
|
|
1828
|
+
done();
|
|
1829
|
+
} catch (err) {
|
|
1830
|
+
log.error(`Test Failure: ${err}`);
|
|
1831
|
+
done(err);
|
|
1832
|
+
}
|
|
1833
|
+
});
|
|
1834
|
+
} catch (error) {
|
|
1835
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1836
|
+
done(error);
|
|
1837
|
+
}
|
|
1838
|
+
}).timeout(attemptTimeout);
|
|
1839
|
+
});
|
|
1840
|
+
|
|
1841
|
+
describe('#getAllVRFs - errors', () => {
|
|
1842
|
+
it('should have a getAllVRFs function', (done) => {
|
|
1843
|
+
try {
|
|
1844
|
+
assert.equal(true, typeof a.getAllVRFs === 'function');
|
|
1845
|
+
done();
|
|
1846
|
+
} catch (error) {
|
|
1847
|
+
log.error(`Test Failure: ${error}`);
|
|
1848
|
+
done(error);
|
|
1849
|
+
}
|
|
1850
|
+
}).timeout(attemptTimeout);
|
|
1851
|
+
});
|
|
1852
|
+
|
|
1853
|
+
describe('#getAllBridgeDomains - errors', () => {
|
|
1854
|
+
it('should have a getAllBridgeDomains function', (done) => {
|
|
1855
|
+
try {
|
|
1856
|
+
assert.equal(true, typeof a.getAllBridgeDomains === 'function');
|
|
1857
|
+
done();
|
|
1858
|
+
} catch (error) {
|
|
1859
|
+
log.error(`Test Failure: ${error}`);
|
|
1860
|
+
done(error);
|
|
1861
|
+
}
|
|
1862
|
+
}).timeout(attemptTimeout);
|
|
1863
|
+
});
|
|
1864
|
+
|
|
1865
|
+
describe('#createDHCPRelayPolicy - errors', () => {
|
|
1866
|
+
it('should have a createDHCPRelayPolicy function', (done) => {
|
|
1867
|
+
try {
|
|
1868
|
+
assert.equal(true, typeof a.createDHCPRelayPolicy === 'function');
|
|
1869
|
+
done();
|
|
1870
|
+
} catch (error) {
|
|
1871
|
+
log.error(`Test Failure: ${error}`);
|
|
1872
|
+
done(error);
|
|
1873
|
+
}
|
|
1874
|
+
}).timeout(attemptTimeout);
|
|
1875
|
+
it('should error if - missing tenantName', (done) => {
|
|
1876
|
+
try {
|
|
1877
|
+
a.createDHCPRelayPolicy(null, null, null, null, (data, error) => {
|
|
1878
|
+
try {
|
|
1879
|
+
const displayE = 'tenantName is required';
|
|
1880
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createDHCPRelayPolicy', displayE);
|
|
1881
|
+
done();
|
|
1882
|
+
} catch (err) {
|
|
1883
|
+
log.error(`Test Failure: ${err}`);
|
|
1884
|
+
done(err);
|
|
1885
|
+
}
|
|
1886
|
+
});
|
|
1887
|
+
} catch (error) {
|
|
1888
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1889
|
+
done(error);
|
|
1890
|
+
}
|
|
1891
|
+
}).timeout(attemptTimeout);
|
|
1892
|
+
it('should error if - missing dhcpRelayPolicyName', (done) => {
|
|
1893
|
+
try {
|
|
1894
|
+
a.createDHCPRelayPolicy('fakeparam', null, null, null, (data, error) => {
|
|
1895
|
+
try {
|
|
1896
|
+
const displayE = 'dhcpRelayPolicyName is required';
|
|
1897
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createDHCPRelayPolicy', displayE);
|
|
1898
|
+
done();
|
|
1899
|
+
} catch (err) {
|
|
1900
|
+
log.error(`Test Failure: ${err}`);
|
|
1901
|
+
done(err);
|
|
1902
|
+
}
|
|
1903
|
+
});
|
|
1904
|
+
} catch (error) {
|
|
1905
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1906
|
+
done(error);
|
|
1907
|
+
}
|
|
1908
|
+
}).timeout(attemptTimeout);
|
|
1909
|
+
it('should error if - missing body', (done) => {
|
|
1910
|
+
try {
|
|
1911
|
+
a.createDHCPRelayPolicy('fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
1912
|
+
try {
|
|
1913
|
+
const displayE = 'body is required';
|
|
1914
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createDHCPRelayPolicy', displayE);
|
|
1915
|
+
done();
|
|
1916
|
+
} catch (err) {
|
|
1917
|
+
log.error(`Test Failure: ${err}`);
|
|
1918
|
+
done(err);
|
|
1919
|
+
}
|
|
1920
|
+
});
|
|
1921
|
+
} catch (error) {
|
|
1922
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1923
|
+
done(error);
|
|
1924
|
+
}
|
|
1925
|
+
}).timeout(attemptTimeout);
|
|
1926
|
+
});
|
|
1927
|
+
|
|
1928
|
+
describe('#associateDHCPRelayToBD - errors', () => {
|
|
1929
|
+
it('should have a associateDHCPRelayToBD function', (done) => {
|
|
1930
|
+
try {
|
|
1931
|
+
assert.equal(true, typeof a.associateDHCPRelayToBD === 'function');
|
|
1932
|
+
done();
|
|
1933
|
+
} catch (error) {
|
|
1934
|
+
log.error(`Test Failure: ${error}`);
|
|
1935
|
+
done(error);
|
|
1936
|
+
}
|
|
1937
|
+
}).timeout(attemptTimeout);
|
|
1938
|
+
it('should error if - missing tenantName', (done) => {
|
|
1939
|
+
try {
|
|
1940
|
+
a.associateDHCPRelayToBD(null, null, null, null, (data, error) => {
|
|
1941
|
+
try {
|
|
1942
|
+
const displayE = 'tenantName is required';
|
|
1943
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateDHCPRelayToBD', displayE);
|
|
1944
|
+
done();
|
|
1945
|
+
} catch (err) {
|
|
1946
|
+
log.error(`Test Failure: ${err}`);
|
|
1947
|
+
done(err);
|
|
1948
|
+
}
|
|
1949
|
+
});
|
|
1950
|
+
} catch (error) {
|
|
1951
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1952
|
+
done(error);
|
|
1953
|
+
}
|
|
1954
|
+
}).timeout(attemptTimeout);
|
|
1955
|
+
it('should error if - missing bdName', (done) => {
|
|
1956
|
+
try {
|
|
1957
|
+
a.associateDHCPRelayToBD('fakeparam', null, null, null, (data, error) => {
|
|
1958
|
+
try {
|
|
1959
|
+
const displayE = 'bdName is required';
|
|
1960
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateDHCPRelayToBD', displayE);
|
|
1961
|
+
done();
|
|
1962
|
+
} catch (err) {
|
|
1963
|
+
log.error(`Test Failure: ${err}`);
|
|
1964
|
+
done(err);
|
|
1965
|
+
}
|
|
1966
|
+
});
|
|
1967
|
+
} catch (error) {
|
|
1968
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1969
|
+
done(error);
|
|
1970
|
+
}
|
|
1971
|
+
}).timeout(attemptTimeout);
|
|
1972
|
+
it('should error if - missing body', (done) => {
|
|
1973
|
+
try {
|
|
1974
|
+
a.associateDHCPRelayToBD('fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
1975
|
+
try {
|
|
1976
|
+
const displayE = 'body is required';
|
|
1977
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateDHCPRelayToBD', displayE);
|
|
1978
|
+
done();
|
|
1979
|
+
} catch (err) {
|
|
1980
|
+
log.error(`Test Failure: ${err}`);
|
|
1981
|
+
done(err);
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1984
|
+
} catch (error) {
|
|
1985
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1986
|
+
done(error);
|
|
1987
|
+
}
|
|
1988
|
+
}).timeout(attemptTimeout);
|
|
1989
|
+
});
|
|
1990
|
+
|
|
1991
|
+
describe('#getAllApplicationProfiles - errors', () => {
|
|
1992
|
+
it('should have a getAllApplicationProfiles function', (done) => {
|
|
1993
|
+
try {
|
|
1994
|
+
assert.equal(true, typeof a.getAllApplicationProfiles === 'function');
|
|
1995
|
+
done();
|
|
1996
|
+
} catch (error) {
|
|
1997
|
+
log.error(`Test Failure: ${error}`);
|
|
1998
|
+
done(error);
|
|
1999
|
+
}
|
|
2000
|
+
}).timeout(attemptTimeout);
|
|
2001
|
+
});
|
|
2002
|
+
|
|
2003
|
+
describe('#getAllEPGs - errors', () => {
|
|
2004
|
+
it('should have a getAllEPGs function', (done) => {
|
|
2005
|
+
try {
|
|
2006
|
+
assert.equal(true, typeof a.getAllEPGs === 'function');
|
|
2007
|
+
done();
|
|
2008
|
+
} catch (error) {
|
|
2009
|
+
log.error(`Test Failure: ${error}`);
|
|
2010
|
+
done(error);
|
|
2011
|
+
}
|
|
2012
|
+
}).timeout(attemptTimeout);
|
|
2013
|
+
});
|
|
2014
|
+
|
|
2015
|
+
describe('#getEPGsInTenant - errors', () => {
|
|
2016
|
+
it('should have a getEPGsInTenant function', (done) => {
|
|
2017
|
+
try {
|
|
2018
|
+
assert.equal(true, typeof a.getEPGsInTenant === 'function');
|
|
2019
|
+
done();
|
|
2020
|
+
} catch (error) {
|
|
2021
|
+
log.error(`Test Failure: ${error}`);
|
|
2022
|
+
done(error);
|
|
2023
|
+
}
|
|
2024
|
+
}).timeout(attemptTimeout);
|
|
2025
|
+
it('should error if - missing queryTargetFilter', (done) => {
|
|
2026
|
+
try {
|
|
2027
|
+
a.getEPGsInTenant(null, null, (data, error) => {
|
|
2028
|
+
try {
|
|
2029
|
+
const displayE = 'queryTargetFilter is required';
|
|
2030
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-getEPGsInTenant', displayE);
|
|
2031
|
+
done();
|
|
2032
|
+
} catch (err) {
|
|
2033
|
+
log.error(`Test Failure: ${err}`);
|
|
2034
|
+
done(err);
|
|
2035
|
+
}
|
|
2036
|
+
});
|
|
2037
|
+
} catch (error) {
|
|
2038
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2039
|
+
done(error);
|
|
2040
|
+
}
|
|
2041
|
+
}).timeout(attemptTimeout);
|
|
2042
|
+
});
|
|
2043
|
+
|
|
2044
|
+
describe('#createEPGWithVMM - errors', () => {
|
|
2045
|
+
it('should have a createEPGWithVMM function', (done) => {
|
|
2046
|
+
try {
|
|
2047
|
+
assert.equal(true, typeof a.createEPGWithVMM === 'function');
|
|
2048
|
+
done();
|
|
2049
|
+
} catch (error) {
|
|
2050
|
+
log.error(`Test Failure: ${error}`);
|
|
2051
|
+
done(error);
|
|
2052
|
+
}
|
|
2053
|
+
}).timeout(attemptTimeout);
|
|
2054
|
+
it('should error if - missing tenantName', (done) => {
|
|
2055
|
+
try {
|
|
2056
|
+
a.createEPGWithVMM(null, null, null, null, (data, error) => {
|
|
2057
|
+
try {
|
|
2058
|
+
const displayE = 'tenantName is required';
|
|
2059
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createEPGWithVMM', displayE);
|
|
2060
|
+
done();
|
|
2061
|
+
} catch (err) {
|
|
2062
|
+
log.error(`Test Failure: ${err}`);
|
|
2063
|
+
done(err);
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
2066
|
+
} catch (error) {
|
|
2067
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2068
|
+
done(error);
|
|
2069
|
+
}
|
|
2070
|
+
}).timeout(attemptTimeout);
|
|
2071
|
+
it('should error if - missing appProfileName', (done) => {
|
|
2072
|
+
try {
|
|
2073
|
+
a.createEPGWithVMM('fakeparam', null, null, null, (data, error) => {
|
|
2074
|
+
try {
|
|
2075
|
+
const displayE = 'appProfileName is required';
|
|
2076
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createEPGWithVMM', displayE);
|
|
2077
|
+
done();
|
|
2078
|
+
} catch (err) {
|
|
2079
|
+
log.error(`Test Failure: ${err}`);
|
|
2080
|
+
done(err);
|
|
2081
|
+
}
|
|
2082
|
+
});
|
|
2083
|
+
} catch (error) {
|
|
2084
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2085
|
+
done(error);
|
|
2086
|
+
}
|
|
2087
|
+
}).timeout(attemptTimeout);
|
|
2088
|
+
it('should error if - missing body', (done) => {
|
|
2089
|
+
try {
|
|
2090
|
+
a.createEPGWithVMM('fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
2091
|
+
try {
|
|
2092
|
+
const displayE = 'body is required';
|
|
2093
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createEPGWithVMM', displayE);
|
|
2094
|
+
done();
|
|
2095
|
+
} catch (err) {
|
|
2096
|
+
log.error(`Test Failure: ${err}`);
|
|
2097
|
+
done(err);
|
|
2098
|
+
}
|
|
2099
|
+
});
|
|
2100
|
+
} catch (error) {
|
|
2101
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2102
|
+
done(error);
|
|
2103
|
+
}
|
|
2104
|
+
}).timeout(attemptTimeout);
|
|
2105
|
+
});
|
|
2106
|
+
|
|
2107
|
+
describe('#associateEPGWithVMM - errors', () => {
|
|
2108
|
+
it('should have a associateEPGWithVMM function', (done) => {
|
|
2109
|
+
try {
|
|
2110
|
+
assert.equal(true, typeof a.associateEPGWithVMM === 'function');
|
|
2111
|
+
done();
|
|
2112
|
+
} catch (error) {
|
|
2113
|
+
log.error(`Test Failure: ${error}`);
|
|
2114
|
+
done(error);
|
|
2115
|
+
}
|
|
2116
|
+
}).timeout(attemptTimeout);
|
|
2117
|
+
it('should error if - missing tenantName', (done) => {
|
|
2118
|
+
try {
|
|
2119
|
+
a.associateEPGWithVMM(null, null, null, null, null, (data, error) => {
|
|
2120
|
+
try {
|
|
2121
|
+
const displayE = 'tenantName is required';
|
|
2122
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateEPGWithVMM', displayE);
|
|
2123
|
+
done();
|
|
2124
|
+
} catch (err) {
|
|
2125
|
+
log.error(`Test Failure: ${err}`);
|
|
2126
|
+
done(err);
|
|
2127
|
+
}
|
|
2128
|
+
});
|
|
2129
|
+
} catch (error) {
|
|
2130
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2131
|
+
done(error);
|
|
2132
|
+
}
|
|
2133
|
+
}).timeout(attemptTimeout);
|
|
2134
|
+
it('should error if - missing appProfileName', (done) => {
|
|
2135
|
+
try {
|
|
2136
|
+
a.associateEPGWithVMM('fakeparam', null, null, null, null, (data, error) => {
|
|
2137
|
+
try {
|
|
2138
|
+
const displayE = 'appProfileName is required';
|
|
2139
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateEPGWithVMM', displayE);
|
|
2140
|
+
done();
|
|
2141
|
+
} catch (err) {
|
|
2142
|
+
log.error(`Test Failure: ${err}`);
|
|
2143
|
+
done(err);
|
|
2144
|
+
}
|
|
2145
|
+
});
|
|
2146
|
+
} catch (error) {
|
|
2147
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2148
|
+
done(error);
|
|
2149
|
+
}
|
|
2150
|
+
}).timeout(attemptTimeout);
|
|
2151
|
+
it('should error if - missing epgName', (done) => {
|
|
2152
|
+
try {
|
|
2153
|
+
a.associateEPGWithVMM('fakeparam', 'fakeparam', null, null, null, (data, error) => {
|
|
2154
|
+
try {
|
|
2155
|
+
const displayE = 'epgName is required';
|
|
2156
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateEPGWithVMM', displayE);
|
|
2157
|
+
done();
|
|
2158
|
+
} catch (err) {
|
|
2159
|
+
log.error(`Test Failure: ${err}`);
|
|
2160
|
+
done(err);
|
|
2161
|
+
}
|
|
2162
|
+
});
|
|
2163
|
+
} catch (error) {
|
|
2164
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2165
|
+
done(error);
|
|
2166
|
+
}
|
|
2167
|
+
}).timeout(attemptTimeout);
|
|
2168
|
+
it('should error if - missing body', (done) => {
|
|
2169
|
+
try {
|
|
2170
|
+
a.associateEPGWithVMM('fakeparam', 'fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
2171
|
+
try {
|
|
2172
|
+
const displayE = 'body is required';
|
|
2173
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateEPGWithVMM', displayE);
|
|
2174
|
+
done();
|
|
2175
|
+
} catch (err) {
|
|
2176
|
+
log.error(`Test Failure: ${err}`);
|
|
2177
|
+
done(err);
|
|
2178
|
+
}
|
|
2179
|
+
});
|
|
2180
|
+
} catch (error) {
|
|
2181
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2182
|
+
done(error);
|
|
2183
|
+
}
|
|
2184
|
+
}).timeout(attemptTimeout);
|
|
2185
|
+
});
|
|
2186
|
+
|
|
2187
|
+
describe('#getAllVMMDomains - errors', () => {
|
|
2188
|
+
it('should have a getAllVMMDomains function', (done) => {
|
|
2189
|
+
try {
|
|
2190
|
+
assert.equal(true, typeof a.getAllVMMDomains === 'function');
|
|
2191
|
+
done();
|
|
2192
|
+
} catch (error) {
|
|
2193
|
+
log.error(`Test Failure: ${error}`);
|
|
2194
|
+
done(error);
|
|
2195
|
+
}
|
|
2196
|
+
}).timeout(attemptTimeout);
|
|
2197
|
+
});
|
|
2198
|
+
|
|
2199
|
+
describe('#getVMwareVMMDomains - errors', () => {
|
|
2200
|
+
it('should have a getVMwareVMMDomains function', (done) => {
|
|
2201
|
+
try {
|
|
2202
|
+
assert.equal(true, typeof a.getVMwareVMMDomains === 'function');
|
|
2203
|
+
done();
|
|
2204
|
+
} catch (error) {
|
|
2205
|
+
log.error(`Test Failure: ${error}`);
|
|
2206
|
+
done(error);
|
|
2207
|
+
}
|
|
2208
|
+
}).timeout(attemptTimeout);
|
|
2209
|
+
it('should error if - missing queryTargetFilter', (done) => {
|
|
2210
|
+
try {
|
|
2211
|
+
a.getVMwareVMMDomains(null, null, (data, error) => {
|
|
2212
|
+
try {
|
|
2213
|
+
const displayE = 'queryTargetFilter is required';
|
|
2214
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-getVMwareVMMDomains', displayE);
|
|
2215
|
+
done();
|
|
2216
|
+
} catch (err) {
|
|
2217
|
+
log.error(`Test Failure: ${err}`);
|
|
2218
|
+
done(err);
|
|
2219
|
+
}
|
|
2220
|
+
});
|
|
2221
|
+
} catch (error) {
|
|
2222
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2223
|
+
done(error);
|
|
2224
|
+
}
|
|
2225
|
+
}).timeout(attemptTimeout);
|
|
2226
|
+
});
|
|
2227
|
+
|
|
2228
|
+
describe('#getAllVLANPools - errors', () => {
|
|
2229
|
+
it('should have a getAllVLANPools function', (done) => {
|
|
2230
|
+
try {
|
|
2231
|
+
assert.equal(true, typeof a.getAllVLANPools === 'function');
|
|
2232
|
+
done();
|
|
2233
|
+
} catch (error) {
|
|
2234
|
+
log.error(`Test Failure: ${error}`);
|
|
2235
|
+
done(error);
|
|
2236
|
+
}
|
|
2237
|
+
}).timeout(attemptTimeout);
|
|
2238
|
+
});
|
|
2239
|
+
|
|
2240
|
+
describe('#createDynamicVLANPool - errors', () => {
|
|
2241
|
+
it('should have a createDynamicVLANPool function', (done) => {
|
|
2242
|
+
try {
|
|
2243
|
+
assert.equal(true, typeof a.createDynamicVLANPool === 'function');
|
|
2244
|
+
done();
|
|
2245
|
+
} catch (error) {
|
|
2246
|
+
log.error(`Test Failure: ${error}`);
|
|
2247
|
+
done(error);
|
|
2248
|
+
}
|
|
2249
|
+
}).timeout(attemptTimeout);
|
|
2250
|
+
it('should error if - missing vlanPoolName', (done) => {
|
|
2251
|
+
try {
|
|
2252
|
+
a.createDynamicVLANPool(null, null, null, (data, error) => {
|
|
2253
|
+
try {
|
|
2254
|
+
const displayE = 'vlanPoolName is required';
|
|
2255
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createDynamicVLANPool', displayE);
|
|
2256
|
+
done();
|
|
2257
|
+
} catch (err) {
|
|
2258
|
+
log.error(`Test Failure: ${err}`);
|
|
2259
|
+
done(err);
|
|
2260
|
+
}
|
|
2261
|
+
});
|
|
2262
|
+
} catch (error) {
|
|
2263
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2264
|
+
done(error);
|
|
2265
|
+
}
|
|
2266
|
+
}).timeout(attemptTimeout);
|
|
2267
|
+
it('should error if - missing body', (done) => {
|
|
2268
|
+
try {
|
|
2269
|
+
a.createDynamicVLANPool('fakeparam', null, null, (data, error) => {
|
|
2270
|
+
try {
|
|
2271
|
+
const displayE = 'body is required';
|
|
2272
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createDynamicVLANPool', displayE);
|
|
2273
|
+
done();
|
|
2274
|
+
} catch (err) {
|
|
2275
|
+
log.error(`Test Failure: ${err}`);
|
|
2276
|
+
done(err);
|
|
2277
|
+
}
|
|
2278
|
+
});
|
|
2279
|
+
} catch (error) {
|
|
2280
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2281
|
+
done(error);
|
|
2282
|
+
}
|
|
2283
|
+
}).timeout(attemptTimeout);
|
|
2284
|
+
});
|
|
2285
|
+
|
|
2286
|
+
describe('#getVLANPoolDetails - errors', () => {
|
|
2287
|
+
it('should have a getVLANPoolDetails function', (done) => {
|
|
2288
|
+
try {
|
|
2289
|
+
assert.equal(true, typeof a.getVLANPoolDetails === 'function');
|
|
2290
|
+
done();
|
|
2291
|
+
} catch (error) {
|
|
2292
|
+
log.error(`Test Failure: ${error}`);
|
|
2293
|
+
done(error);
|
|
2294
|
+
}
|
|
2295
|
+
}).timeout(attemptTimeout);
|
|
2296
|
+
it('should error if - missing vlanPoolName', (done) => {
|
|
2297
|
+
try {
|
|
2298
|
+
a.getVLANPoolDetails(null, null, (data, error) => {
|
|
2299
|
+
try {
|
|
2300
|
+
const displayE = 'vlanPoolName is required';
|
|
2301
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-getVLANPoolDetails', displayE);
|
|
2302
|
+
done();
|
|
2303
|
+
} catch (err) {
|
|
2304
|
+
log.error(`Test Failure: ${err}`);
|
|
2305
|
+
done(err);
|
|
2306
|
+
}
|
|
2307
|
+
});
|
|
2308
|
+
} catch (error) {
|
|
2309
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2310
|
+
done(error);
|
|
2311
|
+
}
|
|
2312
|
+
}).timeout(attemptTimeout);
|
|
2313
|
+
});
|
|
2314
|
+
|
|
2315
|
+
describe('#createStaticVLANPool - errors', () => {
|
|
2316
|
+
it('should have a createStaticVLANPool function', (done) => {
|
|
2317
|
+
try {
|
|
2318
|
+
assert.equal(true, typeof a.createStaticVLANPool === 'function');
|
|
2319
|
+
done();
|
|
2320
|
+
} catch (error) {
|
|
2321
|
+
log.error(`Test Failure: ${error}`);
|
|
2322
|
+
done(error);
|
|
2323
|
+
}
|
|
2324
|
+
}).timeout(attemptTimeout);
|
|
2325
|
+
it('should error if - missing vlanPoolName', (done) => {
|
|
2326
|
+
try {
|
|
2327
|
+
a.createStaticVLANPool(null, null, null, (data, error) => {
|
|
2328
|
+
try {
|
|
2329
|
+
const displayE = 'vlanPoolName is required';
|
|
2330
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createStaticVLANPool', displayE);
|
|
2331
|
+
done();
|
|
2332
|
+
} catch (err) {
|
|
2333
|
+
log.error(`Test Failure: ${err}`);
|
|
2334
|
+
done(err);
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
} catch (error) {
|
|
2338
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2339
|
+
done(error);
|
|
2340
|
+
}
|
|
2341
|
+
}).timeout(attemptTimeout);
|
|
2342
|
+
it('should error if - missing body', (done) => {
|
|
2343
|
+
try {
|
|
2344
|
+
a.createStaticVLANPool('fakeparam', null, null, (data, error) => {
|
|
2345
|
+
try {
|
|
2346
|
+
const displayE = 'body is required';
|
|
2347
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-createStaticVLANPool', displayE);
|
|
2348
|
+
done();
|
|
2349
|
+
} catch (err) {
|
|
2350
|
+
log.error(`Test Failure: ${err}`);
|
|
2351
|
+
done(err);
|
|
2352
|
+
}
|
|
2353
|
+
});
|
|
2354
|
+
} catch (error) {
|
|
2355
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2356
|
+
done(error);
|
|
2357
|
+
}
|
|
2358
|
+
}).timeout(attemptTimeout);
|
|
2359
|
+
});
|
|
2360
|
+
|
|
2361
|
+
describe('#associateVLANPoolWithVMM - errors', () => {
|
|
2362
|
+
it('should have a associateVLANPoolWithVMM function', (done) => {
|
|
2363
|
+
try {
|
|
2364
|
+
assert.equal(true, typeof a.associateVLANPoolWithVMM === 'function');
|
|
2365
|
+
done();
|
|
2366
|
+
} catch (error) {
|
|
2367
|
+
log.error(`Test Failure: ${error}`);
|
|
2368
|
+
done(error);
|
|
2369
|
+
}
|
|
2370
|
+
}).timeout(attemptTimeout);
|
|
2371
|
+
it('should error if - missing vmmDomainName', (done) => {
|
|
2372
|
+
try {
|
|
2373
|
+
a.associateVLANPoolWithVMM(null, null, null, (data, error) => {
|
|
2374
|
+
try {
|
|
2375
|
+
const displayE = 'vmmDomainName is required';
|
|
2376
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateVLANPoolWithVMM', displayE);
|
|
2377
|
+
done();
|
|
2378
|
+
} catch (err) {
|
|
2379
|
+
log.error(`Test Failure: ${err}`);
|
|
2380
|
+
done(err);
|
|
2381
|
+
}
|
|
2382
|
+
});
|
|
2383
|
+
} catch (error) {
|
|
2384
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2385
|
+
done(error);
|
|
2386
|
+
}
|
|
2387
|
+
}).timeout(attemptTimeout);
|
|
2388
|
+
it('should error if - missing body', (done) => {
|
|
2389
|
+
try {
|
|
2390
|
+
a.associateVLANPoolWithVMM('fakeparam', null, null, (data, error) => {
|
|
2391
|
+
try {
|
|
2392
|
+
const displayE = 'body is required';
|
|
2393
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-associateVLANPoolWithVMM', displayE);
|
|
2394
|
+
done();
|
|
2395
|
+
} catch (err) {
|
|
2396
|
+
log.error(`Test Failure: ${err}`);
|
|
2397
|
+
done(err);
|
|
2398
|
+
}
|
|
2399
|
+
});
|
|
2400
|
+
} catch (error) {
|
|
2401
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2402
|
+
done(error);
|
|
2403
|
+
}
|
|
2404
|
+
}).timeout(attemptTimeout);
|
|
2405
|
+
});
|
|
2406
|
+
|
|
2407
|
+
describe('#getVMMDomainVLANPoolAssociation - errors', () => {
|
|
2408
|
+
it('should have a getVMMDomainVLANPoolAssociation function', (done) => {
|
|
2409
|
+
try {
|
|
2410
|
+
assert.equal(true, typeof a.getVMMDomainVLANPoolAssociation === 'function');
|
|
2411
|
+
done();
|
|
2412
|
+
} catch (error) {
|
|
2413
|
+
log.error(`Test Failure: ${error}`);
|
|
2414
|
+
done(error);
|
|
2415
|
+
}
|
|
2416
|
+
}).timeout(attemptTimeout);
|
|
2417
|
+
it('should error if - missing vmmDomainName', (done) => {
|
|
2418
|
+
try {
|
|
2419
|
+
a.getVMMDomainVLANPoolAssociation(null, null, (data, error) => {
|
|
2420
|
+
try {
|
|
2421
|
+
const displayE = 'vmmDomainName is required';
|
|
2422
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-getVMMDomainVLANPoolAssociation', displayE);
|
|
2423
|
+
done();
|
|
2424
|
+
} catch (err) {
|
|
2425
|
+
log.error(`Test Failure: ${err}`);
|
|
2426
|
+
done(err);
|
|
2427
|
+
}
|
|
2428
|
+
});
|
|
2429
|
+
} catch (error) {
|
|
2430
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2431
|
+
done(error);
|
|
2432
|
+
}
|
|
2433
|
+
}).timeout(attemptTimeout);
|
|
2434
|
+
});
|
|
2435
|
+
|
|
2436
|
+
describe('#addVLANRangeToPool - errors', () => {
|
|
2437
|
+
it('should have a addVLANRangeToPool function', (done) => {
|
|
2438
|
+
try {
|
|
2439
|
+
assert.equal(true, typeof a.addVLANRangeToPool === 'function');
|
|
2440
|
+
done();
|
|
2441
|
+
} catch (error) {
|
|
2442
|
+
log.error(`Test Failure: ${error}`);
|
|
2443
|
+
done(error);
|
|
2444
|
+
}
|
|
2445
|
+
}).timeout(attemptTimeout);
|
|
2446
|
+
it('should error if - missing vlanPoolName', (done) => {
|
|
2447
|
+
try {
|
|
2448
|
+
a.addVLANRangeToPool(null, null, null, null, null, (data, error) => {
|
|
2449
|
+
try {
|
|
2450
|
+
const displayE = 'vlanPoolName is required';
|
|
2451
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-addVLANRangeToPool', displayE);
|
|
2452
|
+
done();
|
|
2453
|
+
} catch (err) {
|
|
2454
|
+
log.error(`Test Failure: ${err}`);
|
|
2455
|
+
done(err);
|
|
2456
|
+
}
|
|
2457
|
+
});
|
|
2458
|
+
} catch (error) {
|
|
2459
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2460
|
+
done(error);
|
|
2461
|
+
}
|
|
2462
|
+
}).timeout(attemptTimeout);
|
|
2463
|
+
it('should error if - missing vlanStart', (done) => {
|
|
2464
|
+
try {
|
|
2465
|
+
a.addVLANRangeToPool('fakeparam', null, null, null, null, (data, error) => {
|
|
2466
|
+
try {
|
|
2467
|
+
const displayE = 'vlanStart is required';
|
|
2468
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-addVLANRangeToPool', displayE);
|
|
2469
|
+
done();
|
|
2470
|
+
} catch (err) {
|
|
2471
|
+
log.error(`Test Failure: ${err}`);
|
|
2472
|
+
done(err);
|
|
2473
|
+
}
|
|
2474
|
+
});
|
|
2475
|
+
} catch (error) {
|
|
2476
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2477
|
+
done(error);
|
|
2478
|
+
}
|
|
2479
|
+
}).timeout(attemptTimeout);
|
|
2480
|
+
it('should error if - missing vlanEnd', (done) => {
|
|
2481
|
+
try {
|
|
2482
|
+
a.addVLANRangeToPool('fakeparam', 'fakeparam', null, null, null, (data, error) => {
|
|
2483
|
+
try {
|
|
2484
|
+
const displayE = 'vlanEnd is required';
|
|
2485
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-addVLANRangeToPool', displayE);
|
|
2486
|
+
done();
|
|
2487
|
+
} catch (err) {
|
|
2488
|
+
log.error(`Test Failure: ${err}`);
|
|
2489
|
+
done(err);
|
|
2490
|
+
}
|
|
2491
|
+
});
|
|
2492
|
+
} catch (error) {
|
|
2493
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2494
|
+
done(error);
|
|
2495
|
+
}
|
|
2496
|
+
}).timeout(attemptTimeout);
|
|
2497
|
+
it('should error if - missing body', (done) => {
|
|
2498
|
+
try {
|
|
2499
|
+
a.addVLANRangeToPool('fakeparam', 'fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
2500
|
+
try {
|
|
2501
|
+
const displayE = 'body is required';
|
|
2502
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-apic-adapter-addVLANRangeToPool', displayE);
|
|
2503
|
+
done();
|
|
2504
|
+
} catch (err) {
|
|
2505
|
+
log.error(`Test Failure: ${err}`);
|
|
2506
|
+
done(err);
|
|
2507
|
+
}
|
|
2508
|
+
});
|
|
2509
|
+
} catch (error) {
|
|
2510
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2511
|
+
done(error);
|
|
2512
|
+
}
|
|
2513
|
+
}).timeout(attemptTimeout);
|
|
2514
|
+
});
|
|
1695
2515
|
});
|
|
1696
2516
|
});
|