ceph/teuthology/task/sleep.py
Zack Cerza 8497437003 Remove unused imports
(cherry picked from commit 586817481119c4fc4a39f8804e7871a43491e01f)
2013-09-26 14:01:37 -05:00

28 lines
456 B
Python

import logging
import time
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Sleep for some number of seconds.
Example::
tasks:
- install:
- ceph:
- sleep:
duration: 10
- interactive:
"""
if not config:
config = {}
assert isinstance(config, dict)
duration = int(config.get('duration', 5))
log.info('Sleeping for %d', duration)
time.sleep(duration)