diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-16 13:11:22 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-16 13:11:22 -0700 |
commit | 457b9998d760150efb17658f9a0fd4816417577e (patch) | |
tree | b4121011612b16b905ada79777f26346d78350b1 /cloudinit/handlers | |
parent | c9c3de2fad73af119cf9002799a875c71fda7b7a (diff) | |
download | vyos-cloud-init-457b9998d760150efb17658f9a0fd4816417577e.tar.gz vyos-cloud-init-457b9998d760150efb17658f9a0fd4816417577e.zip |
Pass in the datasource as a option, instead of the lower level instance id.
This allows for others to use datasource functions if they desire to instead of being restricted.
+1 for future use ;)
Diffstat (limited to 'cloudinit/handlers')
-rw-r--r-- | cloudinit/handlers/boot_hook.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/handlers/boot_hook.py b/cloudinit/handlers/boot_hook.py index 10f60b8d..fa675f09 100644 --- a/cloudinit/handlers/boot_hook.py +++ b/cloudinit/handlers/boot_hook.py @@ -32,10 +32,12 @@ LOG = logging.getLogger(__name__) class BootHookPartHandler(handlers.Handler): - def __init__(self, paths, instance_id, **_kwargs): + def __init__(self, paths, datasource, **_kwargs): handlers.Handler.__init__(self, PER_ALWAYS) self.boothook_dir = paths.get_ipath("boothooks") - self.instance_id = instance_id + self.instance_id = None + if datasource: + self.instance_id = datasource.get_instance_id() def list_types(self): return [ |