diff --git a/magnum_ui/api/magnum.py b/magnum_ui/api/magnum.py index 42de99da..938528bd 100644 --- a/magnum_ui/api/magnum.py +++ b/magnum_ui/api/magnum.py @@ -34,6 +34,7 @@ CLUSTER_CREATE_ATTRS = clusters.CREATION_ATTRIBUTES CERTIFICATE_CREATE_ATTRS = certificates.CREATION_ATTRIBUTES QUOTA_CREATION_ATTRIBUTES = quotas.CREATION_ATTRIBUTES CLUSTER_UPDATE_ALLOWED_PROPERTIES = set(['/node_count']) +DEFAULT_API_VERSION = '1.10' def _cleanup_params(attrs, create, **params): @@ -119,7 +120,9 @@ def magnumclient(request): insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None) openstack_api_versions = getattr(settings, 'OPENSTACK_API_VERSIONS', {}) - magnum_api_version = openstack_api_versions.get(service_type, 1.1) + magnum_api_version = openstack_api_versions.get(service_type, + DEFAULT_API_VERSION) + LOG.debug('Using magnum_api_version = %s.' % magnum_api_version) c = magnum_client.Client(username=request.user.username, project_id=request.user.tenant_id, diff --git a/magnum_ui/static/dashboard/container-infra/clusters/resize/resize.service.js b/magnum_ui/static/dashboard/container-infra/clusters/resize/resize.service.js index 1874c3b7..54f51d52 100644 --- a/magnum_ui/static/dashboard/container-infra/clusters/resize/resize.service.js +++ b/magnum_ui/static/dashboard/container-infra/clusters/resize/resize.service.js @@ -101,7 +101,7 @@ properties: { 'node_count': { type: 'number', - minimum: 1 + minimum: 0 }, 'nodes_to_remove': { type: 'array', @@ -119,7 +119,7 @@ placeholder: gettext('The cluster node count.'), required: true, validationMessage: { - 101: gettext('You cannot resize to less than a single Worker Node.') + 101: gettext('You cannot resize to fewer than zero worker nodes.') }, onChange: validateNodeRemovalCount }, diff --git a/magnum_ui/static/dashboard/container-infra/clusters/workflow/workflow.service.js b/magnum_ui/static/dashboard/container-infra/clusters/workflow/workflow.service.js index aa81e1a2..03f26ee8 100644 --- a/magnum_ui/static/dashboard/container-infra/clusters/workflow/workflow.service.js +++ b/magnum_ui/static/dashboard/container-infra/clusters/workflow/workflow.service.js @@ -89,13 +89,13 @@ 'master_flavor_id': { type: 'string' }, 'node_count': { type: 'number', - minimum: 1 + minimum: 0 }, 'flavor_id': { type: 'string' }, 'auto_scaling_enabled': { type: 'boolean' }, 'min_node_count': { type: 'number', - minimum: 1 + minimum: 0 }, 'max_node_count': { type: 'number' },