diff options
author | Yuriy Zveryanskyy <yzveryanskyy@mirantis.com> | 2013-10-22 17:31:48 +0300 |
---|---|---|
committer | Yuriy Zveryanskyy <yzveryanskyy@mirantis.com> | 2013-10-25 17:02:31 +0300 |
commit | de30d60aaf4cff72b1ea21c3d389c33a6da2cc45 (patch) | |
tree | d2500dd83f9117329979a4cdb74fb4b953bc1057 /ironic/tests/objects/test_node.py | |
parent | 4c64050283b03fe9cbc6bea5cb0827820d9ae74e (diff) | |
download | ironic-de30d60aaf4cff72b1ea21c3d389c33a6da2cc45.tar.gz |
Add context to TaskManager
Some drivers methods can require context-specific
info. Example: keystone auth enabled, auth_token
required for deploy with use vendor_passthru in API.
Possible usage:
with task_manager.acquire(context, node_id,
shared=False) as task:
...
task.driver.deploy.deploy(task, node_obj)
...
def deploy(self, task, node):
...
token = task.context.auth_token
if token:
...
Change-Id: Id51c005499ac4013142f71703a6aa2dca067f1ad
Diffstat (limited to 'ironic/tests/objects/test_node.py')
0 files changed, 0 insertions, 0 deletions