Merge "Allow configuration of nova micro-version in the settings"
This commit is contained in:
commit
90114359e9
@ -517,7 +517,8 @@ Default::
|
||||
{
|
||||
"data-processing": 1.1,
|
||||
"identity": 2.0,
|
||||
"volume": 2
|
||||
"volume": 2,
|
||||
"compute": 2
|
||||
}
|
||||
|
||||
Overrides for OpenStack API versions. Use this setting to force the
|
||||
@ -533,7 +534,8 @@ OpenStack dashboard to use a specific API version for a given service API.
|
||||
OPENSTACK_API_VERSIONS = {
|
||||
"data-processing": 1.1,
|
||||
"identity": 3,
|
||||
"volume": 2
|
||||
"volume": 2,
|
||||
"compute": 2
|
||||
}
|
||||
|
||||
``OPENSTACK_ENABLE_PASSWORD_RETRIEVE``
|
||||
|
@ -45,6 +45,10 @@ from openstack_dashboard.api import network_base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
# Supported compute versions
|
||||
VERSIONS = base.APIVersionManager("compute", preferred_version=2)
|
||||
VERSIONS.load_supported_version(1.1, {"client": nova_client, "version": 1.1})
|
||||
VERSIONS.load_supported_version(2, {"client": nova_client, "version": 2})
|
||||
|
||||
# API static values
|
||||
INSTANCE_ACTIVE_STATE = 'ACTIVE'
|
||||
@ -445,7 +449,8 @@ class FloatingIpManager(network_base.FloatingIpManager):
|
||||
def novaclient(request):
|
||||
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
||||
c = nova_client.Client(2, request.user.username,
|
||||
c = nova_client.Client(VERSIONS.get_active_version()['version'],
|
||||
request.user.username,
|
||||
request.user.token.id,
|
||||
project_id=request.user.tenant_id,
|
||||
auth_url=base.url_for(request, 'compute'),
|
||||
|
@ -50,6 +50,7 @@ WEBROOT = '/'
|
||||
# "data-processing": 1.1,
|
||||
# "identity": 3,
|
||||
# "volume": 2,
|
||||
# "compute": 2
|
||||
#}
|
||||
|
||||
# Set this to True if running on multi-domain model. When this is enabled, it
|
||||
|
Loading…
Reference in New Issue
Block a user