Skip to content

Commit 95a9170

Browse files
authored
Merge pull request #72 from CiscoDevNet/develop
update uniq to 1.4 (#71)
2 parents 7803194 + 692b04e commit 95a9170

File tree

125 files changed

+27870
-13277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+27870
-13277
lines changed

__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@
5050
__license__ = 'Apache 2.0'
5151
__copyright__ = 'Copyright 2016 Cisco Systems'
5252

53-
__version__ = '1.3.2'
53+
__version__ = '1.4.0'
5454
__first_release_date__ = '2016.6.8'

apis/nb/clients/inventory_manager_client/DiscoveryApi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def deleteAllDiscovery(self, **kwargs):
199199

200200

201201
def getDiscoveryCount(self, **kwargs):
202-
"""Retrieves the number of discovery
202+
"""Retrieves the number of discoveries
203203
204204
Args:
205205
@@ -459,7 +459,7 @@ def deleteDiscoveryById(self, **kwargs):
459459

460460

461461
def getDiscoveryJobsById(self, **kwargs):
462-
"""Retrieves the list of discovery jobs for the given IP
462+
"""Retrieves list of discovery jobs for the specified discovery id
463463
464464
Args:
465465

apis/nb/clients/inventory_manager_client/GlobalcredentialApi.py

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,68 @@ def getGlobalCredential(self, **kwargs):
8080

8181

8282

83+
def updateCliCredential(self, **kwargs):
84+
"""Updates global CLI credential
85+
86+
Args:
87+
88+
globalCredentialNio, CLICredentialDTO: CLI credentials (required)
89+
90+
91+
92+
Returns: TaskIdResult
93+
"""
94+
95+
allParams = ['globalCredentialNio']
96+
97+
params = locals()
98+
for (key, val) in list(params['kwargs'].items()):
99+
if key not in allParams:
100+
raise TypeError("Got an unexpected keyword argument '%s' to method updateCliCredential" % key)
101+
params[key] = val
102+
del params['kwargs']
103+
104+
resourcePath = '/global-credential/cli'
105+
resourcePath = resourcePath.replace('{format}', 'json')
106+
method = 'PUT'
107+
108+
queryParams = {}
109+
headerParams = {}
110+
formParams = {}
111+
files = {}
112+
bodyParam = None
113+
114+
headerParams['Accept'] = 'application/json'
115+
headerParams['Content-Type'] = 'application/json'
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
if ('globalCredentialNio' in params):
127+
bodyParam = params['globalCredentialNio']
128+
129+
130+
postData = (formParams if formParams else bodyParam)
131+
132+
response = self.apiClient.callAPI(resourcePath, method, queryParams,
133+
postData, headerParams, files=files)
134+
135+
136+
if not response:
137+
return None
138+
139+
responseObject = self.apiClient.deserialize(response, 'TaskIdResult')
140+
return responseObject
141+
142+
143+
144+
83145
def addCliCredential(self, **kwargs):
84146
"""Creates global CLI credential
85147
@@ -142,6 +204,68 @@ def addCliCredential(self, **kwargs):
142204

143205

144206

207+
def updateSnmpReadCommunity(self, **kwargs):
208+
"""Updates global SNMP read community
209+
210+
Args:
211+
212+
globalCredentialNio, SNMPv2ReadCommunityDTO: SNMP read community details (required)
213+
214+
215+
216+
Returns: TaskIdResult
217+
"""
218+
219+
allParams = ['globalCredentialNio']
220+
221+
params = locals()
222+
for (key, val) in list(params['kwargs'].items()):
223+
if key not in allParams:
224+
raise TypeError("Got an unexpected keyword argument '%s' to method updateSnmpReadCommunity" % key)
225+
params[key] = val
226+
del params['kwargs']
227+
228+
resourcePath = '/global-credential/snmpv2-read-community'
229+
resourcePath = resourcePath.replace('{format}', 'json')
230+
method = 'PUT'
231+
232+
queryParams = {}
233+
headerParams = {}
234+
formParams = {}
235+
files = {}
236+
bodyParam = None
237+
238+
headerParams['Accept'] = 'application/json'
239+
headerParams['Content-Type'] = 'application/json'
240+
241+
242+
243+
244+
245+
246+
247+
248+
249+
250+
if ('globalCredentialNio' in params):
251+
bodyParam = params['globalCredentialNio']
252+
253+
254+
postData = (formParams if formParams else bodyParam)
255+
256+
response = self.apiClient.callAPI(resourcePath, method, queryParams,
257+
postData, headerParams, files=files)
258+
259+
260+
if not response:
261+
return None
262+
263+
responseObject = self.apiClient.deserialize(response, 'TaskIdResult')
264+
return responseObject
265+
266+
267+
268+
145269
def addSnmpReadCommunity(self, **kwargs):
146270
"""Creates global SNMP read community
147271
@@ -204,6 +328,68 @@ def addSnmpReadCommunity(self, **kwargs):
204328

205329

206330

331+
def updateSnmpWriteCommunity(self, **kwargs):
332+
"""Updates global SNMP write community
333+
334+
Args:
335+
336+
globalCredentialNio, SNMPv2WriteCommunityDTO: SNMP write community details (required)
337+
338+
339+
340+
Returns: TaskIdResult
341+
"""
342+
343+
allParams = ['globalCredentialNio']
344+
345+
params = locals()
346+
for (key, val) in list(params['kwargs'].items()):
347+
if key not in allParams:
348+
raise TypeError("Got an unexpected keyword argument '%s' to method updateSnmpWriteCommunity" % key)
349+
params[key] = val
350+
del params['kwargs']
351+
352+
resourcePath = '/global-credential/snmpv2-write-community'
353+
resourcePath = resourcePath.replace('{format}', 'json')
354+
method = 'PUT'
355+
356+
queryParams = {}
357+
headerParams = {}
358+
formParams = {}
359+
files = {}
360+
bodyParam = None
361+
362+
headerParams['Accept'] = 'application/json'
363+
headerParams['Content-Type'] = 'application/json'
364+
365+
366+
367+
368+
369+
370+
371+
372+
373+
374+
if ('globalCredentialNio' in params):
375+
bodyParam = params['globalCredentialNio']
376+
377+
378+
postData = (formParams if formParams else bodyParam)
379+
380+
response = self.apiClient.callAPI(resourcePath, method, queryParams,
381+
postData, headerParams, files=files)
382+
383+
384+
if not response:
385+
return None
386+
387+
responseObject = self.apiClient.deserialize(response, 'TaskIdResult')
388+
return responseObject
389+
390+
391+
392+
207393
def addSnmpWriteCommunity(self, **kwargs):
208394
"""Creates global SNMP write community
209395
@@ -266,6 +452,68 @@ def addSnmpWriteCommunity(self, **kwargs):
266452

267453

268454

455+
def updateSnmpv3Credential(self, **kwargs):
456+
"""Updates global SNMPv3 credential
457+
458+
Args:
459+
460+
globalCredentialNio, SNMPv3CredentialDTO: SNMPv3 credential details (required)
461+
462+
463+
464+
Returns: TaskIdResult
465+
"""
466+
467+
allParams = ['globalCredentialNio']
468+
469+
params = locals()
470+
for (key, val) in list(params['kwargs'].items()):
471+
if key not in allParams:
472+
raise TypeError("Got an unexpected keyword argument '%s' to method updateSnmpv3Credential" % key)
473+
params[key] = val
474+
del params['kwargs']
475+
476+
resourcePath = '/global-credential/snmpv3'
477+
resourcePath = resourcePath.replace('{format}', 'json')
478+
method = 'PUT'
479+
480+
queryParams = {}
481+
headerParams = {}
482+
formParams = {}
483+
files = {}
484+
bodyParam = None
485+
486+
headerParams['Accept'] = 'application/json'
487+
headerParams['Content-Type'] = 'application/json'
488+
489+
490+
491+
492+
493+
494+
495+
496+
497+
498+
if ('globalCredentialNio' in params):
499+
bodyParam = params['globalCredentialNio']
500+
501+
502+
postData = (formParams if formParams else bodyParam)
503+
504+
response = self.apiClient.callAPI(resourcePath, method, queryParams,
505+
postData, headerParams, files=files)
506+
507+
508+
if not response:
509+
return None
510+
511+
responseObject = self.apiClient.deserialize(response, 'TaskIdResult')
512+
return responseObject
513+
514+
515+
516+
269517
def addSnmpv3Credential(self, **kwargs):
270518
"""Creates global SNMPv3 credential
271519

apis/nb/clients/inventory_manager_client/HostApi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, apiClient):
1919

