Ejemplo n.º 1
0
    def setUpClass(cls):
        super(SecretsFixture, cls).setUpClass()
        cls.config = CloudKeepSecretsConfig()
        cls.identity_config = CloudKeepAuthConfig()
        auth_endpoint = '{0}/v2.0'.format(
            cls.identity_config.authentication_endpoint)

        cls.cl_client = ClientLibSecretsClient(
            url=cls.cloudkeep.base_url,
            api_version=cls.cloudkeep.api_version,
            auth_endpoint=auth_endpoint,
            user=cls.identity_config.username,
            password=cls.identity_config.password,
            tenant_name=cls.identity_config.tenant_name)

        cls.barb_client = SecretsClient(
            url=cls.cloudkeep.base_url,
            api_version=cls.cloudkeep.api_version,
            tenant_id=cls.tenant_id,
            token=cls.token,
            serialize_format=cls.marshalling.serializer,
            deserialize_format=cls.marshalling.deserializer)

        cls.barb_behaviors = SecretsBehaviors(client=cls.barb_client,
                                              config=cls.config)
        cls.cl_behaviors = ClientLibSecretsBehaviors(
            barb_client=cls.barb_client,
            cl_client=cls.cl_client,
            config=cls.config)
Ejemplo n.º 2
0
 def _build_editable_keystone_config(cls):
     loaded_config = CloudKeepAuthConfig()
     # This is far from ideal, but I need to be able to edit the config
     config = type(
         'SpoofedConfig', (object, ), {
             'version': loaded_config.version,
             'username': loaded_config.username,
             'password': loaded_config.password,
             'tenant_name': loaded_config.tenant_name,
             'authentication_endpoint':
             loaded_config.authentication_endpoint,
             'auth_type': loaded_config.auth_type
         })
     return config
Ejemplo n.º 3
0
 def setUpClass(cls, keystone_config=None):
     super(BarbicanFixture, cls).setUpClass()
     cls.marshalling = MarshallingConfig()
     cls.cloudkeep = CloudKeepConfig()
     cls.keystone = keystone_config or CloudKeepAuthConfig()