def __init__(self): configManager = ConfigManager() self.__os_username = configManager.get_admin_user() self.__os_password = configManager.get_admin_pass() self.__os_auth_url = configManager.get_oauth_url() self.__os_tenant_admin = configManager.get_admin_tenant() self.__os_compute_nodes = ast.literal_eval(configManager.get_computenodes_map())
def __init__(self, config=""): configManager = ConfigManager() self.__os_username = configManager.get_admin_user() self.__os_password = configManager.get_admin_pass() self.__os_auth_url = configManager.get_oauth_url() self.__admin_tenant_id = configManager.get_admin_tenant() self.__os_compute_nodes = ast.literal_eval(configManager.get_computenodes_map()) # self.__os_username = config.get('Openstack', 'osusername') # self.__os_password = config.get('Openstack', 'ospassword') # self.__os_auth_url = config.get('Openstack', 'osauthurl') # self.__admin_tenant_id = config.get('Openstack', 'AdminTenantId') self.__keystone = client.Client(username=self.__os_username, password=self.__os_password, auth_url=self.__os_auth_url) self.projects = [ {'name' : i.name, 'id' : i.id} for i in self.__keystone.tenants.list() ] self.tenants = self.__keystone.tenants.list()
def __init__(self): configManager = ConfigManager() self.__ceilometer_api_version = configManager.get_ceilometer_api_version() self.__os_username = configManager.get_admin_user() self.__os_password = configManager.get_admin_pass() self.__os_auth_url = configManager.get_oauth_url() self.__admin_tenant = configManager.get_admin_tenant() self.__alarm_url = configManager.get_alarm_url() print self.__ceilometer_api_version print self.__os_username print self.__os_password print self.__os_auth_url print self.__admin_tenant print self.__alarm_url self.ceilometer = client.get_client(self.__ceilometer_api_version, os_username=self.__os_username, os_password=self.__os_password, os_tenant_name=self.__admin_tenant, os_auth_url=self.__os_auth_url)