Correct properties.Schema.NUMBER to INTEGER

NUMBER in properties can be integer or float, some properties are
just integer type, correct those codes with correct type.

Change-Id: Id36203bb8e497559b811c825e2dc060f925d7a37
This commit is contained in:
Ethan Lynn 2015-03-31 00:08:13 +08:00 committed by Ethan Lynn
parent bc60a1543b
commit c3572e8cda
14 changed files with 31 additions and 31 deletions

View File

@ -71,7 +71,7 @@ class Order(resource.Resource):
], ],
), ),
BIT_LENGTH: properties.Schema( BIT_LENGTH: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The bit-length of the secret.'), _('The bit-length of the secret.'),
constraints=[ constraints=[
constraints.AllowedValues([ constraints.AllowedValues([

View File

@ -77,7 +77,7 @@ class Secret(resource.Resource):
_('The algorithm type used to generate the secret.'), _('The algorithm type used to generate the secret.'),
), ),
BIT_LENGTH: properties.Schema( BIT_LENGTH: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The bit-length of the secret.'), _('The bit-length of the secret.'),
constraints=[ constraints=[
constraints.Range( constraints.Range(

View File

@ -125,7 +125,7 @@ class Group(resource.Resource):
required=True required=True
), ),
LAUNCH_CONFIG_ARGS_LOAD_BALANCER_PORT: properties.Schema( LAUNCH_CONFIG_ARGS_LOAD_BALANCER_PORT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Server port to connect the load balancer to.'), _('Server port to connect the load balancer to.'),
required=True required=True
), ),
@ -210,7 +210,7 @@ class Group(resource.Resource):
_('Group configuration.'), _('Group configuration.'),
schema={ schema={
GROUP_CONFIGURATION_MAX_ENTITIES: properties.Schema( GROUP_CONFIGURATION_MAX_ENTITIES: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Maximum number of entities in this scaling group.'), _('Maximum number of entities in this scaling group.'),
required=True required=True
), ),
@ -226,7 +226,7 @@ class Group(resource.Resource):
required=True required=True
), ),
GROUP_CONFIGURATION_MIN_ENTITIES: properties.Schema( GROUP_CONFIGURATION_MIN_ENTITIES: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Minimum number of entities in this scaling group.'), _('Minimum number of entities in this scaling group.'),
required=True required=True
), ),
@ -407,7 +407,7 @@ class ScalingPolicy(resource.Resource):
update_allowed=True update_allowed=True
), ),
CHANGE: properties.Schema( CHANGE: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Amount to add to or remove from current number of instances. ' _('Amount to add to or remove from current number of instances. '
'Incompatible with changePercent and desiredCapacity.'), 'Incompatible with changePercent and desiredCapacity.'),
update_allowed=True update_allowed=True
@ -419,7 +419,7 @@ class ScalingPolicy(resource.Resource):
update_allowed=True update_allowed=True
), ),
DESIRED_CAPACITY: properties.Schema( DESIRED_CAPACITY: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Absolute number to set the number of instances to. ' _('Absolute number to set the number of instances to. '
'Incompatible with change and changePercent.'), 'Incompatible with change and changePercent.'),
update_allowed=True update_allowed=True

View File

