@@ -19,7 +19,7 @@ def __init__(self, connection):
19
19
"""
20
20
self .conn = connection
21
21
22
- def get_local_zone (self ):
22
+ def get_local_zone (self , * args , ** kwargs ):
23
23
"""
24
24
Gets the local VDC details
25
25
@@ -32,10 +32,17 @@ def get_local_zone(self):
32
32
33
33
Too large to output here
34
34
"""
35
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' , 'cfTimeFrame' , 'cfTarget' ]
36
+
37
+ param = {}
38
+ for key in keys :
39
+ value = kwargs .get (key )
40
+ if value :
41
+ param [key ] = value
35
42
log .info ("Getting local VDC info" )
36
- return self .conn .get (url = 'dashboard/zones/localzone' )
43
+ return self .conn .get (url = 'dashboard/zones/localzone' , params = param )
37
44
38
- def get_local_zone_replication_groups (self ):
45
+ def get_local_zone_replication_groups (self , * args , ** kwargs ):
39
46
"""
40
47
Gets the local VDC replication groups details
41
48
@@ -48,10 +55,17 @@ def get_local_zone_replication_groups(self):
48
55
49
56
Too large to output here
50
57
"""
58
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
59
+
60
+ param = {}
61
+ for key in keys :
62
+ value = kwargs .get (key )
63
+ if value :
64
+ param [key ] = value
51
65
log .info ("Getting vpools in local VDC" )
52
- return self .conn .get (url = 'dashboard/zones/localzone/replicationgroups' )
66
+ return self .conn .get (url = 'dashboard/zones/localzone/replicationgroups' , params = param )
53
67
54
- def get_local_zone_rglinks_failed (self ):
68
+ def get_local_zone_rglinks_failed (self , * args , ** kwargs ):
55
69
"""
56
70
Gets the local VDC replication group failed links details.
57
71
@@ -76,10 +90,17 @@ def get_local_zone_rglinks_failed(self):
76
90
u'title': u'rglinksFailedList'
77
91
}
78
92
"""
93
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
94
+
95
+ param = {}
96
+ for key in keys :
97
+ value = kwargs .get (key )
98
+ if value :
99
+ param [key ] = value
79
100
log .info ("Getting failed links for vpools in local VDC" )
80
101
return self .conn .get (url = 'dashboard/zones/localzone/rglinksFailed' )
81
102
82
- def get_local_zone_storage_pools (self ):
103
+ def get_local_zone_storage_pools (self , * args , ** kwargs ):
83
104
"""
84
105
Gets the local VDC storage pool details.
85
106
@@ -92,10 +113,17 @@ def get_local_zone_storage_pools(self):
92
113
93
114
Too large to output here
94
115
"""
116
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' , 'cfTimeFrame' , 'cfTarget' ]
117
+
118
+ param = {}
119
+ for key in keys :
120
+ value = kwargs .get (key )
121
+ if value :
122
+ param [key ] = value
95
123
log .info ("Getting varrays in local VDC" )
96
- return self .conn .get (url = 'dashboard/zones/localzone/storagepools' )
124
+ return self .conn .get (url = 'dashboard/zones/localzone/storagepools' , params = param )
97
125
98
- def get_local_zone_nodes (self ):
126
+ def get_local_zone_nodes (self , * args , ** kwargs ):
99
127
"""
100
128
Gets the local vdc node details.
101
129
@@ -108,10 +136,17 @@ def get_local_zone_nodes(self):
108
136
109
137
Too large to output here
110
138
"""
139
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' , 'cfTimeFrame' , 'cfTarget' ]
140
+
141
+ param = {}
142
+ for key in keys :
143
+ value = kwargs .get (key )
144
+ if value :
145
+ param [key ] = value
111
146
log .info ("Getting nodes in local VDC" )
112
- return self .conn .get (url = 'dashboard/zones/localzone/nodes' )
147
+ return self .conn .get (url = 'dashboard/zones/localzone/nodes' , params = param )
113
148
114
- def get_storage_pool (self , storage_pool_id ):
149
+ def get_storage_pool (self , storage_pool_id , * args , ** kwargs ):
115
150
"""
116
151
Gets the storage pool details.
117
152
@@ -126,12 +161,19 @@ def get_storage_pool(self, storage_pool_id):
126
161
127
162
:param storage_pool_id: Storage pool identifier
128
163
"""
164
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' , 'cfTimeFrame' , 'cfTarget' ]
165
+
166
+ param = {}
167
+ for key in keys :
168
+ value = kwargs .get (key )
169
+ if value :
170
+ param [key ] = value
129
171
log .info ("Getting info for varray '{0}'" .format (storage_pool_id ))
130
172
131
173
return self .conn .get (
132
- url = 'dashboard/storagepools/{0}' .format (storage_pool_id ))
174
+ url = 'dashboard/storagepools/{0}' .format (storage_pool_id ), params = param )
133
175
134
- def get_node (self , node_id ):
176
+ def get_node (self , node_id , * args , ** kwargs ):
135
177
"""
136
178
Gets the node instance details
137
179
@@ -146,12 +188,19 @@ def get_node(self, node_id):
146
188
147
189
:param node_id: Node identifier
148
190
"""
191
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' , 'cfTimeFrame' , 'cfTarget' ]
192
+
193
+ param = {}
194
+ for key in keys :
195
+ value = kwargs .get (key )
196
+ if value :
197
+ param [key ] = value
149
198
log .info ("Getting info for node '{0}'" .format (node_id ))
150
199
151
200
return self .conn .get (
152
201
url = 'dashboard/nodes/{0}' .format (node_id ))
153
202
154
- def get_disk (self , disk_id ):
203
+ def get_disk (self , disk_id , * args , ** kwargs ):
155
204
"""
156
205
Gets the disk instance details.
157
206
@@ -166,12 +215,19 @@ def get_disk(self, disk_id):
166
215
167
216
:param disk_id: Storage pool identifier
168
217
"""
218
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
219
+
220
+ param = {}
221
+ for key in keys :
222
+ value = kwargs .get (key )
223
+ if value :
224
+ param [key ] = value
169
225
log .info ("Getting info for disk '{0}'" .format (disk_id ))
170
226
171
227
return self .conn .get (
172
- url = 'dashboard/disks/{0}' .format (disk_id ))
228
+ url = 'dashboard/disks/{0}' .format (disk_id ), params = param )
173
229
174
- def get_process (self , process_id ):
230
+ def get_process (self , process_id , * args , ** kwargs ):
175
231
"""
176
232
Gets the process instance details.
177
233
@@ -186,12 +242,19 @@ def get_process(self, process_id):
186
242
187
243
:param process_id: Identity of the process
188
244
"""
245
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
246
+
247
+ param = {}
248
+ for key in keys :
249
+ value = kwargs .get (key )
250
+ if value :
251
+ param [key ] = value
189
252
log .info ("Getting info for PID '{0}'" .format (process_id ))
190
253
191
254
return self .conn .get (
192
- url = 'dashboard/processes/{0}' .format (process_id ))
255
+ url = 'dashboard/processes/{0}' .format (process_id ), params = param )
193
256
194
- def get_node_processes (self , node_id ):
257
+ def get_node_processes (self , node_id , * args , ** kwargs ):
195
258
"""
196
259
Gets the node instance process details.
197
260
@@ -206,12 +269,19 @@ def get_node_processes(self, node_id):
206
269
207
270
:param node_id: Identity of the process
208
271
"""
272
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
273
+
274
+ param = {}
275
+ for key in keys :
276
+ value = kwargs .get (key )
277
+ if value :
278
+ param [key ] = value
209
279
log .info ("Getting processes for node '{0}'" .format (node_id ))
210
280
211
281
return self .conn .get (
212
- url = 'dashboard/nodes/{0}/processes' .format (node_id ))
282
+ url = 'dashboard/nodes/{0}/processes' .format (node_id ), params = param )
213
283
214
- def get_node_disks (self , node_id ):
284
+ def get_node_disks (self , node_id , * args , ** kwargs ):
215
285
"""
216
286
Gets the node instance disk details.
217
287
@@ -226,12 +296,19 @@ def get_node_disks(self, node_id):
226
296
227
297
:param node_id: Identity of the node
228
298
"""
299
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
300
+
301
+ param = {}
302
+ for key in keys :
303
+ value = kwargs .get (key )
304
+ if value :
305
+ param [key ] = value
229
306
log .info ("Getting disks for node '{0}'" .format (node_id ))
230
307
231
308
return self .conn .get (
232
- url = 'dashboard/nodes/{0}/disks' .format (node_id ))
309
+ url = 'dashboard/nodes/{0}/disks' .format (node_id ), params = param )
233
310
234
- def get_storage_pool_nodes (self , storage_pool_id ):
311
+ def get_storage_pool_nodes (self , storage_pool_id , * args , ** kwargs ):
235
312
"""
236
313
Gets the storage pool node details.
237
314
@@ -246,12 +323,19 @@ def get_storage_pool_nodes(self, storage_pool_id):
246
323
247
324
:param storage_pool_id: Identity of the storage pool
248
325
"""
326
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' , 'cfTimeFrame' , 'cfTarget' ]
327
+
328
+ param = {}
329
+ for key in keys :
330
+ value = kwargs .get (key )
331
+ if value :
332
+ param [key ] = value
249
333
log .info ("Getting nodes for varray '{0}'" .format (storage_pool_id ))
250
334
251
335
return self .conn .get (
252
- url = 'dashboard/storagepools/{0}/nodes' .format (storage_pool_id ))
336
+ url = 'dashboard/storagepools/{0}/nodes' .format (storage_pool_id ), params = param )
253
337
254
- def get_local_zone_replication_group_bootstrap_links (self ):
338
+ def get_local_zone_replication_group_bootstrap_links (self , * args , ** kwargs ):
255
339
"""
256
340
Gets the local VDC replication group bootstrap links details.
257
341
@@ -276,12 +360,19 @@ def get_local_zone_replication_group_bootstrap_links(self):
276
360
u'title': u'rglinksBootstrapList'
277
361
}
278
362
"""
363
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
364
+
365
+ param = {}
366
+ for key in keys :
367
+ value = kwargs .get (key )
368
+ if value :
369
+ param [key ] = value
279
370
log .info ("Getting vpool bootstrap links in local VDC" )
280
371
281
372
return self .conn .get (
282
- url = 'dashboard/zones/localzone/rglinksBootstrap' )
373
+ url = 'dashboard/zones/localzone/rglinksBootstrap' , params = param )
283
374
284
- def get_replication_group (self , replication_group_id ):
375
+ def get_replication_group (self , replication_group_id , * args , ** kwargs ):
285
376
"""
286
377
Gets the replication group instance details.
287
378
@@ -296,12 +387,19 @@ def get_replication_group(self, replication_group_id):
296
387
297
388
:param replication_group_id: Replication group identifier
298
389
"""
390
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
391
+
392
+ param = {}
393
+ for key in keys :
394
+ value = kwargs .get (key )
395
+ if value :
396
+ param [key ] = value
299
397
log .info ("Getting info for vpool '{0}'" .format (replication_group_id ))
300
398
301
399
return self .conn .get (
302
- url = 'dashboard/replicationgroups/{0}' .format (replication_group_id ))
400
+ url = 'dashboard/replicationgroups/{0}' .format (replication_group_id ), params = param )
303
401
304
- def get_replication_group_link (self , rglink_id ):
402
+ def get_replication_group_link (self , rglink_id , * args , ** kwargs ):
305
403
"""
306
404
Gets the replication group link instance details
307
405
@@ -316,10 +414,17 @@ def get_replication_group_link(self, rglink_id):
316
414
317
415
:param rglink_id: Replication group link identifier
318
416
"""
417
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
418
+
419
+ param = {}
420
+ for key in keys :
421
+ value = kwargs .get (key )
422
+ if value :
423
+ param [key ] = value
319
424
log .info ("Getting info for vpool link '{0}'" .format (rglink_id ))
320
- return self .conn .get (url = 'dashboard/rglinks/{0}' .format (rglink_id ))
425
+ return self .conn .get (url = 'dashboard/rglinks/{0}' .format (rglink_id ), params = param )
321
426
322
- def get_replication_group_links (self , replication_group_id ):
427
+ def get_replication_group_links (self , replication_group_id , * args , ** kwargs ):
323
428
"""
324
429
Gets the replication group instance associated link details.
325
430
@@ -334,9 +439,17 @@ def get_replication_group_links(self, replication_group_id):
334
439
335
440
:param replication_group_id: Replication group identifier
336
441
"""
442
+ keys = ['dataType' , 'startTime' , 'endTime' , 'interval' , 'category' ]
443
+
444
+ param = {}
445
+ for key in keys :
446
+ value = kwargs .get (key )
447
+ if value :
448
+ param [key ] = value
337
449
log .info ("Getting links for vpool '{0}'" .format (replication_group_id ))
338
450
339
451
return self .conn .get (
340
452
url = 'dashboard/replicationgroups/{0}/rglinks' .format (
341
- replication_group_id )
453
+ replication_group_id ),
454
+ params = param
342
455
)
0 commit comments