2020

2121
def getHosts(self, **kwargs):
22-
"""Retrieve hosts
22+
"""Retrieve hosts based on given filters
2323
2424
Args:
2525
@@ -41,7 +41,7 @@ def getHosts(self, **kwargs):
4141
hostMac, list[str]: hostMac (required)
4242
4343
44-
hostType, list[str]: hostType (required)
44+
hostType, str: Host type : wired or wireless (required)
4545
4646
4747
connectedInterfaceName, list[str]: connectedInterfaceName (required)
@@ -147,7 +147,7 @@ def getHosts(self, **kwargs):
147147

148148

149149
def getHostCount(self, **kwargs):
150-
"""Gives total number of hosts
150+
"""Retrieves the number of hosts
151151
152152
Args:
153153
@@ -157,7 +157,7 @@ def getHostCount(self, **kwargs):
157157
hostMac, list[str]: hostMac (required)
158158
159159
160-
hostType, list[str]: hostType (required)
160+
hostType, str: Host type : wired or wireless (required)
161161
162162
163163
connectedInterfaceName, list[str]: connectedInterfaceName (required)

apis/nb/clients/inventory_manager_client/InterfaceApi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def getInterfaceByDeviceIdAndName(self, **kwargs):
453453

454454

455455
def getInterfaceRangeByDevice(self, **kwargs):
456-
"""Retrieves interface range for the device
456+
"""Retrieves device interfaces in the given range
457457
458458
Args:
459459

0 commit comments

Comments
 (0)