Mouhammed Soueidane
2012-12-14 14:31:38 UTC
Mouhammed Soueidane [http://community.zenoss.org/people/raziology] created the discussion
"Re: Returning a Location Instance"
To view the discussion, visit: http://community.zenoss.org/message/70548#70548
--------------------------------------------------------------
This can be easily done by doing the following in ZendMd:
locationsNode=dmd.getDmdRoot("Locations")
And then, you can use the LocationsNode instance to traverse to any locations that are under it. For example:
locationInstance = locationsNode.getOrganizer("location1/sub location 1/ sub sub location1"
We can set the address for the retrieved locationInstance by doing the following:
locationInstance.setAddress("Location Adddress")
commit()
Remember that the "Location Address" must be understood by Google Maps so it coud be displayed on Zenoss. If one of your address fields for a location is wrong on Zenoss, this will disallow any of your other locations to be displayed on the map in the Dashboard.
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/70548#70548]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"Re: Returning a Location Instance"
To view the discussion, visit: http://community.zenoss.org/message/70548#70548
--------------------------------------------------------------
This can be easily done by doing the following in ZendMd:
locationsNode=dmd.getDmdRoot("Locations")
And then, you can use the LocationsNode instance to traverse to any locations that are under it. For example:
locationInstance = locationsNode.getOrganizer("location1/sub location 1/ sub sub location1"
We can set the address for the retrieved locationInstance by doing the following:
locationInstance.setAddress("Location Adddress")
commit()
Remember that the "Location Address" must be understood by Google Maps so it coud be displayed on Zenoss. If one of your address fields for a location is wrong on Zenoss, this will disallow any of your other locations to be displayed on the map in the Dashboard.
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/70548#70548]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]