diff options
author | Zuul <zuul@review.opendev.org> | 2020-02-21 07:52:00 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-02-21 07:52:00 +0000 |
commit | 866e90374ec08727161a5e00b409804a7c2e945f (patch) | |
tree | 26d59bb360516dc3c48519a98f876edf35b0de26 /heatclient/osc | |
parent | 207968f353f435d315ff25194e35251bb260df35 (diff) | |
parent | 033511c291c811f9368aaccdc81de3c9c93c9ae2 (diff) | |
download | python-heatclient-866e90374ec08727161a5e00b409804a7c2e945f.tar.gz |
Merge "Allow to set poll interval to OSC stack create"
Diffstat (limited to 'heatclient/osc')
-rw-r--r-- | heatclient/osc/v1/stack.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/heatclient/osc/v1/stack.py b/heatclient/osc/v1/stack.py index bdf7f5f..761b323 100644 --- a/heatclient/osc/v1/stack.py +++ b/heatclient/osc/v1/stack.py @@ -91,6 +91,14 @@ class CreateStack(command.ShowOne): help=_('Wait until stack goes to CREATE_COMPLETE or CREATE_FAILED') ) parser.add_argument( + '--poll', + metavar='SECONDS', + type=int, + default=5, + help=_('Poll interval in seconds for use with --wait, ' + 'defaults to 5.') + ) + parser.add_argument( '--tags', metavar='<tag1,tag2...>', help=_('A list of tags to associate with the stack') @@ -184,7 +192,8 @@ class CreateStack(command.ShowOne): stack = client.stacks.create(**fields)['stack'] if parsed_args.wait: stack_status, msg = event_utils.poll_for_events( - client, parsed_args.name, action='CREATE') + client, parsed_args.name, action='CREATE', + poll_period=parsed_args.poll) if stack_status == 'CREATE_FAILED': raise exc.CommandError(msg) |