@ -222,7 +222,7 @@ class CloudLoadBalancer(resource.Resource):
) )
), ),
NODE_PORT: properties.Schema( NODE_PORT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
required=True required=True
), ),
NODE_CONDITION: properties.Schema( NODE_CONDITION: properties.Schema(
@ -303,7 +303,7 @@ class CloudLoadBalancer(resource.Resource):
update_allowed=True update_allowed=True
), ),
PORT: properties.Schema( PORT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
required=True, required=True,
update_allowed=True update_allowed=True
), ),
@ -324,13 +324,13 @@ class CloudLoadBalancer(resource.Resource):
] ]
), ),
CONNECTION_THROTTLE_MIN_CONNECTIONS: properties.Schema( CONNECTION_THROTTLE_MIN_CONNECTIONS: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
constraints=[ constraints=[
constraints.Range(1, 1000), constraints.Range(1, 1000),
] ]
), ),
CONNECTION_THROTTLE_MAX_CONNECTIONS: properties.Schema( CONNECTION_THROTTLE_MAX_CONNECTIONS: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
constraints=[ constraints=[
constraints.Range(1, 100000), constraints.Range(1, 100000),
] ]
@ -404,7 +404,7 @@ class CloudLoadBalancer(resource.Resource):
properties.Schema.MAP, properties.Schema.MAP,
schema={ schema={
SSL_TERMINATION_SECURE_PORT: properties.Schema( SSL_TERMINATION_SECURE_PORT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
default=443 default=443
), ),
SSL_TERMINATION_PRIVATEKEY: properties.Schema( SSL_TERMINATION_PRIVATEKEY: properties.Schema(

View File

@ -147,7 +147,7 @@ class AutoScalingGroup(instgrp.InstanceGroup, cooldown.CooldownMixin):
update_allowed=True update_allowed=True
), ),
COOLDOWN: properties.Schema( COOLDOWN: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Cooldown period, in seconds.'), _('Cooldown period, in seconds.'),
update_allowed=True update_allowed=True
), ),

View File

@ -52,7 +52,7 @@ class AWSScalingPolicy(signal_responder.SignalResponder,
required=True required=True
), ),
SCALING_ADJUSTMENT: properties.Schema( SCALING_ADJUSTMENT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Size of adjustment.'), _('Size of adjustment.'),
required=True, required=True,
update_allowed=True update_allowed=True
@ -69,7 +69,7 @@ class AWSScalingPolicy(signal_responder.SignalResponder,
update_allowed=True update_allowed=True
), ),
COOLDOWN: properties.Schema( COOLDOWN: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Cooldown period, in seconds.'), _('Cooldown period, in seconds.'),
update_allowed=True update_allowed=True
), ),

View File

@ -42,7 +42,7 @@ class NestedStack(stack_resource.StackResource):
update_allowed=True update_allowed=True
), ),
TIMEOUT_IN_MINS: properties.Schema( TIMEOUT_IN_MINS: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The length of time, in minutes, to wait for the nested stack ' _('The length of time, in minutes, to wait for the nested stack '
'creation.'), 'creation.'),
update_allowed=True update_allowed=True

View File

@ -45,7 +45,7 @@ class WaitCondition(heat_wc.HeatWaitCondition):
required=True required=True
), ),
TIMEOUT: properties.Schema( TIMEOUT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The number of seconds to wait for the correct number of ' _('The number of seconds to wait for the correct number of '
'signals to arrive.'), 'signals to arrive.'),
required=True, required=True,
@ -54,7 +54,7 @@ class WaitCondition(heat_wc.HeatWaitCondition):
] ]
), ),
COUNT: properties.Schema( COUNT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The number of success signals that must be received before ' _('The number of success signals that must be received before '
'the stack creation process continues.'), 'the stack creation process continues.'),
constraints=[ constraints=[

View File

@ -311,14 +311,14 @@ class LoadBalancer(stack_resource.StackResource):
_('An application health check for the instances.'), _('An application health check for the instances.'),
schema={ schema={
HEALTH_CHECK_HEALTHY_THRESHOLD: properties.Schema( HEALTH_CHECK_HEALTHY_THRESHOLD: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The number of consecutive health probe successes ' _('The number of consecutive health probe successes '
'required before moving the instance to the ' 'required before moving the instance to the '
'healthy state.'), 'healthy state.'),
required=True required=True
), ),
HEALTH_CHECK_INTERVAL: properties.Schema( HEALTH_CHECK_INTERVAL: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The approximate interval, in seconds, between ' _('The approximate interval, in seconds, between '
'health checks of an individual instance.'), 'health checks of an individual instance.'),
required=True required=True
@ -329,12 +329,12 @@ class LoadBalancer(stack_resource.StackResource):
required=True required=True
), ),
HEALTH_CHECK_TIMEOUT: properties.Schema( HEALTH_CHECK_TIMEOUT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Health probe timeout, in seconds.'), _('Health probe timeout, in seconds.'),
required=True required=True
), ),
HEALTH_CHECK_UNHEALTHY_THRESHOLD: properties.Schema( HEALTH_CHECK_UNHEALTHY_THRESHOLD: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The number of consecutive health probe failures ' _('The number of consecutive health probe failures '
'required before moving the instance to the ' 'required before moving the instance to the '
'unhealthy state'), 'unhealthy state'),
@ -354,13 +354,13 @@ class LoadBalancer(stack_resource.StackResource):
properties.Schema.MAP, properties.Schema.MAP,
schema={ schema={
LISTENER_INSTANCE_PORT: properties.Schema( LISTENER_INSTANCE_PORT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('TCP port on which the instance server is ' _('TCP port on which the instance server is '
'listening.'), 'listening.'),
required=True required=True
), ),
LISTENER_LOAD_BALANCER_PORT: properties.Schema( LISTENER_LOAD_BALANCER_PORT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The external load balancer port number.'), _('The external load balancer port number.'),
required=True required=True
), ),

