Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1192045 - Hostgroup - need additional attributes for Katello
Summary: Hostgroup - need additional attributes for Katello
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Og Maciel
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-12 13:54 UTC by Brad Buckingham
Modified: 2017-02-23 20:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:24:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9218 0 None None None 2016-04-22 14:58:56 UTC
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Description Brad Buckingham 2015-02-12 13:54:56 UTC
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 13:54:56 UTC
Created from redmine issue http://projects.theforeman.org/issues/9218

Comment 5 Og Maciel 2015-03-06 19:24:17 UTC
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 19:24:50 UTC
Verified on Satellite-6.1.0-RHEL-6-20150303.0

Comment 7 Bryan Kearney 2015-08-11 13:32:37 UTC
This bug is slated to be released with Satellite 6.1.

Comment 8 errata-xmlrpc 2015-08-12 05:24:48 UTC
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.