diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-09-21 17:33:22 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-09-21 17:33:22 +0000 |
commit | d7c5a6ad89dbef404e705d6657c5da054613282a (patch) | |
tree | 13ed95991166df20b0d9f444d0f1a4169b09c25d /ironic/drivers/modules | |
parent | c328dddd13b2a74d22f85042dd88fa559dcf1903 (diff) | |
parent | 714a7cfda97c6e1ea1fe08a58ddec23e96dfd5bc (diff) | |
download | ironic-d7c5a6ad89dbef404e705d6657c5da054613282a.tar.gz |
Merge "DRAC: list unfinished jobs"
Diffstat (limited to 'ironic/drivers/modules')
-rw-r--r-- | ironic/drivers/modules/drac/vendor_passthru.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ironic/drivers/modules/drac/vendor_passthru.py b/ironic/drivers/modules/drac/vendor_passthru.py index 3fd8cbe68..4337d5318 100644 --- a/ironic/drivers/modules/drac/vendor_passthru.py +++ b/ironic/drivers/modules/drac/vendor_passthru.py @@ -19,6 +19,7 @@ from ironic.conductor import task_manager from ironic.drivers import base from ironic.drivers.modules.drac import bios as drac_bios from ironic.drivers.modules.drac import common as drac_common +from ironic.drivers.modules.drac import job as drac_job class DracVendorPassthru(base.VendorInterface): @@ -111,3 +112,21 @@ class DracVendorPassthru(base.VendorInterface): :raises: DracOperationError on an error from python-dracclient. """ drac_bios.abandon_config(task) + + @base.passthru(['GET'], async=False, + description=('List unfinished config jobs of the node. ' + 'Required argument: a TaskManager instance ' + 'containing the node to act on.')) + def list_unfinished_jobs(self, task, **kwargs): + """List unfinished config jobs of the node. + + :param task: a TaskManager instance containing the node to act on. + :param kwargs: not used. + :returns: a dictionary containing the ``unfinished_jobs`` key; this key + points to a list of dicts, with each dict representing a Job + object. + :raises: DracOperationError on an error from python-dracclient. + """ + jobs = drac_job.list_unfinished_jobs(task.node) + # FIXME(mgould) Do this without calling private methods. + return {'unfinished_jobs': [job._asdict() for job in jobs]} |