Пример #1
0
 def setUp(self):
     super(OpenStackCredentialBuilderTestCase, self).setUp()
     self.config = {
         "auth_url":
         "http://example.net:5000/v2.0/",
         "region_name":
         "RegionOne",
         "endpoint_type":
         consts.EndpointType.INTERNAL,
         "https_insecure":
         False,
         "https_cacert":
         "cacert",
         "admin": {
             "username": "******",
             "password": "******",
             "tenant_name": "demo"
         },
         "users": [{
             "username": "******",
             "password": "******",
             "tenant_name": "demo"
         }]
     }
     self.cred_builder_cls = credential.get_builder("openstack")
Пример #2
0
    def validate(self, config=None):
        config = config or self.config
        super(ExistingCloud, self).validate(config)

        creds_config = self._get_creds(config)
        for platform, config in creds_config.items():
            builder_cls = credential.get_builder(platform)
            for creds in config:
                builder_cls.validate(creds)
Пример #3
0
    def validate(self, config=None):
        config = config or self.config
        super(ExistingCloud, self).validate(config)

        creds_config = self._get_creds(config)
        for platform, config in creds_config.items():
            builder_cls = credential.get_builder(platform)
            for creds in config:
                builder_cls.validate(creds)
Пример #4
0
 def deploy(self):
     creds_config = self._get_creds(self.config)
     parsed_credentials = {}
     for platform, config in creds_config.items():
         builder_cls = credential.get_builder(platform)
         credentials = []
         for creds in config:
             builder = builder_cls(creds)
             credentials.append(builder.build_credentials())
         parsed_credentials[platform] = credentials
     return parsed_credentials
Пример #5
0
 def deploy(self):
     creds_config = self._get_creds(self.config)
     parsed_credentials = {}
     for platform, config in creds_config.items():
         builder_cls = credential.get_builder(platform)
         credentials = []
         for creds in config:
             builder = builder_cls(creds)
             credentials.append(builder.build_credentials())
         parsed_credentials[platform] = credentials
     return parsed_credentials
Пример #6
0
 def deploy(self):
     if "creds" not in self.config:
         LOG.warning("Old config schema is deprecated since Rally 0.10.0. "
                     "Please use new config schema for ExistingCloud")
     creds_config = self._get_creds(self.config)
     parsed_credentials = {}
     for platform, config in creds_config.items():
         builder_cls = credential.get_builder(platform)
         credentials = []
         for creds in config:
             builder = builder_cls(creds)
             credentials.append(builder.build_credentials())
         parsed_credentials[platform] = credentials
     return parsed_credentials
Пример #7
0
 def setUp(self):
     super(OpenStackCredentialBuilderTestCase, self).setUp()
     self.config = {
         "auth_url": "http://example.net:5000/v2.0/",
         "region_name": "RegionOne",
         "endpoint_type": consts.EndpointType.INTERNAL,
         "https_insecure": False,
         "https_cacert": "cacert",
         "admin": {
             "username": "******",
             "password": "******",
             "tenant_name": "demo"
         },
         "users": [
             {
                 "username": "******",
                 "password": "******",
                 "tenant_name": "demo"
             }
         ]
     }
     self.cred_builder_cls = credential.get_builder("openstack")
Пример #8
0
 def setUp(self):
     super(CredentialBuilderTestCase, self).setUp()
     self.cred_builder_cls = credential.get_builder("foo")
Пример #9
0
 def setUp(self):
     super(CredentialBuilderTestCase, self).setUp()
     self.cred_builder_cls = credential.get_builder("foo")