incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mahadev Konar <maha...@hortonworks.com>
Subject Re: Ambari python REST client
Date Tue, 02 Apr 2013 15:44:57 GMT
Thanks Subin.
We can continue the discussions on the jira.

thanks
mahadev

On Tue, Apr 2, 2013 at 8:40 AM, Modeel, Subin <subin.modeel@hp.com> wrote:

>  Hi ****
>
> I have added the JIRA ****
>
> https://issues.apache.org/jira/browse/AMBARI-1769****
>
> ** **
>
> Thanks****
>
> Subin****
>
> ** **
>
> *From:* Mahadev Konar [mailto:mahadev@hortonworks.com]
> *Sent:* Tuesday, April 02, 2013 9:08 PM
> *To:* Modeel, Subin
> *Subject:* Re: Ambari python REST client****
>
> ** **
>
> This is reaaly nice Subin. Can you open a jira and attach the scripts? I
> can review the code with you and help committing it to trunk.****
>
> ** **
>
> thanks****
>
> mahadev****
>
> ** **
>
> On Tue, Apr 2, 2013 at 4:09 AM, Modeel, Subin <subin.modeel@hp.com> wrote:
> ****
>
> Hi ****
>
>  ****
>
> I have attached a skeleton code for the Ambari python REST client. I wish
> to get your feedback on this.****
>
> I have actually extended the features of the python client and I am also
> able to create a cluster from the client.****
>
> How exactly do I get the permission to commit?****
>
>  ****
>
>  ****
>
>  ****
>
> install python client on linux box****
>
> =============================='****
>
> 1)unzip the attachment****
>
> 2)execute 'python setup.py install  --record installation.txt'****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>
> example:****
>
> ==========****
>
> from ambari_api.ambari_client import  AmbariClient ****
>
> client = AmbariClient("localhost", 8080, "admin","admin",version=1)****
>
> all_clusters = client.get_all_clusters()****
>
>  ****
>
>    ****
>
> cluster = client.get_cluster('test1')****
>
>    ****
>
> serviceList = cluster.get_all_services()****
>
>   ****
>
>     ****
>
> for service in serviceList:****
>
>     print str(service.service_name)+" = "+str(service.state)****
>
>   ****
>
>  ****
>
> to start/stop service****
>
> =================================****
>
> ganglia = cluster.get_service("GANGLIA")       ****
>
> ganglia.stop()****
>
> ganglia.start()****
>
>  ****
>
>  ****
>
> Thanks****
>
> Subin****
>
> ** **
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message