Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1192045 - Hostgroup - need additional attributes for Katello
Hostgroup - need additional attributes for Katello
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: Unused
Assigned To: Brad Buckingham
Og Maciel
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-12 08:54 EST by Brad Buckingham
Modified: 2017-02-23 15:32 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 01:24:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 9218 None None None 2016-04-22 10:58 EDT
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Brad Buckingham 2015-02-12 08:54:56 EST
In Katello, we have added a few additional attributes to the hostgroup model to support content source, lifecycle environment and content view.  These are currently exposed via the UI (which is based upon UI controllers); however, also need access to set/change them via the API.
Comment 1 Brad Buckingham 2015-02-12 08:54:56 EST
Created from redmine issue http://projects.theforeman.org/issues/9218
Comment 5 Og Maciel 2015-03-06 14:24:17 EST
In [1]: from nailgun import client

In [2]: response = client.post('https://qe-blade-16.idmqe.lab.eng.bos.redhat.com/api/v2/hostgroups', auth=('admin', 'changeme'), verify=False, data={'hostgroup': {'name': 'a random name 1', 'lifecycle_environment_id': 1, 'content_view_id': 5, 'environment_id': 10, 'organization_ids': [1]}})

In [3]: response.status_code
Out[3]: 200

In [4]: response.json()
Out[4]:
{u'all_puppetclasses': [],
 u'ancestry': None,
 u'architecture_id': None,
 u'architecture_name': None,
 u'compute_profile_id': None,
 u'compute_profile_name': None,
 u'config_groups': [],
 u'created_at': u'2015-03-06T19:17:54Z',
 u'domain_id': None,
 u'domain_name': None,
 u'environment_id': 10,
 u'environment_name': u'KT_Default_Organization_Library_RHEL_70_x86_64_5',
 u'id': 2,
 u'locations': [],
 u'medium_id': None,
 u'medium_name': None,
 u'name': u'a random name 1',
 u'operatingsystem_id': None,
 u'operatingsystem_name': None,
 u'organizations': [{u'id': 1,
   u'name': u'Default Organization',
   u'title': u'Default Organization'}],
 u'parameters': [],
 u'ptable_id': None,
 u'ptable_name': None,
 u'puppet_ca_proxy_id': None,
 u'puppet_proxy_id': None,
 u'puppetclasses': [],
 u'realm_id': None,
 u'realm_name': None,
 u'subnet_id': None,
 u'subnet_name': None,
 u'template_combinations': [],
 u'title': u'a random name 1',
 u'updated_at': u'2015-03-06T19:17:54Z'}

In [5]: response = client.get('https://qe-blade-16.idmqe.lab.eng.bos.redhat.com/api/v2/hostgroups/2', auth=('admin', 'changeme'), verify=False)

In [6]: response.json()
Out[6]:
{u'all_puppetclasses': [],
 u'ancestry': None,
 u'architecture_id': None,
 u'architecture_name': None,
 u'compute_profile_id': None,
 u'compute_profile_name': None,
 u'config_groups': [],
 u'created_at': u'2015-03-06T19:17:54Z',
 u'domain_id': None,
 u'domain_name': None,
 u'environment_id': 10,
 u'environment_name': u'KT_Default_Organization_Library_RHEL_70_x86_64_5',
 u'id': 2,
 u'locations': [],
 u'medium_id': None,
 u'medium_name': None,
 u'name': u'a random name 1',
 u'operatingsystem_id': None,
 u'operatingsystem_name': None,
 u'organizations': [{u'id': 1,
   u'name': u'Default Organization',
   u'title': u'Default Organization'}],
 u'parameters': [],
 u'ptable_id': None,
 u'ptable_name': None,
 u'puppet_ca_proxy_id': None,
 u'puppet_proxy_id': None,
 u'puppetclasses': [],
 u'realm_id': None,
 u'realm_name': None,
 u'subnet_id': None,
 u'subnet_name': None,
 u'template_combinations': [],
 u'title': u'a random name 1',
 u'updated_at': u'2015-03-06T19:17:54Z'}
Comment 6 Og Maciel 2015-03-06 14:24:50 EST
Verified on Satellite-6.1.0-RHEL-6-20150303.0
Comment 7 Bryan Kearney 2015-08-11 09:32:37 EDT
This bug is slated to be released with Satellite 6.1.
Comment 8 errata-xmlrpc 2015-08-12 01:24:48 EDT
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

Note You need to log in before you can comment on or make changes to this bug.