ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Mildebrandt <ch...@woodenrhino.com>
Subject Re: Ambari Client errors against Ambari Server version 1.4.3-38
Date Fri, 17 Jan 2014 20:19:19 GMT
I'm having the same issue. I just posted the details I was able to gather.
Does this work for anyone?

-Chris


On Wed, Jan 15, 2014 at 4:41 PM, Anoop Rajendra <anoop.rajendra@gmail.com>wrote:

> Hi,
>
> I'm using Ambari Server version 1.4.3-38
>
> I downloaded the Ambari source code from git, and built the
> ambari-client package.
>
> The client API functions correctly on all GET methods. However,
> whenever I try to use PUT or POST methods the client fails. For
> example, my code below is very simple,
>
> #!/usr/bin/python
>
>
> import os
> import json
> import logging
> import ambari_client.ambari_api
> logging.basicConfig()
>
> a = ambari_client.ambari_api.AmbariClient('compute-0-0.local')
> print
> a.get('stacks2/HDP/versions/2.0.6/operatingSystems/redhat6/repositories/HDP-2.0.6')
>
> r = {'Repositories':{'base_url':'
> http://10.1.1.1/install/distributions/rocks-dist/x86_64'}}
>
>
> a.put('stacks2/HDP/versions/2.0.6/operatingSystems/redhat6/repositories/HDP-2.0.6',
> json.dumps(r))
>
> This always returns an HTTP error 400: Bad request.
>
> This used to work properly with version 1.4.1-25 of the Ambari Server.
>
> Any ideas?
>
> -Anoop
>

Mime
View raw message