diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-02-26 14:28:46 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-02-26 14:28:46 -0500 |
commit | 21fc25fbc0e73e15710d2f0333f7d3ba13eb3739 (patch) | |
tree | e2d11aa939fc2121201386ffcbf841913da7ee1b | |
parent | 0fa8bfa1104b18aaed8afb720cf0fa8ad8b3ffa2 (diff) | |
download | vyos-cloud-init-21fc25fbc0e73e15710d2f0333f7d3ba13eb3739.tar.gz vyos-cloud-init-21fc25fbc0e73e15710d2f0333f7d3ba13eb3739.zip |
pep8 and pylint
-rw-r--r-- | cloudinit/sources/DataSourceSmartOS.py | 5 | ||||
-rw-r--r-- | cloudinit/sources/helpers/__init__.py | 1 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_azure.py | 4 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_configdrive.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_nocloud.py | 1 | ||||
-rw-r--r-- | tests/unittests/test_handler/test_handler_growpart.py | 3 |
6 files changed, 8 insertions, 8 deletions
diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py index 3c30541c..7c1eb09a 100644 --- a/cloudinit/sources/DataSourceSmartOS.py +++ b/cloudinit/sources/DataSourceSmartOS.py @@ -209,7 +209,7 @@ class DataSourceSmartOS(sources.DataSource): # executed. It may be of any format that would be considered # executable in the guest instance. # - # We write 'user-script' and 'operator-script' into the + # We write 'user-script' and 'operator-script' into the # instance/data directory. The default vendor-data then handles # executing them later. data_d = os.path.join(self.paths.get_cpath(), 'instances', @@ -244,7 +244,8 @@ class DataSourceSmartOS(sources.DataSource): md['vendor-data'] = BUILTIN_VENDOR_DATA % { 'user_script': user_script, 'operator_script': operator_script, - 'per_boot_d': os.path.join(self.paths.get_cpath("scripts"), 'per-boot'), + 'per_boot_d': os.path.join(self.paths.get_cpath("scripts"), + 'per-boot'), } self.metadata = util.mergemanydict([md, self.metadata]) diff --git a/cloudinit/sources/helpers/__init__.py b/cloudinit/sources/helpers/__init__.py index 2cf99ec8..386225d5 100644 --- a/cloudinit/sources/helpers/__init__.py +++ b/cloudinit/sources/helpers/__init__.py @@ -11,4 +11,3 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. - diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py index 44c537f4..ccfd672a 100644 --- a/tests/unittests/test_datasource/test_azure.py +++ b/tests/unittests/test_datasource/test_azure.py @@ -352,13 +352,13 @@ class TestAzureDataSource(MockerTestCase): ovf_env_path = os.path.join(self.waagent_d, 'ovf-env.xml') self.assertTrue(os.path.exists(ovf_env_path)) self.assertEqual(xml, load_file(ovf_env_path)) - + def test_existing_ovf_same(self): # waagent/SharedConfig left alone if found ovf-env.xml same as cached odata = {'UserData': base64.b64encode("SOMEUSERDATA")} data = {'ovfcontent': construct_valid_ovf_env(data=odata)} - populate_dir(self.waagent_d, + populate_dir(self.waagent_d, {'ovf-env.xml': data['ovfcontent'], 'otherfile': 'otherfile-content', 'SharedConfig.xml': 'mysharedconfig'}) diff --git a/tests/unittests/test_datasource/test_configdrive.py b/tests/unittests/test_datasource/test_configdrive.py index 937b88c1..4404668e 100644 --- a/tests/unittests/test_datasource/test_configdrive.py +++ b/tests/unittests/test_datasource/test_configdrive.py @@ -166,7 +166,7 @@ class TestConfigDriveDataSource(MockerTestCase): my_mock.replay() device = cfg_ds.device_name_to_device(name) self.assertEquals(dev_name, device) - + def test_dev_ec2_map(self): populate_dir(self.tmp, CFG_DRIVE_FILES_V2) cfg_ds = ds.DataSourceConfigDrive(settings.CFG_BUILTIN, diff --git a/tests/unittests/test_datasource/test_nocloud.py b/tests/unittests/test_datasource/test_nocloud.py index af575a10..a65833eb 100644 --- a/tests/unittests/test_datasource/test_nocloud.py +++ b/tests/unittests/test_datasource/test_nocloud.py @@ -133,6 +133,7 @@ class TestNoCloudDataSource(MockerTestCase): self.assertFalse(dsrc.vendordata) self.assertTrue(ret) + class TestParseCommandLineData(MockerTestCase): def test_parse_cmdline_data_valid(self): diff --git a/tests/unittests/test_handler/test_handler_growpart.py b/tests/unittests/test_handler/test_handler_growpart.py index 996526d3..f2ed4597 100644 --- a/tests/unittests/test_handler/test_handler_growpart.py +++ b/tests/unittests/test_handler/test_handler_growpart.py @@ -9,7 +9,6 @@ import errno import logging import os import re -import unittest # growpart: # mode: auto # off, on, auto, 'growpart' @@ -203,7 +202,7 @@ def simple_device_part_info(devpath): return x -class Bunch: +class Bunch(object): st_mode = None # fix pylint complaint def __init__(self, **kwds): |