@paul-griffith Can we read resources in a specific collection ?
Exemple for devices:
moduleId="com.inductiveautomation.opcua"
typeId="device"
result = system.config.getResources(moduleId = moduleId, typeId = typeId)
for elm in result:
system.perspective.print(elm)
16:51:56.657 [Browser Thread: 09e0169b-e7ee-4556-bfbd-a6b3dfd9959b] INFO Perspective.Designer.Workspace -- <PyResource: ResourceId{resourcePath=com.inductiveautomation.opcua/device/AB_SIG_GRAND_HAMEAU, collectionName=local}>
16:51:56.658 [Browser Thread: 09e0169b-e7ee-4556-bfbd-a6b3dfd9959b] INFO Perspective.Designer.Workspace -- <PyResource: ResourceId{resourcePath=com.inductiveautomation.opcua/device/AB_SIG_JENNER_SUD, collectionName=local}>
In the result, collectionName=local seems to mention that the listed devices are the result of the gateway devices available according overrides and the gateway mode active.
That's fine and it seems ok according the filesystem:
My gateway mode active is "DEV_DB_POSTGRES".
mode can have 3 value:
- DEV_DB_POSTGRES
- DEV_DB_MYSQL
- DEV_DB_SQLSERVER
Filesystem:
C:\Program Files\Inductive Automation\Ignition\data\config\resources\DEV_DB_POSTGRES\com.inductiveautomation.opcua\device\
AB_SIG_JENNER_SUD
C:\Program Files\Inductive Automation\Ignition\data\config\resources\core\com.inductiveautomation.opcua\device
AB_SIG_GRAND_HAMEAU
C:\Program Files\Inductive Automation\Ignition\data\config\resources\DEV_DB_MYSQL\com.inductiveautomation.opcua\device
AB_ES_SV1
AB_SIG_GRAND_HAMEAU
AB_SIG_LA_PLAGE
But how can I browse for exemple the "DEV_DB_MYSQL" collection (gateway mode that is inactive) without a walk of the filesystem directory ?
I would like to list for exemple all the devices of a collection and then to remove them with system.config.delete.