Skip to content

Commit abf9527

Browse files
aravindhan-niAravindhan Palanisamy
andauthored
chore: Updated workspace Id in Asset and Systems clients (#140)
Co-authored-by: Aravindhan Palanisamy <[email protected]>
1 parent f73c04f commit abf9527

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

docs/api_reference.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ API Reference
1717
api_reference/notebook
1818
api_reference/feeds
1919
api_reference/assetmanagement
20+
api_reference/systems
2021

2122
Indices and tables
2223
------------------

examples/assetmanagement/assets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
date="2022-06-07T18:58:05.000Z",
4545
),
4646
is_NI_asset=True,
47-
workspace="846e294a-a007-47ac-9fc2-fac07eab240e",
47+
workspace="your-workspace-id",
4848
location=AssetLocationForCreate(
4949
state=AssetPresence(asset_presence=AssetPresenceStatus.PRESENT)
5050
),

examples/systems/systems.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Systems request metadata.
1919
create_virtual_system_request: CreateVirtualSystemRequest = CreateVirtualSystemRequest(
2020
alias="Python integration virtual system",
21-
workspace="33eba2fe-fe42-48a1-a47f-a6669479a8aa",
21+
workspace="your-workspace-id",
2222
)
2323

2424
# Create a virtual system.

tests/integration/assetmanagement/test_asset_management.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class TestAssetManagement:
7777
date="2022-06-07T18:58:05.000Z",
7878
),
7979
is_NI_asset=True,
80-
workspace="846e294a-a007-47ac-9fc2-fac07eab240e",
80+
workspace="2300760d-38c4-48a1-9acb-800260812337",
8181
location=AssetLocationForCreate(
8282
state=AssetPresence(asset_presence=AssetPresenceStatus.PRESENT)
8383
),
@@ -196,27 +196,27 @@ def test_query_assets_with_projections__returns_the_assets_with_projected_proper
196196
and asset.custom_calibration_interval is None
197197
and asset.discovery_type is None
198198
and asset.external_calibration is None
199-
and asset.file_ids == []
199+
and asset.file_ids is None
200200
and asset.firmware_version is None
201201
and asset.hardware_version is None
202202
and asset.is_NI_asset is None
203203
and asset.is_system_controller is None
204-
and asset.keywords == []
204+
and asset.keywords is None
205205
and asset.last_updated_timestamp is None
206206
and asset.location is None
207207
and asset.model_name is None
208208
and asset.model_number is None
209209
and asset.asset_type is None
210210
and asset.out_for_calibration is None
211211
and asset.part_number is None
212-
and asset.properties == {}
212+
and asset.properties is None
213213
and asset.self_calibration is None
214214
and asset.serial_number is None
215215
and asset.supports_external_calibration is None
216216
and asset.supports_reset is None
217217
and asset.supports_self_calibration is None
218218
and asset.supports_self_test is None
219-
and asset.temperature_sensors == []
219+
and asset.temperature_sensors is None
220220
and asset.vendor_name is None
221221
and asset.vendor_number is None
222222
and asset.visa_resource_name is None

tests/integration/systems/test_systems.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def client(enterprise_config: HttpConfiguration) -> SystemsClient:
2626
return SystemsClient(enterprise_config)
2727

2828

29-
workspace_id = "33eba2fe-fe42-48a1-a47f-a6669479a8aa"
29+
workspace_id = "2300760d-38c4-48a1-9acb-800260812337"
3030
"""Constant represent id of the workspace."""
3131

3232

@@ -146,8 +146,8 @@ def test__query_systems_with_projections__returns_the_systems_with_projected_pro
146146
self, client: SystemsClient
147147
):
148148
query_systems_request = QuerySystemsRequest(
149-
filter='grains.data.localhost != "" && grains.data.master != ""',
150-
projection="new(id, alias, grains.data.master as master , grains.data.host as host)",
149+
filter="grains.data.host != null && grains.data.master != null",
150+
projection="new(id, alias, grains.data.master as master, grains.data.host as host)",
151151
take=1,
152152
)
153153
response: QuerySystemsResponse = client.query_systems(

0 commit comments

Comments
 (0)