incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-3079) Ambari-Client Create Hosts request doesn't follows api request format
Date Tue, 03 Sep 2013 19:37:51 GMT
Andrew Onischuk created AMBARI-3079:
---------------------------------------

             Summary: Ambari-Client Create Hosts request doesn't follows api request format
                 Key: AMBARI-3079
                 URL: https://issues.apache.org/jira/browse/AMBARI-3079
             Project: Ambari
          Issue Type: Task
            Reporter: Andrew Onischuk
            Assignee: Andrew Onischuk


Here is the request which ambari-client sends now to add a host:
{code}
curl -i -X POST -d '{"items": [{"ip": "192.168.56.106", "host_name": "dev06.hortonworks.com",
"rack_info": null}]}' -u admin:admin http://dev05.hortonworks.com:8080/api/v1/hosts
{code}
It does not get parsed successfuly by our api

Here what we should send, and what successfully adds hosts:
{code}
curl -i -X POST -d '[{"Hosts":{"ip": "192.168.56.106","host_name":"dev05.hortonworks.com","rack_info":"/default-rack"}},{"Hosts":{"host_name":"one_more_host"}}}]'
-u admin:admin http://dev05.hortonworks.com:8080/api/v1/hosts
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message