예제 #1
0
파일: cluster.py 프로젝트: hguemar/sahara
 def install_software(self, nodes):
     _nodes = [{'hostname': host} for host in nodes]
     url = '/cluster/%s/nodes/commands/installsoftware' % self.cluster_name
     session_id = self.rest.post(url, _nodes)['sessionID']
     return session.wait(self, session_id)
예제 #2
0
파일: services.py 프로젝트: hguemar/sahara
    def format(self, force=False):
        url = ('/cluster/%s/services/hdfs/commands/hdfsformat/%s'
               % (self.cluster_name, 'force' if force else 'noforce'))

        session_id = self.rest.post(url)['sessionID']
        return session.wait(self, session_id)