Esempio n. 1
0
 def get_api_client(self, cluster):
     manager_ip = self.pu.get_manager(cluster).management_ip
     cm_password = db_helper.get_cm_password(cluster)
     return api_client.ApiResource(manager_ip,
                                   username=self.CM_DEFAULT_USERNAME,
                                   password=cm_password,
                                   version=self.CM_API_VERSION)
Esempio n. 2
0
 def get_api_client(self, cluster):
     manager_ip = self.pu.get_manager(cluster).management_ip
     cm_password = db_helper.get_cm_password(cluster)
     return api_client.ApiResource(manager_ip,
                                   username=self.CM_DEFAULT_USERNAME,
                                   password=cm_password,
                                   version=self.CM_API_VERSION)
Esempio n. 3
0
 def get_api_client(self, cluster, api_version=None):
     manager_ip = self.pu.get_manager(cluster).management_ip
     cm_password = dh.get_cm_password(cluster)
     version = self.CM_API_VERSION if not api_version else api_version
     return api_client.ApiResource(manager_ip,
                                   username=self.CM_DEFAULT_USERNAME,
                                   password=cm_password,
                                   version=version)
Esempio n. 4
0
 def get_cloudera_manager_info(self, cluster):
     mng = self.pu.get_manager(cluster)
     info = {
         'Cloudera Manager': {
             'Web UI': 'http://%s:7180' % mng.management_ip,
             'Username': '******',
             'Password': db_helper.get_cm_password(cluster)
         }
     }
     return info
Esempio n. 5
0
 def get_cloudera_manager_info(self, cluster):
     mng = self.pu.get_manager(cluster)
     info = {
         'Cloudera Manager': {
             'Web UI': 'http://%s:7180' % mng.management_ip,
             'Username': '******',
             'Password': db_helper.get_cm_password(cluster)
         }
     }
     return info
Esempio n. 6
0
 def get_cloudera_manager_info(self, cluster):
     mng = self.pu.get_manager(cluster)
     info = {
         'Cloudera Manager': {
             'Web UI': 'http://%s:7180' % mng.get_ip_or_dns_name(),
             'Username': '******',
             'Password': dh.get_cm_password(cluster)
         }
     }
     return info
Esempio n. 7
0
 def get_cloudera_manager_info(self, cluster):
     mng = self.pu.get_manager(cluster)
     info = {
         "Cloudera Manager": {
             "Web UI": "http://%s:7180" % mng.management_ip,
             "Username": "******",
             "Password": db_helper.get_cm_password(cluster),
         }
     }
     return info
Esempio n. 8
0
    def _set_cluster_info(self, cluster):
        mng = CU.pu.get_manager(cluster)
        info = {
            'Cloudera Manager': {
                'Web UI': 'http://%s:7180' % mng.management_ip,
                'Username': '******',
                'Password': db_helper.get_cm_password(cluster)
            }
        }
        hue = CU.pu.get_hue(cluster)
        if hue:
            info['Hue Dashboard'] = {
                'Web UI': 'http://%s:8888' % hue.management_ip
            }

        ctx = context.ctx()
        conductor.cluster_update(ctx, cluster, {'info': info})
Esempio n. 9
0
    def _set_cluster_info(self, cluster):
        mng = CU.pu.get_manager(cluster)
        info = {
            'Cloudera Manager': {
                'Web UI': 'http://%s:7180' % mng.management_ip,
                'Username': '******',
                'Password': db_helper.get_cm_password(cluster)
            }
        }
        hue = CU.pu.get_hue(cluster)
        if hue:
            info['Hue Dashboard'] = {
                'Web UI': 'http://%s:8888' % hue.management_ip
            }

        ctx = context.ctx()
        conductor.cluster_update(ctx, cluster, {'info': info})
Esempio n. 10
0
 def update_cloudera_password(self, cluster):
     api = self.get_api_client_by_default_password(cluster)
     user = api.get_user(self.CM_DEFAULT_USERNAME)
     user.password = db_helper.get_cm_password(cluster)
     api.update_user(user)
Esempio n. 11
0
 def update_cloudera_password(self, cluster):
     api = self.get_api_client_by_default_password(cluster)
     user = api.get_user(self.CM_DEFAULT_USERNAME)
     user.password = db_helper.get_cm_password(cluster)
     api.update_user(user)