tempest/api/baremetal/base.py
def creates(resource):
    """Decorator that adds resources to the appropriate cleanup list."""

    def decorator(f):
        @functools.wraps(f)
        def wrapper(cls, *args, **kwargs):
            result = f(cls, *args, **kwargs)
            body = result[resource]

            if 'uuid' in body:
                cls.created_objects[resource].add(body['uuid'])

            return result
        return wrapper
    return decorator
Decorator that adds resources to the appropriate cleanup list.
Decorator that adds resources to the appropriate cleanup list.
Decorator that adds resources to the appropriate cleanup list .
def creates(resource):
    def decorator(f):
        @functools.wraps(f)
        def wrapper(cls, *args, **kwargs):
            result = f(cls, *args, **kwargs)
            body = result[resource]
            if 'uuid' in body:
                cls.created_objects[resource].add(body['uuid'])
            return result
        return wrapper
    return decorator
def creates ( resource ) : def decorator ( f ) : @ functools . wraps ( f ) def wrapper ( cls , * args , ** kwargs ) : result = f ( cls , * args , ** kwargs ) body = result [ resource ] if 'uuid' in body : cls . created_objects [ resource ] . add ( body [ 'uuid' ] ) return result return wrapper return decorator
Decorator that adds resources to the appropriate cleanup list.
Decorator that adds resources to the appropriate cleanup list .
"""Decorator that adds resources to the appropriate cleanup list."""
resource