Host creation is failing via Satellite 6 API

Solution Verified - Updated -

Issue

  • We're trying to create hosts in satellite with the following REST call. This call is failing with an exception. The first parameter after the mac address always throws the exception. In this case it was the "subnet_id".
url: http://sat6.example.com/api/v2/hosts
content: {
    "name":"host.examle.com",
    "ip":"192.0.2.10",
    "mac":"00:50:67:b2:76:aa",
    "subnet_id":2,
    "hostgroup_id":7,
    "domain_id":1,
    "organization_id":1,
    "location_id":2,
    "build":true,
    "enabled":true,
    "provision_method":"build",
    "managed":true
}
result: "error": {
    "message": "subnet_id is not allowed as nested parameter for hosts. Allowed parameters are hostgroup_id, location_id, organization_id, environment_id"
}

Environment

  • Red Hat Satellite 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In