def skip_without_vpc(*args, **kwargs):
    def decorator(f):
        @functools.wraps(f)
        def wrapper(self, *func_args, **func_kwargs):
            if not TesterStateHolder().get_vpc_enabled():
                msg = "Skipped because VPC is disabled"
                raise testtools.TestCase.skipException(msg)
            return f(self, *func_args, **func_kwargs)
        return wrapper
    return decorator
A decorator useful to skip tests if VPC is not supported.
dataset/ETHPy150Open openstack/ec2-api/ec2api/tests/functional/base.py/skip_without_vpc