View File

@ -85,13 +85,13 @@ class AutoScalingResourceGroup(aws_asg.AutoScalingGroup):
update_allowed=True, update_allowed=True,
schema={ schema={
MIN_IN_SERVICE: properties.Schema( MIN_IN_SERVICE: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The minimum number of resources in service while ' _('The minimum number of resources in service while '
'rolling updates are being executed.'), 'rolling updates are being executed.'),
constraints=[constraints.Range(min=0)], constraints=[constraints.Range(min=0)],
default=0), default=0),
MAX_BATCH_SIZE: properties.Schema( MAX_BATCH_SIZE: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The maximum number of resources to replace at once.'), _('The maximum number of resources to replace at once.'),
constraints=[constraints.Range(min=0)], constraints=[constraints.Range(min=0)],
default=1), default=1),

View File

@ -107,9 +107,9 @@ class InstanceGroup(stack_resource.StackResource):
), ),
} }
rolling_update_schema = { rolling_update_schema = {
MIN_INSTANCES_IN_SERVICE: properties.Schema(properties.Schema.NUMBER, MIN_INSTANCES_IN_SERVICE: properties.Schema(properties.Schema.INTEGER,
default=0), default=0),
MAX_BATCH_SIZE: properties.Schema(properties.Schema.NUMBER, MAX_BATCH_SIZE: properties.Schema(properties.Schema.INTEGER,
default=1), default=1),
PAUSE_TIME: properties.Schema(properties.Schema.STRING, PAUSE_TIME: properties.Schema(properties.Schema.STRING,
default='PT0S') default='PT0S')

View File

@ -72,7 +72,7 @@ class RemoteStack(resource.Resource):
update_allowed=True update_allowed=True
), ),
TIMEOUT: properties.Schema( TIMEOUT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('Number of minutes to wait for this stack creation.'), _('Number of minutes to wait for this stack creation.'),
update_allowed=True update_allowed=True
), ),

View File

@ -163,7 +163,7 @@ class SwiftSignal(resource.Resource):
] ]
), ),
COUNT: properties.Schema( COUNT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
description=_('The number of success signals that must be ' description=_('The number of success signals that must be '
'received before the stack creation process ' 'received before the stack creation process '
'continues.'), 'continues.'),

View File

@ -61,7 +61,7 @@ class HeatWaitCondition(resource.Resource):
] ]
), ),
COUNT: properties.Schema( COUNT: properties.Schema(
properties.Schema.NUMBER, properties.Schema.INTEGER,
_('The number of success signals that must be received before ' _('The number of success signals that must be received before '
'the stack creation process continues.'), 'the stack creation process continues.'),
constraints=[ constraints=[