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