summaryrefslogtreecommitdiff
path: root/cloudinit/__init__.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-01-21 21:49:55 -0500
committerScott Moser <smoser@ubuntu.com>2011-01-21 21:49:55 -0500
commit7e2e87f2de893835900eb5a96458a865f36c624c (patch)
tree9f4e168b418b18eb4df0bedaaad5ed57bc09cbd3 /cloudinit/__init__.py
parent154722cc740299c6c9d1b3bc9d1e96088f9259eb (diff)
downloadvyos-cloud-init-7e2e87f2de893835900eb5a96458a865f36c624c.tar.gz
vyos-cloud-init-7e2e87f2de893835900eb5a96458a865f36c624c.zip
add function to cloud-init to run cloud-config style modules
add 'hostname' cloud-config option for setting hostname make rsyslog and resizefs run at cloud-init time
Diffstat (limited to 'cloudinit/__init__.py')
-rw-r--r--cloudinit/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py
index 889455d2..12bd0fe1 100644
--- a/cloudinit/__init__.py
+++ b/cloudinit/__init__.py
@@ -478,6 +478,13 @@ class CloudInit:
def device_name_to_device(self,name):
return(self.datasource.device_name_to_device(name))
+ # I really don't know if this should be here or not, but
+ # I needed it in cc_update_hostname, where that code had a valid 'cloud'
+ # reference, but did not have a cloudinit handle
+ # (ie, no cloudinit.get_cpath())
+ def get_cpath(self,name=None):
+ return(get_cpath,name)
+
def initfs():
subds = [ 'scripts/per-instance', 'scripts/per-once', 'scripts/per-boot',
@@ -507,6 +514,7 @@ def purge_cache():
return(False)
return(True)
+# get_ipath_cur: get the current instance path for an item
def get_ipath_cur(name=None):
return("%s/instance/%s" % (varlibdir, pathmap[name]))