From a938d073f7e36647e5b63131b552c0a861cb62c2 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 9 Jan 2013 16:00:36 -0500 Subject: [PATCH] fix new N402 errors fix the N402 errors that have slipped in in the last 48 hrs since starting this patch series. fix an N401 error that our scanner current can't find because it only looks for doc strings on classes and defs. this is the xeno's paradox of patch series, but we're getting close. Change-Id: I4a763bb4c812335d853eae05c72464f18ab93297 --- bin/nova-baremetal-deploy-helper | 20 ++++++++++---------- nova/tests/test_db_api.py | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/nova-baremetal-deploy-helper b/bin/nova-baremetal-deploy-helper index fa0a30d9..f8a487d3 100755 --- a/bin/nova-baremetal-deploy-helper +++ b/bin/nova-baremetal-deploy-helper @@ -56,7 +56,7 @@ QUEUE = Queue.Queue() # They are split for stub-out. def discovery(portal_address, portal_port): - """Do iSCSI discovery on portal""" + """Do iSCSI discovery on portal.""" utils.execute('iscsiadm', '-m', 'discovery', '-t', 'st', @@ -66,7 +66,7 @@ def discovery(portal_address, portal_port): def login_iscsi(portal_address, portal_port, target_iqn): - """Login to an iSCSI target""" + """Login to an iSCSI target.""" utils.execute('iscsiadm', '-m', 'node', '-p', '%s:%s' % (portal_address, portal_port), @@ -79,7 +79,7 @@ def login_iscsi(portal_address, portal_port, target_iqn): def logout_iscsi(portal_address, portal_port, target_iqn): - """Logout from an iSCSI target""" + """Logout from an iSCSI target.""" utils.execute('iscsiadm', '-m', 'node', '-p', '%s:%s' % (portal_address, portal_port), @@ -90,7 +90,7 @@ def logout_iscsi(portal_address, portal_port, target_iqn): def make_partitions(dev, root_mb, swap_mb): - """Create partitions for root and swap on a disk device""" + """Create partitions for root and swap on a disk device.""" commands = ['o,w', 'n,p,1,,+%dM,t,1,83,w' % root_mb, 'n,p,2,,+%dM,t,2,82,w' % swap_mb, @@ -106,13 +106,13 @@ def make_partitions(dev, root_mb, swap_mb): def is_block_device(dev): - """Check whether a device is block or not""" + """Check whether a device is block or not.""" s = os.stat(dev) return stat.S_ISBLK(s.st_mode) def dd(src, dst): - """Execute dd from src to dst""" + """Execute dd from src to dst.""" utils.execute('dd', 'if=%s' % src, 'of=%s' % dst, @@ -122,7 +122,7 @@ def dd(src, dst): def mkswap(dev, label='swap1'): - """Execute mkswap on a device""" + """Execute mkswap on a device.""" utils.execute('mkswap', '-L', label, dev, @@ -131,7 +131,7 @@ def mkswap(dev, label='swap1'): def block_uuid(dev): - """Get UUID of a block device""" + """Get UUID of a block device.""" out, _ = utils.execute('blkid', '-s', 'UUID', '-o', 'value', dev, run_as_root=True, check_exit_code=[0]) @@ -219,7 +219,7 @@ def deploy(address, port, iqn, lun, image_path, pxe_config_path, class Worker(threading.Thread): - """Thread that handles requests in queue""" + """Thread that handles requests in queue.""" def __init__(self): super(Worker, self).__init__() @@ -250,7 +250,7 @@ class Worker(threading.Thread): class BareMetalDeploy(object): - """WSGI server for bare-metal deployment""" + """WSGI server for bare-metal deployment.""" def __init__(self): self.worker = Worker() diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py index acc29099..7df28bfc 100644 --- a/nova/tests/test_db_api.py +++ b/nova/tests/test_db_api.py @@ -540,7 +540,7 @@ class DbApiTestCase(test.TestCase): self.assertEqual(expected, instance_faults) def test_instance_action_start(self): - """Create an instance action""" + """Create an instance action.""" ctxt = context.get_admin_context() uuid = str(stdlib_uuid.uuid4()) @@ -563,7 +563,7 @@ class DbApiTestCase(test.TestCase): self.assertEqual(ctxt.project_id, actions[0]['project_id']) def test_instance_action_finish(self): - """Create an instance action""" + """Create an instance action.""" ctxt = context.get_admin_context() uuid = str(stdlib_uuid.uuid4()) @@ -593,7 +593,7 @@ class DbApiTestCase(test.TestCase): self.assertEqual(ctxt.project_id, actions[0]['project_id']) def test_instance_actions_get_by_instance(self): - """Ensure we can get actions by UUID""" + """Ensure we can get actions by UUID.""" ctxt1 = context.get_admin_context() ctxt2 = context.get_admin_context() uuid1 = str(stdlib_uuid.uuid4()) @@ -625,7 +625,7 @@ class DbApiTestCase(test.TestCase): self.assertEqual('run_instance', actions[1]['action']) def test_instance_action_get_by_instance_and_action(self): - """Ensure we can get an action by instance UUID and action id""" + """Ensure we can get an action by instance UUID and action id.""" ctxt1 = context.get_admin_context() ctxt2 = context.get_admin_context() uuid1 = str(stdlib_uuid.uuid4()) @@ -657,7 +657,7 @@ class DbApiTestCase(test.TestCase): self.assertEqual(ctxt1.request_id, action['request_id']) def test_instance_action_event_start(self): - """Create an instance action event""" + """Create an instance action event.""" ctxt = context.get_admin_context() uuid = str(stdlib_uuid.uuid4()) @@ -683,7 +683,7 @@ class DbApiTestCase(test.TestCase): self.assertEqual(start_time, events[0]['start_time']) def test_instance_action_event_finish(self): - """Finish an instance action event""" + """Finish an instance action event.""" ctxt = context.get_admin_context() uuid = str(stdlib_uuid.uuid4()) @@ -717,7 +717,7 @@ class DbApiTestCase(test.TestCase): self.assertEqual(finish_time, events[0]['finish_time']) def test_instance_action_event_get_by_id(self): - """Get a specific instance action event""" + """Get a specific instance action event.""" ctxt1 = context.get_admin_context() ctxt2 = context.get_admin_context() uuid1 = str(stdlib_uuid.uuid4())