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 ;)
This commit is contained in:
Joshua Harlow
2012-06-16 13:11:22 -07:00
parent 77864b2c43
commit 4cb2327ad0
2 changed files with 5 additions and 3 deletions

View File

@@ -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 [