Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
413 stars 203 forks source link

Reorder sync rule properties #1053

Closed TheFlyingCorpse closed 7 years ago

TheFlyingCorpse commented 7 years ago

Expected Behavior

Be able to move the properties of the sync rules internally up or down. Especially useful if adding a new attribute and moving it before the final rules in that sync rule.

Current Behavior

New sync rules are added at the end. Since last import source in the sync rules, wins, it should be possible to move it in front of other rules if applicable.

Possible Solution

Add a way to order the properties sync in relation to eachother, such as move it down or up.

Context

Example:

We use RackTables to override or add on some information to objects that might appear from other sources, however it should only add to and not overwrite/replace. When the properties of the sync rule are inheriting on the order of this, it creates a precedent to be able to order them. As it is now, if new attributes are added, some of the properties are re-created to be able to handle these scenarios.

Your Environment

Thomas-Gelf commented 7 years ago

I got confused by the example, @tobiasvdk is right - the linked issue is a duplicate. So, this should have been implemented in the current master.

TheFlyingCorpse commented 7 years ago

Actually, it is not fixed, let me try to rephrase the example:

RackTables.FQDN as host.name
CiscoPrime.FQDN as host.name
RackTables.Zone as host.zone
RackTables.address as host.address
CiscoPrime.ipaddress as host.address
CiscoPrime.dtap as host.vars.dtap
RackTables.dtap as host.vars.dtap

Objects have the same name between CiscoPrime and RackTables, so it merges the object attributes between the two sources.

The experienced behavior is that the last winner sets the winner on all attributes, regardless of ordering on the preceding attributes. The expected behavior is that the last winner sets the winner on just itself and that ordering is honored.