Hi,
I’m trying to create a script that will take UDT definitions from one provider and distribute it to other providers on the same gateway. EAM can send it to the source provider on each gateway and this script can send it to the rest of the tag providers.
The issue I’m experiencing is that the configuration on the target somehow inserts a _types _ subfolder. See code and result below:
def syncUDTs(sourceProvider, targetProviders = None):
configs = system.tag.getConfiguration('['+sourceProvider+']_types_/Test Folder', True)
for target in targetProviders:
system.tag.configure('['+target+']_types_', configs, "o")
return
syncUDTs('Development', targetProviders = ['udtSync'])
The config doesn’t seem to contains _types _ subfolder under the Test Folder, hence I don’t know how to get rid of it. See configs below (the print mangled the quotations):
[
{'tags': [
{'path': Test UDT 2, 'tagType': UdtType, 'name': 'Test UDT 2', 'typeId': None
},
{'path': Test UDT 1, 'tagType': UdtType, 'name': 'Test UDT 1', 'typeId': None
}
], 'path': [Development]_types_/Test Folder, 'tagType': Folder, 'name': 'Test Folder'
}
]
Is this a bug or can I somehow get the UDTs into the target while preserving the original structure?
Thanks,
Deon