SecureTrack Device Objects ignore the parent_id result of the REST Endpoint
grepusername opened this issue · 0 comments
grepusername commented
It would be highly useful to have the parent_id available when using the SecureTrackHelper.get_device_by_(name|id|.*) methods.
As it is the REST API returns:
{
"device": {
"id": "1111",
"name": "Name",
"vendor": "VMware",
"model": "nsx_fw",
"domain_id": "11",
"domain_name": "Domain X",
"offline": false,
"topology": true,
"module_uid": "",
"ip": "192.168.23.5",
"latest_revision": "1408",
"parent_id": 1110,
"virtual_type": "context"
}
}
However the Device.from_xml_node and Device.init methods both completely ignore this field, though xml_tags.Elements.PARENT_ID exists. Given the nature of the Device.get_parents_recursive method it appears that the Device._parent attribute is intended to be another rich object rather than the simple id.