Skip to content

Commit e9acb09

Browse files
author
Ammar Husain Mian Fazulul
committed
updated as per comments
1 parent 1b5aaa0 commit e9acb09

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

nisystemlink/clients/systems/_systems_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def query_systems(
7272
@post("remove-systems")
7373
def remove_systems(
7474
self, virtual_system_to_remove: models.RemoveSystemsRequest
75-
) -> Optional[models.RemoveSystemsResponse]:
75+
) -> models.RemoveSystemsResponse:
7676
"""Removes multiple systems.
7777
7878
Args:

nisystemlink/clients/systems/models/_remove_systems_request.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,3 @@ class RemoveSystemsRequest(JsonModel):
88

99
tgt: List[str]
1010
"""Gets or sets array of strings representing the IDs of systems to remove from SystemLink."""
11-
12-
force: bool
13-
"""Gets or sets a Boolean which specifies whether to remove systems from
14-
the database immediately (True) or wait until the unregister job returns
15-
from systems (False). If True, unregister job failures are not cached."""

tests/integration/systems/test_systems.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _create_virtual_systems(
5151
]
5252
client.remove_systems(
5353
virtual_system_to_remove=RemoveSystemsRequest(
54-
tgt=created_virtual_systems_minion_ids, force=False
54+
tgt=created_virtual_systems_minion_ids,
5555
)
5656
)
5757

@@ -109,6 +109,7 @@ def test__query_systems__returns_queried_virtual_system(
109109
query=QuerySystemsRequest(filter=f'id="{minion_id}"')
110110
)
111111

112+
assert query_virtual_system_response.data is not None
112113
assert query_virtual_system_response.data[0].id == minion_id
113114

114115
def test__remove_sytems(self, client: SystemsClient):
@@ -134,8 +135,8 @@ def test__remove_sytems(self, client: SystemsClient):
134135
assert minion_id is not None
135136

136137
remove_system_response: RemoveSystemsResponse = client.remove_systems(
137-
virtual_system_to_remove=RemoveSystemsRequest(tgt=[minion_id], force=False)
138+
virtual_system_to_remove=RemoveSystemsRequest(tgt=[minion_id])
138139
)
139140

140-
assert remove_system_response is not None
141+
assert remove_system_response.removed_ids is not None
141142
assert remove_system_response.removed_ids[0] == minion_id

0 commit comments

Comments
 (0)