Merge "Add support for deprecating cloud profiles"
This commit is contained in:
commit
9f0a7a31f4
@ -468,6 +468,12 @@ class OpenStackConfig(object):
|
|||||||
else:
|
else:
|
||||||
profile_data = vendors.get_profile(profile_name)
|
profile_data = vendors.get_profile(profile_name)
|
||||||
if profile_data:
|
if profile_data:
|
||||||
|
status = profile_data.pop('status', 'active')
|
||||||
|
message = profile_data.pop('message', '')
|
||||||
|
if status == 'deprecated':
|
||||||
|
warnings.warn(
|
||||||
|
"{profile_name} is deprecated: {message}".format(
|
||||||
|
profile_name=profile_name, message=message))
|
||||||
_auth_update(cloud, profile_data)
|
_auth_update(cloud, profile_data)
|
||||||
else:
|
else:
|
||||||
# Can't find the requested vendor config, go about business
|
# Can't find the requested vendor config, go about business
|
||||||
|
@ -13,10 +13,12 @@
|
|||||||
"image_api_version": "2",
|
"image_api_version": "2",
|
||||||
"image_format": "qcow2",
|
"image_format": "qcow2",
|
||||||
"key_manager_api_version": "v1",
|
"key_manager_api_version": "v1",
|
||||||
|
"message": "",
|
||||||
"metering_api_version": "2",
|
"metering_api_version": "2",
|
||||||
"network_api_version": "2",
|
"network_api_version": "2",
|
||||||
"object_store_api_version": "1",
|
"object_store_api_version": "1",
|
||||||
"orchestration_api_version": "1",
|
"orchestration_api_version": "1",
|
||||||
"secgroup_source": "neutron",
|
"secgroup_source": "neutron",
|
||||||
|
"status": "active",
|
||||||
"volume_api_version": "2"
|
"volume_api_version": "2"
|
||||||
}
|
}
|
||||||
|
@ -55,12 +55,23 @@
|
|||||||
"default": "public",
|
"default": "public",
|
||||||
"enum": [ "public", "internal", "admin" ]
|
"enum": [ "public", "internal", "admin" ]
|
||||||
},
|
},
|
||||||
|
"message": {
|
||||||
|
"name": "Status message",
|
||||||
|
"description": "Optional message with information related to status",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"secgroup_source": {
|
"secgroup_source": {
|
||||||
"name": "Security Group Source",
|
"name": "Security Group Source",
|
||||||
"description": "Which service provides security groups",
|
"description": "Which service provides security groups",
|
||||||
"enum": [ "neutron", "nova", "None" ],
|
"enum": [ "neutron", "nova", "None" ],
|
||||||
"default": "neutron"
|
"default": "neutron"
|
||||||
},
|
},
|
||||||
|
"status": {
|
||||||
|
"name": "Vendor status",
|
||||||
|
"description": "Status of the vendor's cloud",
|
||||||
|
"enum": [ "active", "deprecated"],
|
||||||
|
"default": "active"
|
||||||
|
},
|
||||||
"compute_service_name": {
|
"compute_service_name": {
|
||||||
"name": "Compute API Service Name",
|
"name": "Compute API Service Name",
|
||||||
"description": "Compute API Service Name",
|
"description": "Compute API Service Name",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user