Update the deprecated config schema

Change-Id: I89829b1815dc648207e0073a57cbda5d4f4b9568
Signed-off-by: Linda Wang <wangwulin@huawei.com>
This commit is contained in:
Linda Wang
2017-11-30 13:11:57 +00:00
parent 87f5cb74f5
commit 1805047bd0
2 changed files with 29 additions and 37 deletions

View File

@@ -83,9 +83,7 @@ class DeploymentCommands(object):
if fromenv:
# TODO(astudenov): move this to Credential plugin
config = {
"type": "ExistingCloud",
"creds": {"openstack": envutils.get_creds_from_env_vars()}}
config = {"openstack": envutils.get_creds_from_env_vars()}
else:
if not filename:
config = {}

View File

@@ -68,22 +68,19 @@ class DeploymentCommandsTestCase(test.TestCase):
self.deployment.create(self.fake_api, "from_env", True)
self.fake_api.deployment.create.assert_called_once_with(
config={
"type": "ExistingCloud",
"creds": {
"openstack": {
"auth_url": "fake_auth_url",
"region_name": "fake_region_name",
"endpoint_type": "fake_endpoint_type",
"endpoint": "fake_endpoint",
"admin": {
"username": "fake_username",
"password": "fake_password",
"tenant_name": "fake_tenant_name"
},
"https_insecure": True,
"https_cacert": "fake_cacert",
"profiler_hmac_key": "fake_hmac_key"
}
"openstack": {
"auth_url": "fake_auth_url",
"region_name": "fake_region_name",
"endpoint_type": "fake_endpoint_type",
"endpoint": "fake_endpoint",
"admin": {
"username": "fake_username",
"password": "fake_password",
"tenant_name": "fake_tenant_name"
},
"https_insecure": True,
"https_cacert": "fake_cacert",
"profiler_hmac_key": "fake_hmac_key"
}
},
name="from_env"
@@ -107,24 +104,21 @@ class DeploymentCommandsTestCase(test.TestCase):
self.deployment.create(self.fake_api, "from_env", True)
self.fake_api.deployment.create.assert_called_once_with(
config={
"type": "ExistingCloud",
"creds": {
"openstack": {
"auth_url": "fake_auth_url",
"region_name": "fake_region_name",
"endpoint_type": "fake_endpoint_type",
"endpoint": "fake_endpoint",
"admin": {
"username": "fake_username",
"password": "fake_password",
"user_domain_name": "fake_udn",
"project_domain_name": "fake_pdn",
"project_name": "fake_tenant_name"
},
"https_insecure": True,
"https_cacert": "fake_cacert",
"profiler_hmac_key": "fake_hmac_key"
}
"openstack": {
"auth_url": "fake_auth_url",
"region_name": "fake_region_name",
"endpoint_type": "fake_endpoint_type",
"endpoint": "fake_endpoint",
"admin": {
"username": "fake_username",
"password": "fake_password",
"user_domain_name": "fake_udn",
"project_domain_name": "fake_pdn",
"project_name": "fake_tenant_name"
},
"https_insecure": True,
"https_cacert": "fake_cacert",
"profiler_hmac_key": "fake_hmac_key"
}
},
name="from_env"