Fix misspellings in heat

Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: I554143f00fe82154472e7eb6391291730dd3ddd4
Closes-Bug: #1257295
Closes-Bug: #1277515
This commit is contained in:
Shane Wang 2014-02-07 15:03:28 +08:00
parent 4b8c063218
commit 8a688c0aaa
23 changed files with 37 additions and 37 deletions

View File

@ -289,7 +289,7 @@ keystone_setup() {
if [[ "$SERVICE_HOST" == "localhost" ]]; then if [[ "$SERVICE_HOST" == "localhost" ]]; then
echo "Warning: Endpoints will be registered as localhost, but this usually won't work." echo "Warning: Endpoints will be registered as localhost, but this usually won't work."
echo "Set SERVICE_HOST to a publically accessible hostname/IP instead." echo "Set SERVICE_HOST to a publicly accessible hostname/IP instead."
fi fi
echo ADMIN_ROLE $ADMIN_ROLE echo ADMIN_ROLE $ADMIN_ROLE

View File

@ -78,7 +78,7 @@ class Clients(clients.OpenStackClients):
def nova(self, service_type="compute"): def nova(self, service_type="compute"):
'''Rackspace cloudservers client. Specifying the service type is to '''Rackspace cloudservers client. Specifying the service type is to
maintain compatability with clients.OpenStackClients. It is not maintain compatibility with clients.OpenStackClients. It is not
actually a valid option to change within pyrax. actually a valid option to change within pyrax.
''' '''
if service_type is not "compute": if service_type is not "compute":

View File

@ -133,7 +133,7 @@ class StackController(object):
status = s[engine_api.STACK_STATUS] status = s[engine_api.STACK_STATUS]
result['StackStatus'] = '_'.join((action, status)) result['StackStatus'] = '_'.join((action, status))
# AWS docs indicate DeletionTime is ommitted for current stacks # AWS docs indicate DeletionTime is omitted for current stacks
# This is still TODO(unknown) in the engine, we don't keep data for # This is still TODO(unknown) in the engine, we don't keep data for
# stacks after they are deleted # stacks after they are deleted
if engine_api.STACK_DELETION_TIME in s: if engine_api.STACK_DELETION_TIME in s:

View File

@ -674,7 +674,7 @@ def software_deployment_update(context, deployment_id, values):
if not deployment: if not deployment:
raise exception.NotFound( raise exception.NotFound(
_('Attempt to update sofware deployment with ' _('Attempt to update software deployment with '
'id: %(id)s %(msg)s') % {'id': deployment_id, 'id: %(id)s %(msg)s') % {'id': deployment_id,
'msg': 'that does not exist'}) 'msg': 'that does not exist'})

View File

@ -324,7 +324,7 @@ SECTIONS = (PARAMETERS, RESOURCE_REGISTRY) = \
class Environment(object): class Environment(object):
def __init__(self, env=None, user_env=True): def __init__(self, env=None, user_env=True):
"""Create an Environment from a dict of varing format. """Create an Environment from a dict of varying format.
1) old-school flat parameters 1) old-school flat parameters
2) or newer {resource_registry: bla, parameters: foo} 2) or newer {resource_registry: bla, parameters: foo}

View File

@ -22,7 +22,7 @@ def send(stack):
# The current notifications have a start/end: # The current notifications have a start/end:
# see: https://wiki.openstack.org/wiki/SystemUsageData # see: https://wiki.openstack.org/wiki/SystemUsageData
# so to be consistant we translate our status into a known start/end/error # so to be consistent we translate our status into a known start/end/error
# suffix. # suffix.
level = notification.get_default_level() level = notification.get_default_level()
if stack.status == stack.IN_PROGRESS: if stack.status == stack.IN_PROGRESS:

View File

@ -404,7 +404,7 @@ class Resource(object):
''' '''
Perform a transition to a new state via a specified action Perform a transition to a new state via a specified action
action should be e.g self.CREATE, self.UPDATE etc, we set action should be e.g self.CREATE, self.UPDATE etc, we set
status based on this, the transistion is handled by calling the status based on this, the transition is handled by calling the
corresponding handle_* and check_*_complete functions corresponding handle_* and check_*_complete functions
Note pre_func is an optional function reference which will Note pre_func is an optional function reference which will
be called before the handle_<action> function be called before the handle_<action> function

View File

