- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How do I get the inheritance status of extensible attributes via WAPI?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2022 03:31 AM
I can see the "inheritance_source" if the extattr is inherited e.g.
[
{
"_ref": "record:host/ZG5zLmhvc3QkLm5vdl9ETlNfaG9zdF9yb290LjAuMTY2NjA0MTE4ODM0Ny50ZXN0OQ:test9/%20",
"extattrs": {
"tag1": {
"inheritance_source": {
"_ref": "networkcontainer/ZG5zLm5ldHdvcmtfY29udGFpbmVyJDEwLjAuMC4wLzgvM1:10.0.0.0/8/default"
},
"value": "value0"
}
},
"ipv4addrs": [
{
"_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQubm9uX0ROU29ob3N0X3Jvb3QuMC4xNjY2MDQxMTg4MzQ3LnRlc3Q5LjEwLjAuMC45Lg:10.0.0.9/test9/%20",
"configure_for_dhcp": False,
"host": "test9",
"ipv4addr": "10.0.0.9"
}
],
"name": "test9",
"view": " "
}
]
However, I am unable to know the inheritance status if the value is overridden.
[
{
"_ref": "record:host/ZG5zLmhvc3QkLm5vdl9ETlNfaG9zdF9yb290LjAuMTY2NjA0MTE4ODM0Ny50ZXN0OQ:test9/%20",
"extattrs": {
"tag1": {
"value": "value1"
}
},
"ipv4addrs": [
{
"_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQubm9uX0ROU29ob3N0X3Jvb3QuMC4xNjY2MDQxMTg4MzQ3LnRlc3Q5LjEwLjAuMC45Lg:10.0.0.9/test9/%20",
"configure_for_dhcp": False,
"host": "test9",
"ipv4addr": "10.0.0.9"
}
],
"name": "test9",
"view": " "
}
]
I can see the "Inheritance State" in Extensible Attributes section via GUI, just wondering if there is a way to get the inhertiance state of a specific tag via WAPI?
Re: How do I get the inheritance status of extensible attributes via WAPI?
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 01:19 PM - edited 10-27-2022 01:20 PM
The inheritance state can be assumed. If there is an attribute value with an inheritance source, then the value is inherited. If there is an atribute value with no inheritance source, then the value is overridden.
Re: How do I get the inheritance status of extensible attributes via WAPI?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 02:26 PM
Hi MRichard,
Thank you for your reply, however I think if there is an attribute value with no inheritance source, then the value can be "Overridden" or "No Parent" depends on whether we set the attribute value on it's parent object.
I am wondering if there is an easy way to get the inheritance status without checking the parent object.