From ambari-dev-return-13979-apmail-incubator-ambari-dev-archive=incubator.apache.org@incubator.apache.org Tue Sep 3 19:47:56 2013 Return-Path: X-Original-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E649F10D9D for ; Tue, 3 Sep 2013 19:47:56 +0000 (UTC) Received: (qmail 53381 invoked by uid 500); 3 Sep 2013 19:47:55 -0000 Delivered-To: apmail-incubator-ambari-dev-archive@incubator.apache.org Received: (qmail 53184 invoked by uid 500); 3 Sep 2013 19:47:53 -0000 Mailing-List: contact ambari-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-dev@incubator.apache.org Received: (qmail 53090 invoked by uid 99); 3 Sep 2013 19:47:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Sep 2013 19:47:52 +0000 Date: Tue, 3 Sep 2013 19:47:52 +0000 (UTC) From: "Andrew Onischuk (JIRA)" To: ambari-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-3079) Ambari-Client Create Hosts request doesn't follows api request format MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-3079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Onischuk updated AMBARI-3079: ------------------------------------ Attachment: AMBARI-3079.patch > 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 > Attachments: AMBARI-3079.patch > > > 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