Skip to content

Commit a03c565

Browse files
committed
find networks by group ID
1 parent 5f8b612 commit a03c565

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

netfoundry/utility.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,13 @@ def find_generic_resources(url: str, headers: dict, embedded: str = None, proxie
319319
elif resource_type.name in ["process-executions"]:
320320
params['beta'] = str()
321321

322-
for param in kwargs.keys():
323-
if param == 'name' and resource_type.name == 'networks': # workaround sort param bug in MOP-17863
324-
params['findByName'] = param
325-
elif param == 'networkGroupId' and resource_type.name == 'network-groups':
326-
params['findByNetworkGroupId'] = param
322+
for k, v in kwargs.items():
323+
if k == 'name' and resource_type.name == 'networks': # workaround sort param bug in MOP-17863
324+
params['findByName'] = v
325+
elif k == 'networkGroupId' and resource_type.name in ['networks', 'network-groups']:
326+
params['findByNetworkGroupId'] = v
327327
else:
328-
params[param] = kwargs[param]
328+
params[k] = v
329329

330330
# normalize output with a default sort param
331331
if not params.get('sort'):

0 commit comments

Comments
 (0)