Description of problem: When a client issues a successful HTTP POST request to /katello/api/v2/systems, a hash of information about the just-created system is returned. This hash does not contain any information about the system's organization. Similarly, a client can fetch a hash of information about a system by issuing an HTTP GET to /katello/api/v2/systems/:id, but this hash does not include any organization information. This is odd because an organization ID must be provided when creating a system. Here's an example of some python code that creates a system, then tries to read that system's organization: >>> # Create a system, get a response and decode the response JSON. >>> attrs = post( ... 'https://example.com/katello/api/v2/systems', ... { ... 'name': 'Flamboozle', ... 'content_view_id': 1, ... 'environment_id': 2, ... 'organization_id': 3, ... }, ... … ... ).json() ... >>> # Check for the information we submitted. >>> attrs['name'] == 'Flamboozle' True >>> attrs['content_view_id'] == 1 True >>> attrs['environment']['id'] == 2 # See BZ 1151240 True >>> 'organization' in attrs # uh oh! False >>> 'organization_id' in attrs # uh oh! False >>> # read the system and decode the JSON response >>> attrs = get( ... '…/katello/api/v2/systems/{0}'.format(attrs['id']), ... … ... ).json() ... >>> 'organization' in attrs # uh oh! False >>> 'organization_id' in attrs # uh oh! False Version-Release number of selected component (if applicable): Tested against a two nightly installs of Satellite, one on RHEL 6.5 and the other on RHEL 7. The following software is installed on the RHEL 6.5 machine: * apr-util-ldap-1.3.9-3.el6_0.1.x86_64 * candlepin-0.9.32-1.el6.noarch * candlepin-common-1.0.8-1.el6.noarch * candlepin-selinux-0.9.32-1.el6.noarch * candlepin-tomcat6-0.9.32-1.el6.noarch * elasticsearch-0.90.10-7.el6.noarch * foreman-1.8.0-0.develop.201410291338git203d2bb.el6.noarch * foreman-compute-1.8.0-0.develop.201410291338git203d2bb.el6.noarch * foreman-gce-1.8.0-0.develop.201410291338git203d2bb.el6.noarch * foreman-libvirt-1.8.0-0.develop.201410291338git203d2bb.el6.noarch * foreman-ovirt-1.8.0-0.develop.201410291338git203d2bb.el6.noarch * foreman-postgresql-1.8.0-0.develop.201410291338git203d2bb.el6.noarch * foreman-proxy-1.8.0-0.develop.201410291129git3172820.el6.noarch * foreman-release-1.8.0-0.develop.201410291338git203d2bb.el6.noarch * foreman-selinux-1.8.0-0.develop.201410280941git10de1c5.el6.noarch * foreman-vmware-1.8.0-0.develop.201410291338git203d2bb.el6.noarch * katello-2.1.0-1.201410281930gitecedc1a.el6.noarch * katello-certs-tools-2.0.1-1.el6.noarch * katello-default-ca-1.0-1.noarch * katello-installer-2.1.0-1.201410271412git4da9a62.el6.noarch * katello-repos-2.1.1-1.el6.noarch * katello-server-ca-1.0-1.noarch * openldap-2.4.23-32.el6_4.1.x86_64 * pulp-docker-plugins-0.2.1-0.2.beta.el6.noarch * pulp-katello-0.3-3.el6.noarch * pulp-nodes-common-2.5.0-0.7.beta.el6.noarch * pulp-nodes-parent-2.5.0-0.7.beta.el6.noarch * pulp-puppet-plugins-2.5.0-0.7.beta.el6.noarch * pulp-puppet-tools-2.5.0-0.7.beta.el6.noarch * pulp-rpm-plugins-2.5.0-0.7.beta.el6.noarch * pulp-selinux-2.5.0-0.7.beta.el6.noarch * pulp-server-2.5.0-0.7.beta.el6.noarch * python-ldap-2.3.10-1.el6.x86_64 * ruby193-rubygem-ldap_fluff-0.3.2-1.el6.noarch * ruby193-rubygem-net-ldap-0.3.1-2.el6.noarch * ruby193-rubygem-runcible-1.2.0-1.el6.noarch The RHEL 7 machine has this software installed: * candlepin-0.9.32-1.el7.noarch * candlepin-common-1.0.8-1.el7.noarch * candlepin-selinux-0.9.32-1.el7.noarch * candlepin-tomcat-0.9.32-1.el7.noarch * elasticsearch-0.90.10-7.el7.noarch * foreman-1.8.0-0.develop.201410291338git203d2bb.el7.noarch * foreman-compute-1.8.0-0.develop.201410291338git203d2bb.el7.noarch * foreman-gce-1.8.0-0.develop.201410291338git203d2bb.el7.noarch * foreman-libvirt-1.8.0-0.develop.201410291338git203d2bb.el7.noarch * foreman-ovirt-1.8.0-0.develop.201410291338git203d2bb.el7.noarch * foreman-postgresql-1.8.0-0.develop.201410291338git203d2bb.el7.noarch * foreman-proxy-1.8.0-0.develop.201410291129git3172820.el7.noarch * foreman-release-1.8.0-0.develop.201410291338git203d2bb.el7.noarch * foreman-selinux-1.8.0-0.develop.201410280941git10de1c5.el7.noarch * foreman-vmware-1.8.0-0.develop.201410291338git203d2bb.el7.noarch * katello-2.1.0-1.201410281930gitecedc1a.el7.noarch * katello-certs-tools-2.0.1-1.el7.noarch * katello-default-ca-1.0-1.noarch * katello-installer-2.1.0-1.201410271412git4da9a62.el7.noarch * katello-repos-2.1.1-1.el7.noarch * katello-server-ca-1.0-1.noarch * openldap-2.4.39-3.el7.x86_64 * pulp-docker-plugins-0.2.1-0.2.beta.el7.noarch * pulp-katello-0.3-3.el7.noarch * pulp-nodes-common-2.5.0-0.7.beta.el7.noarch * pulp-nodes-parent-2.5.0-0.7.beta.el7.noarch * pulp-puppet-plugins-2.5.0-0.7.beta.el7.noarch * pulp-puppet-tools-2.5.0-0.7.beta.el7.noarch * pulp-rpm-plugins-2.5.0-0.7.beta.el7.noarch * pulp-selinux-2.5.0-0.7.beta.el7.noarch * pulp-server-2.5.0-0.7.beta.el7.noarch * python-ldap-2.4.6-6.el7.x86_64 * ruby193-rubygem-ldap_fluff-0.3.2-1.el7.noarch * ruby193-rubygem-net-ldap-0.3.1-2.el7.noarch * ruby193-rubygem-runcible-1.2.0-1.el7.noarch How reproducible: 100% Steps to Reproduce: See "Description of problem" section at top of post. Actual results: No information about the system's organization. Expected results: An attribute named "organization_id". Additional info: n/a
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.
Created redmine issue http://projects.theforeman.org/issues/8235 from this bug
Moving to POST since upstream bug http://projects.theforeman.org/issues/8235 has been closed ------------- Bryan Kearney Applied in changeset commit:katello|4cb268d577e0ef445c1f5e195a9561d97aba6d2b.
This bug has been fixed in our most recent builds of Satellite. See: https://github.com/SatelliteQE/robottelo/pull/1651
Tested against Satellite-6.1.0-RHEL-6-20150303.0 and Satellite-6.1.0-RHEL-7-20150303.0.
This bug is slated to be released with Satellite 6.1.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2015:1592