Open log1-c opened 1 year ago
We are currently using the Ansible Icinga Director modules by Telekom-MMS. While creating a hostgroup with multiple assign conditions I stumble over problems with URL encoding.
Having multiple conditions does work like this
director/hostgroup?name=q1poc -X POST -d '{"assign_filter": "host.vars.hostgroup=\"q1poc\"|host.vars.tags.customer=\"q1poc\"", "object_type": "object", "object_name": "q1poc"}'
{ "assign_filter": "host.vars.hostgroup=\"q1poc\"|host.vars.tags.customer=\"q1poc\"", "object_name": "q1poc", "object_type": "object" }
but not with URL-encoding
/director/hostgroup?name=q1poc -X POST -d '{"assign_filter": "host.vars.hostgroup=%22q1poc%22%7Chost.vars.tags.customer=%22q1poc%22", "object_type": "object", "object_name": "q1poc"}'
{ "assign_filter": "host.vars.hostgroup=%22q1poc%22%7Chost.vars.tags.customer=%22q1poc%22", "object_name": "q1poc", "object_type": "object" }
while with a single condition it doesn't care about the URL encoding
/director/hostgroup?name=q1poc -X POST -d '{"assign_filter": "host.vars.hostgroup=%22q1poc%22", "object_type": "object", "object_name": "q1poc"}'
{ "assign_filter": "host.vars.hostgroup=%22q1poc%22", "object_name": "q1poc", "object_type": "object", "uuid": "5cd672fb-71e4-4c9d-93ae-da57c5491976" }
This seems inconsistent and like a bug to me.
icinga2 --version
We are currently using the Ansible Icinga Director modules by Telekom-MMS. While creating a hostgroup with multiple assign conditions I stumble over problems with URL encoding.
Having multiple conditions does work like this
but not with URL-encoding
while with a single condition it doesn't care about the URL encoding
This seems inconsistent and like a bug to me.
Your Environment
icinga2 --version
): 2.14.0