![]() |
![]() |
Subject: | Relationship Issue |
Author: | Jay Stanley |
Posted: | 2015-07-29 14:33 |
How can I remove a relationship on a device that is being reported by d.getRelationships() but not d._relations
When I try to buildRelations() I get a schema error.
ZenSchemaError: Schema for relation proAdminSrv not found on Device
[x[0] for x in d._relations]
['dependencies', 'dependents', 'maintenanceWindows', 'deviceClass', 'perfServer', 'location', 'systems', 'groups', 'adminRoles', 'userCommands', 'monitors', 'mysql_servers', 'ldoms', 'msmqqueues', 'oracle_instances', 'HTTPComponents']
>>> [x.id for x in d.getRelationships()]
['dependencies', 'dependents', 'maintenanceWindows', 'deviceClass', 'perfServer', 'location', 'systems', 'groups', 'adminRoles', 'userCommands', 'monitors', 'mysql_servers', 'ldoms', 'HTTPComponents', 'msmqqueues', 'oracle_instances', 'proAdminSrv', 'proAdminServers']
All commands from toolbox come back clean.
Subject: | The best solution to this |
Author: | Chet Luther |
Posted: | 2015-08-03 09:41 |
The best solution to this problem is to at least temporarily put proAdminSrv back into the class' _relations. After doing that, delete the device and others that would have the relationship (if this wouldn't be a problem), remove proAdminSrv from the class' _relations, restart things, then add the device(s) again.
Generally speaking you should never remove or rename existing relationships if you have instances of the classes that define them in your object database. If you want to remove or rename a relationship and you can't afford to remove all of the devices that have them first, you should just leave the old relationship and create a new one.
Subject: | Would it be safe to remake |
Author: | Jay Stanley |
Posted: | 2015-08-03 13:47 |
Would it be safe to remake/rename relationships if I removed the zenpack first (Making sure none of the components exist) then installed the newer with the updated relationships
Subject: | Yes, that would be safe. |
Author: | Chet Luther |
Posted: | 2015-08-04 10:25 |
Yes, that would be safe. Really anything is safe if you can be sure none of the affected devices or components still exist.
< |
Previous Does anyone know how I can see all file system thresholds I've overridden? |
Next command datasource issue |
> |