@ -338,7 +338,7 @@ class InstanceGroup(stack_resource.StackResource):
raise ValueError('The current UpdatePolicy will result ' raise ValueError('The current UpdatePolicy will result '
'in stack update timeout.') 'in stack update timeout.')
# effective capacity includes temporary capacity added to accomodate # effective capacity includes temporary capacity added to accommodate
# the minimum number of instances in service during update # the minimum number of instances in service during update
efft_capacity = max(capacity - efft_bat_sz, efft_min_sz) + efft_bat_sz efft_capacity = max(capacity - efft_bat_sz, efft_min_sz) + efft_bat_sz

View File

@ -108,7 +108,7 @@ class RouteTable(resource.Resource):
raise ex raise ex
class SubnetRouteTableAssocation(resource.Resource): class SubnetRouteTableAssociation(resource.Resource):
PROPERTIES = ( PROPERTIES = (
ROUTE_TABLE_ID, SUBNET_ID, ROUTE_TABLE_ID, SUBNET_ID,
@ -186,5 +186,5 @@ def resource_mapping():
return { return {
'AWS::EC2::RouteTable': RouteTable, 'AWS::EC2::RouteTable': RouteTable,
'AWS::EC2::SubnetRouteTableAssocation': SubnetRouteTableAssocation, 'AWS::EC2::SubnetRouteTableAssociation': SubnetRouteTableAssociation,
} }

View File

@ -40,7 +40,7 @@ class Subnet(resource.Resource):
properties_schema = { properties_schema = {
AVAILABILITY_ZONE: properties.Schema( AVAILABILITY_ZONE: properties.Schema(
properties.Schema.STRING, properties.Schema.STRING,
_('Availablity zone in which you want the subnet.') _('Availability zone in which you want the subnet.')
), ),
CIDR_BLOCK: properties.Schema( CIDR_BLOCK: properties.Schema(
properties.Schema.STRING, properties.Schema.STRING,

View File

@ -152,7 +152,7 @@ class Volume(resource.Resource):
vol.get() vol.get()
if vol.status == 'in-use': if vol.status == 'in-use':
logger.warn(_('cant delete volume when in-use')) logger.warn(_('can not delete volume when in-use'))
raise exception.Error(_('Volume in use')) raise exception.Error(_('Volume in use'))
vol.delete() vol.delete()

View File

@ -32,7 +32,7 @@ class WaitConditionHandle(signal_responder.SignalResponder):
''' '''
the main point of this class is to : the main point of this class is to :
have no dependancies (so the instance can reference it) have no dependancies (so the instance can reference it)
generate a unique url (to be returned in the refernce) generate a unique url (to be returned in the reference)
then the cfn-signal will use this url to post to and then the cfn-signal will use this url to post to and
WaitCondition will poll it to see if has been written to. WaitCondition will poll it to see if has been written to.
''' '''

View File

@ -53,7 +53,7 @@ class Timeout(BaseException):
This allows the task to perform any necessary cleanup, as well as use a This allows the task to perform any necessary cleanup, as well as use a
different exception to notify the controlling task if appropriate. If the different exception to notify the controlling task if appropriate. If the
task supresses the exception altogether, it will be cancelled but the task suppresses the exception altogether, it will be cancelled but the
controlling task will not be notified of the timeout. controlling task will not be notified of the timeout.
""" """

View File

@ -319,7 +319,7 @@ class EngineService(service.Service):
""" """
Return the number of stacks that match the given filters Return the number of stacks that match the given filters
:param ctxt: RPC context. :param ctxt: RPC context.
:param filters: a dict of ATTR:VALUE to match agains stacks :param filters: a dict of ATTR:VALUE to match against stacks
:returns: a integer representing the number of matched stacks :returns: a integer representing the number of matched stacks
""" """
return db_api.stack_count_all_by_tenant(cnxt, filters=filters) return db_api.stack_count_all_by_tenant(cnxt, filters=filters)

View File

@ -80,7 +80,7 @@ def execute(*cmd, **kwargs):
:param cmd: Passed to subprocess.Popen. :param cmd: Passed to subprocess.Popen.
:type cmd: string :type cmd: string
:param process_input: Send to opened process. :param process_input: Send to opened process.
:type proces_input: string :type process_input: string
:param check_exit_code: Single bool, int, or list of allowed exit :param check_exit_code: Single bool, int, or list of allowed exit
codes. Defaults to [0]. Raise codes. Defaults to [0]. Raise
:class:`ProcessExecutionError` unless :class:`ProcessExecutionError` unless

View File

@ -74,7 +74,7 @@ class EngineClient(heat.openstack.common.rpc.proxy.RpcProxy):
""" """
Return the number of stacks that match the given filters Return the number of stacks that match the given filters
:param ctxt: RPC context. :param ctxt: RPC context.
:param filters: a dict of ATTR:VALUE to match agains stacks :param filters: a dict of ATTR:VALUE to match against stacks
:returns: a integer representing the number of matched stacks :returns: a integer representing the number of matched stacks
""" """
return self.call(ctxt, self.make_msg('count_stacks', return self.call(ctxt, self.make_msg('count_stacks',

View File

@ -1465,7 +1465,7 @@ class AutoScalingTest(HeatTestCase):
Metadata.__get__(mox.IgnoreArg(), rsrc, mox.IgnoreArg() Metadata.__get__(mox.IgnoreArg(), rsrc, mox.IgnoreArg()
).AndReturn(previous_meta) ).AndReturn(previous_meta)
#stub for the metadata accesses while creating the addtional instance #stub for the metadata accesses while creating the additional instance
Metadata.__get__(mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg()) Metadata.__get__(mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg())
self._stub_lb_reload(3, unset=False) self._stub_lb_reload(3, unset=False)

View File

@ -151,8 +151,8 @@ class GlobalEnvLoadingTest(common.HeatTestCase):
def test_happy_path(self): def test_happy_path(self):
list_dir = 'heat.engine.resources._list_environment_files' list_dir = 'heat.engine.resources._list_environment_files'
with mock.patch(list_dir) as m_ldir: with mock.patch(list_dir) as m_ldir:
m_ldir.return_value = ['/etc_etc/heat/enviroment.d/a.yaml'] m_ldir.return_value = ['/etc_etc/heat/environment.d/a.yaml']
env_dir = '/etc_etc/heat/enviroment.d' env_dir = '/etc_etc/heat/environment.d'
env_content = '{"resource_registry": {}}' env_content = '{"resource_registry": {}}'
with mock.patch('heat.engine.resources.open', with mock.patch('heat.engine.resources.open',
@ -168,7 +168,7 @@ class GlobalEnvLoadingTest(common.HeatTestCase):
list_dir = 'heat.engine.resources._list_environment_files' list_dir = 'heat.engine.resources._list_environment_files'
with mock.patch(list_dir) as m_ldir: with mock.patch(list_dir) as m_ldir:
m_ldir.return_value = [] m_ldir.return_value = []
env_dir = '/etc_etc/heat/enviroment.d' env_dir = '/etc_etc/heat/environment.d'
resources._load_global_environment(resources.global_env(), resources._load_global_environment(resources.global_env(),
env_dir) env_dir)
@ -180,9 +180,9 @@ class GlobalEnvLoadingTest(common.HeatTestCase):
""" """
list_dir = 'heat.engine.resources._list_environment_files' list_dir = 'heat.engine.resources._list_environment_files'
with mock.patch(list_dir) as m_ldir: with mock.patch(list_dir) as m_ldir:
m_ldir.return_value = ['/etc_etc/heat/enviroment.d/a.yaml', m_ldir.return_value = ['/etc_etc/heat/environment.d/a.yaml',
'/etc_etc/heat/enviroment.d/b.yaml'] '/etc_etc/heat/environment.d/b.yaml']
env_dir = '/etc_etc/heat/enviroment.d' env_dir = '/etc_etc/heat/environment.d'
env_content = '{}' env_content = '{}'
with mock.patch('heat.engine.resources.open', with mock.patch('heat.engine.resources.open',
@ -203,9 +203,9 @@ class GlobalEnvLoadingTest(common.HeatTestCase):
""" """
list_dir = 'heat.engine.resources._list_environment_files' list_dir = 'heat.engine.resources._list_environment_files'
with mock.patch(list_dir) as m_ldir: with mock.patch(list_dir) as m_ldir:
m_ldir.return_value = ['/etc_etc/heat/enviroment.d/a.yaml', m_ldir.return_value = ['/etc_etc/heat/environment.d/a.yaml',
'/etc_etc/heat/enviroment.d/b.yaml'] '/etc_etc/heat/environment.d/b.yaml']
env_dir = '/etc_etc/heat/enviroment.d' env_dir = '/etc_etc/heat/environment.d'
env_content = '{@$%#$%' env_content = '{@$%#$%'
with mock.patch('heat.engine.resources.open', with mock.patch('heat.engine.resources.open',

View File

@ -1806,7 +1806,7 @@ class StackTest(HeatTestCase):
''' '''
assertion: assertion:
changes in dynamic attributes, due to other resources been updated changes in dynamic attributes, due to other resources been updated
are not ignored and can cause dependant resources to be updated. are not ignored and can cause dependent resources to be updated.
''' '''
tmpl = {'Resources': { tmpl = {'Resources': {
'AResource': {'Type': 'ResourceWithPropsType', 'AResource': {'Type': 'ResourceWithPropsType',
@ -1991,7 +1991,7 @@ class StackTest(HeatTestCase):
''' '''
assertion: assertion:
changes in static environment parameters changes in static environment parameters
are not ignored and can cause dependant resources to be updated. are not ignored and can cause dependent resources to be updated.
''' '''
tmpl = {'Parameters': {'AParam': {'Type': 'String'}}, tmpl = {'Parameters': {'AParam': {'Type': 'String'}},
'Resources': { 'Resources': {

View File

@ -71,16 +71,16 @@ class MyStackResource(stack_resource.StackResource,
def physical_resource_name(self): def physical_resource_name(self):
return "cb2f2b28-a663-4683-802c-4b40c916e1ff" return "cb2f2b28-a663-4683-802c-4b40c916e1ff"
def set_template(self, nested_tempalte, params): def set_template(self, nested_template, params):
self.nested_tempalte = nested_tempalte self.nested_template = nested_template
self.nested_params = params self.nested_params = params
def handle_create(self): def handle_create(self):
return self.create_with_template(self.nested_tempalte, return self.create_with_template(self.nested_template,
self.nested_params) self.nested_params)
def handle_adopt(self, resource_data): def handle_adopt(self, resource_data):
return self.create_with_template(self.nested_tempalte, return self.create_with_template(self.nested_template,
self.nested_params, self.nested_params,
adopt_data=resource_data) adopt_data=resource_data)

View File

@ -375,7 +375,7 @@ class AccessKeyTest(UserPolicyTestCase):
t = template_format.parse(user_accesskey_template) t = template_format.parse(user_accesskey_template)
# Set the resource properties UserName to an unknown user # Set the resource properties UserName to an unknown user
t['Resources']['HostKeys']['Properties']['UserName'] = 'NonExistant' t['Resources']['HostKeys']['Properties']['UserName'] = 'NonExistent'
stack = utils.parse_stack(t) stack = utils.parse_stack(t)
stack['CfnUser'].resource_id = self.fc.user_id stack['CfnUser'].resource_id = self.fc.user_id

View File

@ -881,7 +881,7 @@ class FakeVolumeWithStateTransition(FakeVolume):
def get(self): def get(self):
# Allow get to be called once without changing the status # Allow get to be called once without changing the status
# This is to allow the check_create_complete method to # This is to allow the check_create_complete method to
# check the inital status. # check the initial status.
if self.get_call_count < 1: if self.get_call_count < 1:
self.get_call_count += 1 self.get_call_count += 1
else: else:

View File

@ -706,7 +706,7 @@ Resources:
Properties: Properties:
VpcId: {Ref: the_vpc} VpcId: {Ref: the_vpc}
the_association: the_association:
Type: AWS::EC2::SubnetRouteTableAssocation Type: AWS::EC2::SubnetRouteTableAssociation
Properties: Properties:
RouteTableId: {Ref: the_route_table} RouteTableId: {Ref: the_route_table}
SubnetId: {Ref: the_subnet} SubnetId: {Ref: the_subnet}
@ -788,7 +788,7 @@ Resources:
Properties: Properties:
VpcId: {Ref: the_vpc} VpcId: {Ref: the_vpc}
the_association: the_association:
Type: AWS::EC2::SubnetRouteTableAssocation Type: AWS::EC2::SubnetRouteTableAssociation
Properties: Properties:
RouteTableId: {Ref: the_route_table} RouteTableId: {Ref: the_route_table}
SubnetId: {Ref: the_subnet} SubnetId: {Ref: the_subnet}