Browse files

rename cloudinit module to userdata

  • Loading branch information...
1 parent 3dc4668 commit 11fa431e5013bfe70e2849a69a4aba03c7de9408 @jtriley committed Sep 27, 2012
View
2 starcluster/__init__.py
@@ -22,7 +22,7 @@
"commands",
"logger",
"utils",
- "cloudinit",
+ "userdata",
"iptools",
"webtools",
"threadpool",
View
6 starcluster/cluster.py
@@ -11,7 +11,7 @@
from starcluster import iptools
from starcluster import sshutils
from starcluster import managers
-from starcluster import cloudinit
+from starcluster import userdata
from starcluster import exception
from starcluster import threadpool
from starcluster import validators
@@ -750,8 +750,8 @@ def _get_cluster_userdata(self, aliases):
'starcluster_plugins.txt')
udfiles = [alias_file, plugins_file]
use_cloudinit = not self.disable_cloudinit
- return cloudinit.bundle_userdata_files(udfiles,
- use_cloudinit=use_cloudinit)
+ return userdata.bundle_userdata_files(udfiles,
+ use_cloudinit=use_cloudinit)
def create_nodes(self, aliases, image_id=None, instance_type=None,
zone=None, placement_group=None, spot_bid=None,
View
4 starcluster/node.py
@@ -10,7 +10,7 @@
from starcluster import sshutils
from starcluster import awsutils
from starcluster import managers
-from starcluster import cloudinit
+from starcluster import userdata
from starcluster import exception
from starcluster.logger import log
@@ -97,7 +97,7 @@ def _get_user_data(self, tries=5):
def user_data(self):
if not self._user_data:
raw = self._get_user_data()
- self._user_data = cloudinit.unbundle_userdata(raw)
+ self._user_data = userdata.unbundle_userdata(raw)
return self._user_data
@property
View
10 starcluster/tests/test_cloudinit_utils.py → starcluster/tests/test_userdata_utils.py
@@ -1,20 +1,20 @@
from starcluster import utils
-from starcluster import cloudinit
+from starcluster import userdata
def _test_bundle_userdata(compress=False, use_cloudinit=True):
ignored = '#ignored\nThis file will not be executed.'
bscript = '#!/bin/bash\hostname'
files = utils.strings_to_files([ignored, bscript], fname_prefix='sc')
- userdata = cloudinit.bundle_userdata_files(files, compress=compress,
- use_cloudinit=use_cloudinit)
- unbundled = cloudinit.unbundle_userdata(userdata, decompress=compress)
+ ud = userdata.bundle_userdata_files(files, compress=compress,
+ use_cloudinit=use_cloudinit)
+ unbundled = userdata.unbundle_userdata(ud, decompress=compress)
if use_cloudinit:
cloud_cfg = unbundled.get('starcluster_cloud_config.txt')
assert cloud_cfg.startswith('#cloud-config')
else:
enable_root = unbundled.get('starcluster_enable_root_login.sh')
- assert enable_root == cloudinit.ENABLE_ROOT_LOGIN_SCRIPT
+ assert enable_root == userdata.ENABLE_ROOT_LOGIN_SCRIPT
# ignored files should have #!/bin/false prepended automagically
ilines = unbundled.get('sc_0').splitlines()
assert ilines[0] == '#!/bin/false'
View
0 starcluster/cloudinit.py → starcluster/userdata.py
File renamed without changes.

0 comments on commit 11fa431

Please sign in to comment.