[ 
https://issues.apache.org/jira/browse/AMBARI-1769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13625151#comment-13625151
 ] 

Mahadev konar commented on AMBARI-1769:
---------------------------------------


bq. I have put about 2 months into this. Currently I support a lot more 
features than the features in the code i have given to you.I wanted to give the 
code in stages so that it can be reviewed and checked in and also hope it would 
be useful for future committers to understand the code.My plan is to give 
skeleton code in Phase1. Phase2 will contain some modifications for phase 1 and 
addition of new features ans also meet the ambari coding standards. Phase 3 
onwards i would add the junits and some refactoring.Phase4 will contain all the 
features currently supported by me.Each phase would be 1 week long.

Subin,
 I can understand what you want to do here. I dont mind you creating another 
jira where units tests would be coming later. Can you create one related jira 
for unit tests and mention what/how you plan to add the unit tests? As long as 
we know when/how/what, I think we hsould be ok.

Also, for committing to trunk, only committers can commit. Usually contributors 
become committers after working sometime with the community and help reviewing 
patches and getting other folks onboard. I am assuming this might be your first 
time on ASF. Take a look at: 

http://www.apache.org/foundation/how-it-works.html

on how it works.

 
                
> Python REST client to invoke REST calls
> ---------------------------------------
>
>                 Key: AMBARI-1769
>                 URL: https://issues.apache.org/jira/browse/AMBARI-1769
>             Project: Ambari
>          Issue Type: New Feature
>          Components: controller
>    Affects Versions: 1.3.0
>         Environment: RHEL
>            Reporter: subin m
>              Labels: REST
>             Fix For: 1.3.1
>
>         Attachments: patch.txt
>
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> Ambari doesnt have a python REST client to invoke REST calls .Currently users 
> have to depend upon curl command.
> I have created the Ambari python client and attached as a zip.Please review 
> and give your feedbacks
> The zip contains a skeleton code with few of the resources supported.The 
> features are :
> Supported feature
> ===================
> 1)get_all_clusters
> 2)get cluster by name
> 3)get service by nmae
> 4)start/stop service
> Once this skeleton code is reviewed i will checkin the rest of the 
> resources/features
> I currently support creation of cluster via this python client.
> install python client on linux box
> =============================='
> 1)unzip the attachment
> 2)execute 'python setup.py install  --record installation.txt'
> example:
> ==========
> from ambari_client.ambari_api 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()
>     

--
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

Reply via email to