Merge "Support zero workers nodes on Horizon dashboard"
This commit is contained in:
commit
e5a8eb4d2a
@ -34,6 +34,7 @@ CLUSTER_CREATE_ATTRS = clusters.CREATION_ATTRIBUTES
|
|||||||
CERTIFICATE_CREATE_ATTRS = certificates.CREATION_ATTRIBUTES
|
CERTIFICATE_CREATE_ATTRS = certificates.CREATION_ATTRIBUTES
|
||||||
QUOTA_CREATION_ATTRIBUTES = quotas.CREATION_ATTRIBUTES
|
QUOTA_CREATION_ATTRIBUTES = quotas.CREATION_ATTRIBUTES
|
||||||
CLUSTER_UPDATE_ALLOWED_PROPERTIES = set(['/node_count'])
|
CLUSTER_UPDATE_ALLOWED_PROPERTIES = set(['/node_count'])
|
||||||
|
DEFAULT_API_VERSION = '1.10'
|
||||||
|
|
||||||
|
|
||||||
def _cleanup_params(attrs, create, **params):
|
def _cleanup_params(attrs, create, **params):
|
||||||
@ -119,7 +120,9 @@ def magnumclient(request):
|
|||||||
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||||
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
||||||
openstack_api_versions = getattr(settings, 'OPENSTACK_API_VERSIONS', {})
|
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,
|
c = magnum_client.Client(username=request.user.username,
|
||||||
project_id=request.user.tenant_id,
|
project_id=request.user.tenant_id,
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
properties: {
|
properties: {
|
||||||
'node_count': {
|
'node_count': {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
minimum: 1
|
minimum: 0
|
||||||
},
|
},
|
||||||
'nodes_to_remove': {
|
'nodes_to_remove': {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
@ -119,7 +119,7 @@
|
|||||||
placeholder: gettext('The cluster node count.'),
|
placeholder: gettext('The cluster node count.'),
|
||||||
required: true,
|
required: true,
|
||||||
validationMessage: {
|
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
|
onChange: validateNodeRemovalCount
|
||||||
},
|
},
|
||||||
|
@ -89,13 +89,13 @@
|
|||||||
'master_flavor_id': { type: 'string' },
|
'master_flavor_id': { type: 'string' },
|
||||||
'node_count': {
|
'node_count': {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
minimum: 1
|
minimum: 0
|
||||||
},
|
},
|
||||||
'flavor_id': { type: 'string' },
|
'flavor_id': { type: 'string' },
|
||||||
'auto_scaling_enabled': { type: 'boolean' },
|
'auto_scaling_enabled': { type: 'boolean' },
|
||||||
'min_node_count': {
|
'min_node_count': {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
minimum: 1
|
minimum: 0
|
||||||
},
|
},
|
||||||
'max_node_count': { type: 'number' },
|
'max_node_count': { type: 'number' },
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user