Пример #1
0
    def init(self, parsed_args):
        cleanup_service.init_conf()
        self.options = parsed_args
        self.admin_mgr = clients.Manager(
            credentials.get_configured_admin_credentials())
        self.dry_run_data = {}
        self.json_data = {}

        self.admin_id = ""
        self.admin_role_id = ""
        self.admin_project_id = ""
        self._init_admin_ids()

        # available services
        self.project_associated_services = (
            cleanup_service.get_project_associated_cleanup_services())
        self.resource_cleanup_services = (
            cleanup_service.get_resource_cleanup_services())
        self.global_services = cleanup_service.get_global_cleanup_services()

        if parsed_args.init_saved_state:
            self._init_state()
            return

        self._load_json()
Пример #2
0
 def setUp(self):
     super(BaseCmdServiceTests, self).setUp()
     self.useFixture(fake_config.ConfigFixture())
     self.patchobject(config, 'TempestConfigPrivate',
                      fake_config.FakePrivate)
     self.useFixture(
         fixtures.MockPatch('tempest.cmd.cleanup_service._get_network_id',
                            return_value=''))
     cleanup_service.init_conf()
     self.conf_values = {
         "flavors": cleanup_service.CONF_FLAVORS[0],
         "images": cleanup_service.CONF_IMAGES[0],
         "projects": cleanup_service.CONF_PROJECTS[0],
         "users": cleanup_service.CONF_USERS[0],
     }
Пример #3
0
    def __init__(self):
        self.admin_mgr = clients.AdminManager()
        self.dry_run_data = {}
        self.json_data = {}
        self._init_options()

        self.admin_id = ""
        self.admin_role_id = ""
        self.admin_tenant_id = ""
        self._init_admin_ids()

        self.admin_role_added = []

        # available services
        self.tenant_services = cleanup_service.get_tenant_cleanup_services()
        self.global_services = cleanup_service.get_global_cleanup_services()
        cleanup_service.init_conf()
Пример #4
0
    def __init__(self):
        self.admin_mgr = clients.AdminManager()
        self.dry_run_data = {}
        self.json_data = {}
        self._init_options()

        self.admin_id = ""
        self.admin_role_id = ""
        self.admin_tenant_id = ""
        self._init_admin_ids()

        self.admin_role_added = []

        # available services
        self.tenant_services = cleanup_service.get_tenant_cleanup_services()
        self.global_services = cleanup_service.get_global_cleanup_services()
        cleanup_service.init_conf()
Пример #5
0
    def init(self, parsed_args):
        cleanup_service.init_conf()
        self.options = parsed_args
        self.admin_mgr = credentials.AdminManager()
        self.dry_run_data = {}
        self.json_data = {}

        self.admin_id = ""
        self.admin_role_id = ""
        self.admin_tenant_id = ""
        self._init_admin_ids()

        self.admin_role_added = []

        # available services
        self.tenant_services = cleanup_service.get_tenant_cleanup_services()
        self.global_services = cleanup_service.get_global_cleanup_services()

        if parsed_args.init_saved_state:
            self._init_state()
            return

        self._load_json()
Пример #6
0
    def init(self, parsed_args):
        cleanup_service.init_conf()
        self.options = parsed_args
        self.admin_mgr = credentials.AdminManager()
        self.dry_run_data = {}
        self.json_data = {}

        self.admin_id = ""
        self.admin_role_id = ""
        self.admin_tenant_id = ""
        self._init_admin_ids()

        self.admin_role_added = []

        # available services
        self.tenant_services = cleanup_service.get_tenant_cleanup_services()
        self.global_services = cleanup_service.get_global_cleanup_services()

        if parsed_args.init_saved_state:
            self._init_state()
            return

        self._load_json()
Пример #7
0
def main():
    cleanup_service.init_conf()
    cleanup = Cleanup()
    cleanup.run()
    LOG.info('Cleanup finished!')
    return 0
Пример #8
0
def main():
    cleanup_service.init_conf()
    cleanup = Cleanup()
    cleanup.run()
    LOG.info('Cleanup finished!')
    return 0