Beispiel #1
0
    def __init__(self, store_api):
        LOG.info(_LI("Initializing scrubber with configuration: %s") %
                 six.text_type({'scrubber_datadir': CONF.scrubber_datadir,
                                'cleanup': CONF.cleanup_scrubber,
                                'cleanup_time': CONF.cleanup_scrubber_time,
                                'registry_host': CONF.registry_host,
                                'registry_port': CONF.registry_port}))

        utils.safe_mkdirs(CONF.scrubber_datadir)

        self.store_api = store_api

        registry.configure_registry_client()
        registry.configure_registry_admin_creds()
        self.registry = registry.get_registry_client(context.RequestContext())

        # Here we create a request context with credentials to support
        # delayed delete when using multi-tenant backend storage
        admin_tenant = CONF.admin_tenant_name
        auth_token = self.registry.auth_token
        self.admin_context = context.RequestContext(user=CONF.admin_user,
                                                    tenant=admin_tenant,
                                                    auth_token=auth_token)

        (self.file_queue, self.db_queue) = get_scrub_queues()
 def __init__(self, req, neutron_host, keystone_host, cluster_id):
     registry.configure_registry_client()
     auth_url = 'http://' + keystone_host + ':35357/v2.0'
     end_url = 'http://' + neutron_host + ':9696'
     params = {'username': '******',
               'ca_cert': None,
               'tenant_name': 'admin',
               'insecure': False,
               'auth_url': auth_url,
               'timeout': 30,
               'password': '******',
               'endpoint_url': end_url,
               'auth_strategy': 'keystone'
               }
     self.cluster_id = cluster_id
     self.neutron = clientv20.Client(**params)
     try:
         cluster = registry.get_cluster_metadata(req.context, cluster_id)
     except exception.Invalid as e:
         LOG.exception(e.msg)
         raise HTTPBadRequest(explanation=e.msg, request=req)
     LOG.info("<<<CLUSTER:%s,NEUTRON HOST:%s,KEYSTOEN:%s>>>", cluster, neutron_host, keystone_host)
     if 'logic_networks' in cluster and cluster['logic_networks'] is not None:
         self.nets = cluster['logic_networks']
         #self._flat_network_uniqueness_check()
         if 'routers' in cluster and cluster['routers'] is not None:
             self.routers = cluster['routers']
         else:
             self.routers = []
         self._network_check()
         self.name_mappings = {}
         self._network_config()
Beispiel #3
0
 def __init__(self):
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
     if property_utils.is_property_protection_enabled():
         self.prop_enforcer = property_utils.PropertyRules(self.policy)
     else:
         self.prop_enforcer = None
 def __init__(self):
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
 def __init__(self):
     super(Prefetcher, self).__init__()
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
Beispiel #6
0
 def __init__(self):
     self.scrub_time = CONF.scrub_time
     self.metadata_encryption_key = CONF.metadata_encryption_key
     registry.configure_registry_client()
     registry.configure_registry_admin_creds()
     self.registry = registry.get_registry_client(context.RequestContext())
 def __init__(self):
     self.notifier = notifier.Notifier()
     registry.configure_registry_client()
     self.policy = policy.Enforcer()
     self.config_path = '/home/daisy_install/daisy.conf'
     self.auto_back_path = '/home/daisy_backup/auto/'