videoipath-automation-tool 0.2.4.dev182__py3-none-any.whl → 0.2.4.dev185__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- videoipath_automation_tool/apps/inventory/app/app.py +11 -1
- videoipath_automation_tool/apps/inventory/inventory_api.py +17 -2
- {videoipath_automation_tool-0.2.4.dev182.dist-info → videoipath_automation_tool-0.2.4.dev185.dist-info}/METADATA +1 -1
- {videoipath_automation_tool-0.2.4.dev182.dist-info → videoipath_automation_tool-0.2.4.dev185.dist-info}/RECORD +6 -6
- {videoipath_automation_tool-0.2.4.dev182.dist-info → videoipath_automation_tool-0.2.4.dev185.dist-info}/LICENSE +0 -0
- {videoipath_automation_tool-0.2.4.dev182.dist-info → videoipath_automation_tool-0.2.4.dev185.dist-info}/WHEEL +0 -0
|
@@ -9,7 +9,7 @@ from videoipath_automation_tool.apps.inventory.app.create_device_from_discovered
|
|
|
9
9
|
)
|
|
10
10
|
from videoipath_automation_tool.apps.inventory.app.get_device import InventoryGetDeviceMixin
|
|
11
11
|
from videoipath_automation_tool.apps.inventory.inventory_api import InventoryAPI
|
|
12
|
-
from videoipath_automation_tool.apps.inventory.model.drivers import CustomSettings, CustomSettingsType
|
|
12
|
+
from videoipath_automation_tool.apps.inventory.model.drivers import CustomSettings, CustomSettingsType, DriverLiteral
|
|
13
13
|
from videoipath_automation_tool.apps.inventory.model.inventory_device import InventoryDevice
|
|
14
14
|
from videoipath_automation_tool.apps.inventory.model.inventory_device_configuration_compare import (
|
|
15
15
|
InventoryDeviceComparison,
|
|
@@ -229,6 +229,16 @@ class InventoryApp(InventoryCreateDeviceMixin, InventoryCreateDeviceFromDiscover
|
|
|
229
229
|
else:
|
|
230
230
|
raise ValueError(f"Invalid label_search_mode: {label_search_mode}")
|
|
231
231
|
|
|
232
|
+
def list_device_ids_by_driver(self, driver: DriverLiteral) -> List[str]:
|
|
233
|
+
"""Method to list all device ids by driver id.
|
|
234
|
+
|
|
235
|
+
Args:
|
|
236
|
+
driver (DriverLiteral): Driver to filter devices by (e.g. `com.nevion.arista-0.1.0`).
|
|
237
|
+
Returns:
|
|
238
|
+
List[str]: List of device ids.
|
|
239
|
+
"""
|
|
240
|
+
return self._inventory_api.fetch_device_ids_by_driver(driver=driver)
|
|
241
|
+
|
|
232
242
|
def enable_device(self, device_id: str) -> InventoryDevice[CustomSettings]:
|
|
233
243
|
"""Method to enable a device in VideoIPath-Inventory.
|
|
234
244
|
|
|
@@ -7,9 +7,12 @@ from uuid import uuid4
|
|
|
7
7
|
from pydantic import IPvAnyAddress
|
|
8
8
|
from typing_extensions import deprecated
|
|
9
9
|
|
|
10
|
-
from videoipath_automation_tool.apps.inventory.inventory_utils import
|
|
10
|
+
from videoipath_automation_tool.apps.inventory.inventory_utils import (
|
|
11
|
+
construct_driver_id_from_info,
|
|
12
|
+
extract_driver_info_from_id,
|
|
13
|
+
)
|
|
11
14
|
from videoipath_automation_tool.apps.inventory.model.device_status import DeviceStatus
|
|
12
|
-
from videoipath_automation_tool.apps.inventory.model.drivers import CustomSettingsType
|
|
15
|
+
from videoipath_automation_tool.apps.inventory.model.drivers import CustomSettingsType, DriverLiteral
|
|
13
16
|
from videoipath_automation_tool.apps.inventory.model.inventory_device import InventoryDevice
|
|
14
17
|
from videoipath_automation_tool.apps.inventory.model.inventory_discovered_device import DiscoveredInventoryDevice
|
|
15
18
|
from videoipath_automation_tool.apps.inventory.model.inventory_request_rpc import InventoryRequestRpc
|
|
@@ -368,6 +371,18 @@ class InventoryAPI:
|
|
|
368
371
|
raise ValueError("Response data is empty.")
|
|
369
372
|
return [device["_id"] for device in response.data["config"]["devman"]["devices"]["_items"]]
|
|
370
373
|
|
|
374
|
+
def fetch_device_ids_by_driver(self, driver: DriverLiteral) -> List[str]:
|
|
375
|
+
"""Method to fetch all device ids by driver id from VideoIPath-Inventory"""
|
|
376
|
+
driver_organization, driver_name, driver_version = extract_driver_info_from_id(driver_id=driver)
|
|
377
|
+
escaped_driver_organization = urllib.parse.quote(driver_organization, safe="")
|
|
378
|
+
escaped_driver_name = urllib.parse.quote(driver_name, safe="")
|
|
379
|
+
escaped_driver_version = urllib.parse.quote(driver_version, safe="")
|
|
380
|
+
url_path = f"/rest/v2/data/config/devman/devices/* where (config.driver.name='{escaped_driver_name}' and config.driver.version='{escaped_driver_version}' and config.driver.organization='{escaped_driver_organization}') /**"
|
|
381
|
+
response = self.vip_connector.rest.get(url_path)
|
|
382
|
+
if not response.data:
|
|
383
|
+
raise ValueError("Response data is empty.")
|
|
384
|
+
return [device["_id"] for device in response.data["config"]["devman"]["devices"]["_items"]]
|
|
385
|
+
|
|
371
386
|
# --- Bulk Device Label Fetching Methods ---
|
|
372
387
|
def fetch_devices_factory_labels_as_dict(self) -> dict[str, str]:
|
|
373
388
|
"""Method to fetch all device factory labels from VideoIPath-Inventory
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: videoipath-automation-tool
|
|
3
|
-
Version: 0.2.4.
|
|
3
|
+
Version: 0.2.4.dev185
|
|
4
4
|
Summary: A Python package for automating VideoIPath configuration workflows.
|
|
5
5
|
License: AGPL-3.0-only
|
|
6
6
|
Keywords: videoipath,automation,nevion,media-over-ip,st2110,orchestration
|
|
@@ -2,11 +2,11 @@ videoipath_automation_tool/__init__.py,sha256=0NTKGcgOTuXXN4LvMU3Cm66CfkRfTPn4eN
|
|
|
2
2
|
videoipath_automation_tool/apps/__init__.py,sha256=fhCMBp1wmQDx_dkYoXo74mmxjXS0ktGIK0AA3eT9Xtg,223
|
|
3
3
|
videoipath_automation_tool/apps/inventory/__init__.py,sha256=7BjTejYGlvMEfJBjEfcqa_o6n6Fxb5udEStpDuZpS3k,192
|
|
4
4
|
videoipath_automation_tool/apps/inventory/app/__init__.py,sha256=CcEfdRskTzP4VtDG3myD9bv77RkWrR_b7yILWnIhsXU,103
|
|
5
|
-
videoipath_automation_tool/apps/inventory/app/app.py,sha256=
|
|
5
|
+
videoipath_automation_tool/apps/inventory/app/app.py,sha256=LWXrfWE01duODagu9FH3tvjRpbxTCTHSlTis32qhmDQ,17669
|
|
6
6
|
videoipath_automation_tool/apps/inventory/app/create_device.py,sha256=Ox6Ocu3Yx9s63As9lzkxWUZ8wwO5IVHIn4dnTx06v7M,25600
|
|
7
7
|
videoipath_automation_tool/apps/inventory/app/create_device_from_discovered_device.py,sha256=u3L6qdLQ_fRBYrgJTfy7FcK609iirLlfHS3LPXrfbFw,41691
|
|
8
8
|
videoipath_automation_tool/apps/inventory/app/get_device.py,sha256=wH--G0pRaKGAIKk_q4TONAgZTQJ0oE3If9cgvGgdLWY,94750
|
|
9
|
-
videoipath_automation_tool/apps/inventory/inventory_api.py,sha256=
|
|
9
|
+
videoipath_automation_tool/apps/inventory/inventory_api.py,sha256=BUx2hYL-iW9p5o2Hw6ITnH7MY0Ab1F8ViMg4OHKP6So,35129
|
|
10
10
|
videoipath_automation_tool/apps/inventory/inventory_utils.py,sha256=nL9RChTgJmLCM2f3cC2y1EwOeKgDUSeh34S3b4IUQkw,1302
|
|
11
11
|
videoipath_automation_tool/apps/inventory/model/__init__.py,sha256=BIvXanIqP1307zVYAzy2wAs99ahy-LKvLVY94Qs-WTQ,318
|
|
12
12
|
videoipath_automation_tool/apps/inventory/model/device_status.py,sha256=ZzkT2MaYDTwU2B2s-pubcxuRmPvig68sDgVHfhrXJ1M,2177
|
|
@@ -82,7 +82,7 @@ videoipath_automation_tool/validators/alarm_filter.py,sha256=M7V-8xEStx1Hfwkf63j
|
|
|
82
82
|
videoipath_automation_tool/validators/device_id.py,sha256=g0livx9fMS_CCwZAqlaYSOqOX2HFrXxXLMAr0uE7ewM,953
|
|
83
83
|
videoipath_automation_tool/validators/device_id_including_virtual.py,sha256=D5ndZKiJiwqxoeHLTcyZ2QTkoz6A_t7ja5-8Lm9c2Ls,1011
|
|
84
84
|
videoipath_automation_tool/validators/virtual_device_id.py,sha256=AGFGqwdhTmrp-nINhh206D9luGZMVRppK1DsnIRD0jA,1119
|
|
85
|
-
videoipath_automation_tool-0.2.4.
|
|
86
|
-
videoipath_automation_tool-0.2.4.
|
|
87
|
-
videoipath_automation_tool-0.2.4.
|
|
88
|
-
videoipath_automation_tool-0.2.4.
|
|
85
|
+
videoipath_automation_tool-0.2.4.dev185.dist-info/LICENSE,sha256=bx5iLIKjgAdYQ7sISn7DsfHRKkoCUm1154sJJKhgqnU,35184
|
|
86
|
+
videoipath_automation_tool-0.2.4.dev185.dist-info/METADATA,sha256=oFwNr9y7fQWKI4xhELXftZ9NgZNlYX_zoI4L4oIRwcA,7214
|
|
87
|
+
videoipath_automation_tool-0.2.4.dev185.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
88
|
+
videoipath_automation_tool-0.2.4.dev185.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|