ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop Rajendra <anoop.rajen...@gmail.com>
Subject Ambari Client errors against Ambari Server version 1.4.3-38
Date Thu, 16 Jan 2014 00:41:46 GMT
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