Fix PEP H101 (Use TODO(NAME))
Change-Id: I77c9caa650462725b7c686fbafd9753d046b138d
This commit is contained in:
parent
af6b0b52a0
commit
5b17402cb5
@ -133,7 +133,7 @@ class StackController(object):
|
|||||||
result = api_utils.reformat_dict_keys(keymap, s)
|
result = api_utils.reformat_dict_keys(keymap, s)
|
||||||
|
|
||||||
# AWS docs indicate DeletionTime is ommitted for current stacks
|
# AWS docs indicate DeletionTime is ommitted for current stacks
|
||||||
# This is still TODO 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:
|
||||||
result['DeletionTime'] = s[engine_api.STACK_DELETION_TIME]
|
result['DeletionTime'] = s[engine_api.STACK_DELETION_TIME]
|
||||||
@ -279,7 +279,7 @@ class StackController(object):
|
|||||||
the engine API. FIXME: we currently only support a subset of
|
the engine API. FIXME: we currently only support a subset of
|
||||||
the AWS defined parameters (both here and in the engine)
|
the AWS defined parameters (both here and in the engine)
|
||||||
"""
|
"""
|
||||||
# TODO : Capabilities, NotificationARNs
|
# TODO(shardy) : Capabilities, NotificationARNs
|
||||||
keymap = {'TimeoutInMinutes': engine_api.PARAM_TIMEOUT,
|
keymap = {'TimeoutInMinutes': engine_api.PARAM_TIMEOUT,
|
||||||
'DisableRollback': engine_api.PARAM_DISABLE_ROLLBACK}
|
'DisableRollback': engine_api.PARAM_DISABLE_ROLLBACK}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class BotoCWClient(CloudWatchConnection):
|
|||||||
'''
|
'''
|
||||||
Wrapper class for boto CloudWatchConnection class
|
Wrapper class for boto CloudWatchConnection class
|
||||||
'''
|
'''
|
||||||
# TODO : These should probably go in the CW API and be imported
|
# TODO(unknown) : These should probably go in the CW API and be imported
|
||||||
DEFAULT_NAMESPACE = "heat/unknown"
|
DEFAULT_NAMESPACE = "heat/unknown"
|
||||||
METRIC_UNITS = ("Seconds", "Microseconds", "Milliseconds", "Bytes",
|
METRIC_UNITS = ("Seconds", "Microseconds", "Milliseconds", "Bytes",
|
||||||
"Kilobytes", "Megabytes", "Gigabytes", "Terabytes",
|
"Kilobytes", "Megabytes", "Gigabytes", "Terabytes",
|
||||||
|
@ -43,7 +43,7 @@ class InternetGateway(resource.Resource):
|
|||||||
ext_filter = {'router:external': True}
|
ext_filter = {'router:external': True}
|
||||||
ext_nets = client.list_networks(**ext_filter)['networks']
|
ext_nets = client.list_networks(**ext_filter)['networks']
|
||||||
if len(ext_nets) != 1:
|
if len(ext_nets) != 1:
|
||||||
# TODO sbaker if there is more than one external network
|
# TODO(sbaker) if there is more than one external network
|
||||||
# add a heat configuration variable to set the ID of
|
# add a heat configuration variable to set the ID of
|
||||||
# the default one
|
# the default one
|
||||||
raise exception.Error(
|
raise exception.Error(
|
||||||
|
@ -53,7 +53,7 @@ class RouteTable(resource.Resource):
|
|||||||
vpc_md['all_router_ids'].append(router['id'])
|
vpc_md['all_router_ids'].append(router['id'])
|
||||||
vpc.metadata = vpc_md
|
vpc.metadata = vpc_md
|
||||||
|
|
||||||
# TODO sbaker all_router_ids has changed, any VPCGatewayAttachment
|
# TODO(sbaker) all_router_ids has changed, any VPCGatewayAttachment
|
||||||
# for this vpc needs to be notified
|
# for this vpc needs to be notified
|
||||||
self.resource_id_set(router['id'])
|
self.resource_id_set(router['id'])
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class RouteTable(resource.Resource):
|
|||||||
vpc_md = vpc.metadata
|
vpc_md = vpc.metadata
|
||||||
vpc_md['all_router_ids'].remove(router_id)
|
vpc_md['all_router_ids'].remove(router_id)
|
||||||
vpc.metadata = vpc_md
|
vpc.metadata = vpc_md
|
||||||
# TODO sbaker all_router_ids has changed, any VPCGatewayAttachment
|
# TODO(sbaker) all_router_ids has changed, any VPCGatewayAttachment
|
||||||
# for this vpc needs to be notified
|
# for this vpc needs to be notified
|
||||||
|
|
||||||
def handle_update(self, json_snippet):
|
def handle_update(self, json_snippet):
|
||||||
|
@ -46,7 +46,7 @@ class Subnet(resource.Resource):
|
|||||||
|
|
||||||
def handle_create(self):
|
def handle_create(self):
|
||||||
client = self.quantum()
|
client = self.quantum()
|
||||||
# TODO sbaker Verify that this CidrBlock is within the vpc CidrBlock
|
# TODO(sbaker) Verify that this CidrBlock is within the vpc CidrBlock
|
||||||
network_id = self.properties.get('VpcId')
|
network_id = self.properties.get('VpcId')
|
||||||
vpc = self.stack.resource_by_refid(network_id)
|
vpc = self.stack.resource_by_refid(network_id)
|
||||||
router_id = vpc.metadata['router_id']
|
router_id = vpc.metadata['router_id']
|
||||||
@ -59,7 +59,7 @@ class Subnet(resource.Resource):
|
|||||||
}
|
}
|
||||||
subnet = client.create_subnet({'subnet': props})['subnet']
|
subnet = client.create_subnet({'subnet': props})['subnet']
|
||||||
|
|
||||||
#TODO sbaker check for a non-default router for this network
|
#TODO(sbaker) check for a non-default router for this network
|
||||||
# and use that instead if it exists
|
# and use that instead if it exists
|
||||||
client.add_interface_router(
|
client.add_interface_router(
|
||||||
router_id,
|
router_id,
|
||||||
@ -78,7 +78,7 @@ class Subnet(resource.Resource):
|
|||||||
router_id = self.metadata['router_id']
|
router_id = self.metadata['router_id']
|
||||||
subnet_id = self.resource_id
|
subnet_id = self.resource_id
|
||||||
|
|
||||||
#TODO sbaker check for a non-default router for this network
|
#TODO(sbaker) check for a non-default router for this network
|
||||||
# and remove that instead if it exists
|
# and remove that instead if it exists
|
||||||
try:
|
try:
|
||||||
client.remove_interface_router(
|
client.remove_interface_router(
|
||||||
|
@ -97,7 +97,7 @@ class User(resource.Resource):
|
|||||||
return unicode(self.physical_resource_name())
|
return unicode(self.physical_resource_name())
|
||||||
|
|
||||||
def FnGetAtt(self, key):
|
def FnGetAtt(self, key):
|
||||||
#TODO Implement Arn attribute
|
#TODO(asalkeld) Implement Arn attribute
|
||||||
raise exception.InvalidTemplateAttribute(
|
raise exception.InvalidTemplateAttribute(
|
||||||
resource=self.physical_resource_name(), key=key)
|
resource=self.physical_resource_name(), key=key)
|
||||||
|
|
||||||
|
@ -434,7 +434,7 @@ class CfnStackControllerTest(HeatTestCase):
|
|||||||
expected = "abcdef"
|
expected = "abcdef"
|
||||||
self.assertEqual(result, expected)
|
self.assertEqual(result, expected)
|
||||||
|
|
||||||
# TODO : test the _get_template TemplateUrl case
|
# TODO(shardy) : test the _get_template TemplateUrl case
|
||||||
|
|
||||||
def test_create(self):
|
def test_create(self):
|
||||||
# Format a dummy request
|
# Format a dummy request
|
||||||
|
@ -119,7 +119,7 @@ class EIPTest(HeatTestCase):
|
|||||||
resource = self.create_eip(t, stack, 'IPAddress')
|
resource = self.create_eip(t, stack, 'IPAddress')
|
||||||
association = self.create_association(t, stack, 'IPAssoc')
|
association = self.create_association(t, stack, 'IPAssoc')
|
||||||
|
|
||||||
# TODO sbaker, figure out why this is an empty string
|
# TODO(sbaker), figure out why this is an empty string
|
||||||
#self.assertEqual('', association.FnGetRefId())
|
#self.assertEqual('', association.FnGetRefId())
|
||||||
|
|
||||||
association.delete()
|
association.delete()
|
||||||
|
2
tox.ini
2
tox.ini
@ -22,7 +22,7 @@ commands =
|
|||||||
python setup.py testr --coverage
|
python setup.py testr --coverage
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = H302,H303,H304,H403,H404,F403,F841,H306,H201,H101,H703,H702
|
ignore = H302,H303,H304,H403,H404,F403,F841,H306,H201,H702,H703
|
||||||
show-source = true
|
show-source = true
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,build
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,build
|
||||||
|
Loading…
Reference in New Issue
Block a user