Skip to content

Commit 0738e1c

Browse files
committed
delete "sort" param if finding terminators to work around server error
1 parent 06f9b4d commit 0738e1c

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

netfoundry/utility.py

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,8 @@ def find_generic_resources(url: str, headers: dict, embedded: str = None, proxie
330330
# normalize output with a default sort param
331331
if not params.get('sort'):
332332
params["sort"] = "name,asc"
333-
# workaround sort param bug in MOP-18018
334-
if resource_type.name in ['identities', 'user-identities', 'api-account-identities']:
335-
del params['sort']
336-
elif resource_type.name == 'hosts': # workaround sort param bug in MOP-17863
333+
# workaround sort param bugs in MOP-18018, MOP-17863, MOP-18178
334+
if resource_type.name in ['identities', 'user-identities', 'api-account-identities', 'hosts', 'terminators']:
337335
del params['sort']
338336

339337
# only get one page of the requested size, else default page size and all pages
@@ -706,7 +704,28 @@ def __post_init__(self):
706704
mutable=True,
707705
embeddable=True,
708706
create_responses=["ACCEPTED"],
709-
)
707+
),
708+
'config-types': ResourceType(
709+
name='config-types',
710+
domain='network',
711+
mutable=True,
712+
embeddable=True,
713+
create_responses=["ACCEPTED"],
714+
),
715+
'configs': ResourceType(
716+
name='configs',
717+
domain='network',
718+
mutable=True,
719+
embeddable=True,
720+
create_responses=["ACCEPTED"],
721+
),
722+
'terminators': ResourceType(
723+
name='terminators',
724+
domain='network',
725+
mutable=True,
726+
embeddable=True,
727+
create_responses=["ACCEPTED"],
728+
),
710729
}
711730

712731
# TODO: [MOP-13441] associate locations with a short list of major geographic regions / continents

0 commit comments

Comments
 (0)