diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-03-12 14:52:31 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-03-12 14:52:31 -0400 |
commit | 18269202fac8bdd828023ed88ec416771556bf61 (patch) | |
tree | 6750f07a74d6b7ba18e1c84aba3b0c5ca65a9576 | |
parent | 6b8df9532c2d006a298dc602255e099b48793f23 (diff) | |
download | vyos-cloud-init-18269202fac8bdd828023ed88ec416771556bf61.tar.gz vyos-cloud-init-18269202fac8bdd828023ed88ec416771556bf61.zip |
fix pylint/pep8 issues in DataSourceCloudStack
-rw-r--r-- | cloudinit/DataSourceCloudStack.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cloudinit/DataSourceCloudStack.py b/cloudinit/DataSourceCloudStack.py index 181b9419..5afdf7b6 100644 --- a/cloudinit/DataSourceCloudStack.py +++ b/cloudinit/DataSourceCloudStack.py @@ -28,6 +28,7 @@ import time import boto.utils as boto_utils from struct import pack + class DataSourceCloudStack(DataSource.DataSource): api_ver = 'latest' seeddir = base_seeddir + '/cs' @@ -35,9 +36,10 @@ class DataSourceCloudStack(DataSource.DataSource): def __init__(self, sys_cfg=None): DataSource.DataSource.__init__(self, sys_cfg) - # Cloudstack has its metadata/userdata URLs located at http://<default-gateway-ip>/latest/ + # Cloudstack has its metadata/userdata URLs located at + # http://<default-gateway-ip>/latest/ self.metadata_address = "http://%s/" % self.get_default_gateway() - + def get_default_gateway(self): """ Returns the default gateway ip address in the dotted format """ @@ -67,7 +69,8 @@ class DataSourceCloudStack(DataSource.DataSource): None, self.metadata_address) self.metadata = boto_utils.get_instance_metadata(self.api_ver, self.metadata_address) - log.debug("crawl of metadata service took %ds" % (time.time() - start)) + log.debug("crawl of metadata service took %ds" % + (time.time() - start)) return True except Exception as e: log.exception(e) @@ -83,6 +86,7 @@ datasources = [ (DataSourceCloudStack, (DataSource.DEP_FILESYSTEM, DataSource.DEP_NETWORK)), ] + # return a list of data sources that match this set of dependencies def get_datasource_list(depends): return DataSource.list_from_depends(depends, datasources) |