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 <[email protected]>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 >
