Inheritable custom attribure from Folder

Started by tkrumov, January 19, 2022, 02:34:27 PM

Previous topic - Next topic

tkrumov

Hello,

We using NetXMS from which we have manage nodes organized in multi-level container hierarchy:

-Infrastructure
|__Client1
     |___PDC
             |___Node1
             |___Node2
             |___Node3
     |___DRC
             |___Node1
             |___Node2
             |___Node3
     |___Branches
                      |____Node1
                      |____Node2
                      |____Node3
                      |____NodeX


In Branches folder we have some nodes(node1, node2, node3, nodeX). Аt the moment on them I have manualy set custom attribute with Value 1. I want to set the same custom attribute on folder Branches and all devices which are into this folder to be inheritance with the same custom attributes, but with different value(for example Value 0). At the moment on folder Branches manualy I have set custom attribute with Value 0 which to be Inheritable.


When I have added new node into the Braches folder his custom attributes was inherited corretlly from Branches folder(custom attributes with value 0). Strange is that all nodes which were added into the Branches folder still have a manualy set custom attributes(value 1).
Example - node1 properties was write that Inheritable is "YES" from "Branches" folder, but Value is still set to Value 1.
I attach pictures.

May be this inheritance not work for already added devices in a folder if on them have already set manual custum attribute?



Filipp Sudanov


Filipp Sudanov

The logic with custom attribute is the following. Say we have 3 levels of hierarchy:

|__A
     |__B
          |__C

Say we define an inheritable custom attribute on A. It will populate to B and C.

We can then redefine (override) the same custom attribute on B (by editing it) and give it a new value. That new value will also be populated to node C.

The tricky part is that UI is quite confusing here. A custom attribute that comes inherited from a parent node is displayed on gray background in the list.
When redefined, it is displayed on white. When redefined, it still displays a node in "Inherited from" column, but it has meaning "if you delete redefined custom attribute here, a value will come from that node".

We will discuss internally how the UI could be improved on this.

tkrumov

Hello Filipp,

My NetXMS server version is 3.9.334 Build 3.9-334-g799c5eb953

My initial setup was:
|__Client1 - custom attribute(name enabled)) - value 1 - not Inherite - manual configured
            |__Branches - have not custom attribute configure
                        |__Node1 - custom attribute(name "enabled") - value 1 - not Inherite - manual configured
                        |__Node2 - custom attribute (name"enabled"))- value 1 - not Inherite - manual configured

In folder Branches I have many nodes(around 60 numbers) with custom attribute(name "enabled") - value 1(manual configured). I decided for them to make this custom attribute to be with value 0 only for Branches folder. For that reason I trying to using feature "Inherited from". On Branches folder I have set custom attribute(name "enabled") with Value 0 which to be Inheritable, but for some reason all nodes into branches folder have not inherit value 0.

I suspect that all nodes into the branches folder cannot Inheritable new custom attribute(name "enabled") value because they have already manual configure custom attribute value 1 on this attribute name "enable'.

For test I have already created new Inheritable custom attribute(name "test" and value 23) on Branches folder. This new custom attribute was Inherited successfull on all nodes into branches folder.
I attach pictures.

Filipp Sudanov

So yes, if you manually configure custom attribute with same name on a child node, this overrides the value which is being inherited from a parent container.

User interface was a bit reworked, so in version 4.0 that is about to be released soon it should be easier to understand what custom attribute is defined locally and what is inherited.