Bug 1135651
Summary: | Host Create API documentation missing required parameters | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | sthirugn <sthirugn> |
Component: | API | Assignee: | jmagen <jmagen> |
Status: | CLOSED WONTFIX | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.3 | CC: | bbuckingham, bkearney, dcleal, jaudet, jmagen, omaciel |
Target Milestone: | Unspecified | Keywords: | Reopened, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/7332 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-01-05 19:17:35 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Bug Depends On: | |||
Bug Blocks: | 1120800 |
Description
sthirugn@redhat.com
2014-08-29 22:22:05 UTC
Version Tested: GA Snap 7 - Satellite-6.0.4-RHEL-6-20140828.0 * apr-util-ldap-1.3.9-3.el6_0.1.x86_64 * candlepin-0.9.23-1.el6_5.noarch * candlepin-common-1.0.1-1.el6_5.noarch * candlepin-scl-1-5.el6_4.noarch * candlepin-scl-quartz-2.1.5-5.el6_4.noarch * candlepin-scl-rhino-1.7R3-1.el6_4.noarch * candlepin-scl-runtime-1-5.el6_4.noarch * candlepin-selinux-0.9.23-1.el6_5.noarch * candlepin-tomcat6-0.9.23-1.el6_5.noarch * elasticsearch-0.90.10-6.el6sat.noarch * foreman-1.6.0.42-1.el6sat.noarch * foreman-compute-1.6.0.42-1.el6sat.noarch * foreman-gce-1.6.0.42-1.el6sat.noarch * foreman-libvirt-1.6.0.42-1.el6sat.noarch * foreman-ovirt-1.6.0.42-1.el6sat.noarch * foreman-postgresql-1.6.0.42-1.el6sat.noarch * foreman-proxy-1.6.0.30-1.el6sat.noarch * foreman-selinux-1.6.0.14-1.el6sat.noarch * foreman-vmware-1.6.0.42-1.el6sat.noarch * katello-1.5.0-30.el6sat.noarch * katello-ca-1.0-1.noarch * katello-certs-tools-1.5.6-1.el6sat.noarch * katello-installer-0.0.62-1.el6sat.noarch * openldap-2.4.23-34.el6_5.1.x86_64 * openldap-devel-2.4.23-34.el6_5.1.x86_64 * pulp-katello-0.3-4.el6sat.noarch * pulp-nodes-common-2.4.1-0.5.rc1.el6sat.noarch * pulp-nodes-parent-2.4.1-0.5.rc1.el6sat.noarch * pulp-puppet-plugins-2.4.1-0.5.rc1.el6sat.noarch * pulp-puppet-tools-2.4.1-0.5.rc1.el6sat.noarch * pulp-rpm-plugins-2.4.1-0.5.rc1.el6sat.noarch * pulp-selinux-2.4.1-0.5.rc1.el6sat.noarch * pulp-server-2.4.1-0.5.rc1.el6sat.noarch * python-ldap-2.3.10-1.el6.x86_64 * ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch * ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch Create issue http://projects.theforeman.org/issues/7332 and fixed it. https://github.com/theforeman/foreman/pull/1732 Moving to POST since upstream bug http://projects.theforeman.org/issues/7332 has been closed ------------- Joseph Magen Applied in changeset commit:5638cc6871ed231c259ae64e998ff5907bfb7bb5. Tested against systems running:
* Satellite-6.1.0-RHEL-6-20150310.0
* Satellite-6.1.0-RHEL-7-20150310.0
The API documentation on both of those systems, at /apidoc/v2/hosts.html, states the following about the subnet_id parameter:
> host[subnet_id]
> optional , nil allowed
> required if host is managed and value is not inherited from host group
> Value: Must be a number.
However, this is not true. The `subnet_id` parameter is not required even when the host is managed and the host is not associated with any host groups. Below is a slightly redacted set of attributes for a host. See the "managed", and "hostgroup_id" and "subnet_id" parameters.
{
u'all_puppetclasses': [],
u'architecture_id': 72,
u'architecture_name': u'\uc8c7\u9f89\u65b7',
u'build': False,
u'capabilities': [u'build'],
u'certname': u'…',
u'comment': None,
u'compute_profile_id': None,
u'compute_profile_name': None,
u'compute_resource_id': None,
u'compute_resource_name': None,
u'config_groups': [],
u'created_at': u'2015-03-11T18:53:45Z',
u'disk': None,
u'domain_id': 66,
u'domain_name': u'cveswd6vcs',
u'enabled': True,
u'environment_id': 104,
u'environment_name': u'89031',
u'hostgroup_id': None,
u'hostgroup_name': None,
u'id': 38,
u'image_file': u'',
u'image_id': None,
u'image_name': None,
u'installed_at': None,
u'interfaces': [],
u'ip': None,
u'last_compile': None,
u'last_freshcheck': None,
u'last_report': None,
u'location_id': 339,
u'location_name': u'\u554e\ua418\u040a',
u'mac': u'41:50:2d:c3:26:87',
u'managed': True,
u'medium_id': 67,
u'medium_name': u'\uccf1\u7182\U00027acd',
u'model_id': None,
u'model_name': None,
u'name': u'bqeyfudavfflzlgjtyydditpq.cveswd6vcs',
u'operatingsystem_id': 66,
u'operatingsystem_name': u'\U00022ae6\u7e14\u3758',
u'organization_id': 340,
u'organization_name': u'\u4684\u9524\U00027d2a',
u'owner_id': 3,
u'owner_type': u'User',
u'parameters': [],
u'provision_method': u'build',
u'ptable_id': 63,
u'ptable_name': u'\u6a3e\ub372\uc865',
u'puppet_ca_proxy_id': None,
u'puppetclasses': [],
u'puppet_proxy_id': None,
u'puppet_status': 0,
u'realm_id': None,
u'realm_name': None,
u'serial': None,
u'source_file_id': None,
u'sp_ip': None,
u'sp_mac': None,
u'sp_name': None,
u'sp_subnet_id': None,
u'subnet_id': None,
u'subnet_name': None,
u'updated_at': u'2015-03-11T18:53:45Z',
u'use_image': None,
u'uuid': None,
}
The list of required parameters is closer to being correct, but it is still wrong.
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 Accidentally closed with 6.1.1 errata Upstream bug assigned to jmagen This is an older bug which has been reported upstream. We are not going to track this bug downstream. When the upstream issue is resolved, the next build will contain the fix. Thank you. |