Skip to content

Commit a13b703

Browse files
author
Ammar Husain Mian Fazulul
committed
added error fileds is create and remove response
1 parent 88cafea commit a13b703

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

nisystemlink/clients/systems/models/_create_virtual_systems_response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Optional
22

3+
from nisystemlink.clients.core._api_error import ApiError
34
from nisystemlink.clients.core._uplink._json_model import JsonModel
45

56

@@ -8,3 +9,8 @@ class CreateVirtualSystemResponse(JsonModel):
89

910
minionId: Optional[str] = None
1011
"""The minion ID of the created virtual system."""
12+
13+
error: Optional[ApiError] = None
14+
"""Represents if there is a error while creating
15+
virtual system.
16+
"""

nisystemlink/clients/systems/models/_remove_systems_response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import List, Optional
22

3+
from nisystemlink.clients.core._api_error import ApiError
34
from nisystemlink.clients.core._uplink._json_model import JsonModel
45

56

@@ -14,3 +15,8 @@ class RemoveSystemsResponse(JsonModel):
1415

1516
failed_ids: Optional[List[str]] = None
1617
"""The IDs of the systems that could not be removed."""
18+
19+
error: Optional[ApiError] = None
20+
"""Represents if there is a error while creating
21+
virtual system.
22+
"""

tests/integration/systems/test_systems.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def create_virtual_systems(client: SystemsClient):
3737
def _create_virtual_systems(
3838
new_virtual_systems: CreateVirtualSystemRequest,
3939
) -> CreateVirtualSystemResponse:
40-
response = client.create_virtual_system(create_virtual_system_request=new_virtual_systems)
40+
response = client.create_virtual_system(
41+
create_virtual_system_request=new_virtual_systems
42+
)
4143
responses.append(response)
4244
return response
4345

@@ -122,7 +124,9 @@ def test__remove_sytems(self, client: SystemsClient):
122124
)
123125

124126
create_virtual_system_response: CreateVirtualSystemResponse = (
125-
client.create_virtual_system(create_virtual_system_request=create_virtual_system_request)
127+
client.create_virtual_system(
128+
create_virtual_system_request=create_virtual_system_request
129+
)
126130
)
127131

128132
minion_id = (

0 commit comments

Comments
 (0)