Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #11567] Navigation attributes are missing in /v1/objects/<type> #4109

Closed
icinga-migration opened this issue Apr 11, 2016 · 5 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented Apr 11, 2016

This issue has been migrated from Redmine: https://dev.icinga.com/issues/11567

Created by danvaida on 2016-04-11 13:40:52 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2016-04-13 10:04:39 +00:00)
Target Version: 2.4.5
Last Update: 2016-04-20 08:16:08 +00:00 (in Redmine)

Icinga Version: r2.4.4
Backport?: Already backported
Include in Changelog: 1

I seem to have two problems with the API zones endpoint:

  1. I'm missing the parrent attribute when creating a zone through the API. I can see that the attribute is there if I do icinga2 object list for example.

    $ icinga2 object list
    [..]
    Object 'checker' of type 'Zone':
    % declared in '/etc/icinga2/zones.conf', lines 19:1-19:21

    • __name = "checker"
    • endpoints = [ "icinga2b" ]
      % = modified in '/etc/icinga2/zones.conf', lines 20:3-20:28
    • global = false
    • name = "checker"
    • package = "_etc"
    • parent = "master"
      % = modified in '/etc/icinga2/zones.conf', lines 21:3-21:19
    • templates = [ "checker" ]
      % = modified in '/etc/icinga2/zones.conf', lines 19:1-19:21
    • type = "Zone"
    • zone = ""
      [..]

    $ curl -s --cacert /etc/icinga2/pki/ca.crt --cert /etc/icinga2/pki/icinga2-master.crt --key /etc/icinga2/pki/icinga2-master.key -H 'Accept: application/json' -X GET 'https://icinga2-master:5665/v1/objects/zones/checker' | python -m json.tool
    {
    "results": [
    {
    "attrs": {
    "__name": "checker",
    "active": true,
    "endpoints": null,
    "global": false,
    "ha_mode": 0.0,
    "name": "checker",
    "original_attributes": null,
    "package": "_api",
    "paused": false,
    "templates": [
    "checker"
    ],
    "type": "Zone",
    "version": 1460371782.481221,
    "zone": ""
    },
    "joins": {},
    "meta": {},
    "name": "checker",
    "type": "Zone"
    }
    ]
    }

  2. I can't set the endpoints attribute. The call (POST/PUT) is successful but the object has the attribute set to null.

Changesets

2016-04-13 10:02:08 +00:00 by gbeutner 09165e5

Only hide navigational attributes which are not config/state

fixes #11567

2016-04-20 08:09:35 +00:00 by gbeutner e137338

Only hide navigational attributes which are not config/state

fixes #11567
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 13, 2016

Updated by gbeutner on 2016-04-13 10:03:12 +00:00

  • Status changed from New to Assigned
  • Assigned to set to gbeutner
  • Target Version set to 2.4.5
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 13, 2016

Updated by gbeutner on 2016-04-13 10:04:05 +00:00

Can you please submit a separate ticket for the endpoints attribute? Also, please include an example of what exactly you're doing.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 13, 2016

Updated by gbeutner on 2016-04-13 10:04:39 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 09165e5.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 13, 2016

Updated by gbeutner on 2016-04-13 10:04:59 +00:00

  • Subject changed from API-created zone object attributes to Navigation attributes are missing in /v1/objects/
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 20, 2016

Updated by gbeutner on 2016-04-20 08:16:08 +00:00

  • Backport? changed from Not yet backported to Already backported

@icinga-migration icinga-migration added this to the 2.4.5 milestone Jan 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.