Return-Path: X-Original-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 90559F30F for ; Tue, 9 Apr 2013 09:24:18 +0000 (UTC) Received: (qmail 99668 invoked by uid 500); 9 Apr 2013 09:24:18 -0000 Delivered-To: apmail-incubator-ambari-dev-archive@incubator.apache.org Received: (qmail 99544 invoked by uid 500); 9 Apr 2013 09:24:18 -0000 Mailing-List: contact ambari-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-dev@incubator.apache.org Received: (qmail 99488 invoked by uid 99); 9 Apr 2013 09:24:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Apr 2013 09:24:16 +0000 Date: Tue, 9 Apr 2013 09:24:16 +0000 (UTC) From: "subin m (JIRA)" To: ambari-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-1769) Python REST client to invoke REST calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-1769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] subin m updated AMBARI-1769: ---------------------------- Attachment: (was: patch_review_changes.txt) > 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_review_changes.txt, 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