blob: 0becffe1826e61b030a75a172bb1e4d095b7644f [file] [log] [blame]
try:
import os_client_config # noqa
from keystoneauth1 import exceptions as ka_exceptions # noqa
REQUIREMENTS_MET = True
except ImportError:
REQUIREMENTS_MET = False
from designatev2 import lists
from designatev2 import zones
zone_list = lists.zone_list
zone_create = zones.zone_create
zone_get_details = zones.zone_get_details
zone_get_name_servers = zones.zone_get_name_servers
zone_update = zones.zone_update
zone_delete = zones.zone_delete
__all__ = ('zone_list', 'zone_create', 'zone_delete', 'zone_update',
'zone_get_details', 'zone_get_name_servers',)
def __virtual__():
"""Only load designatev2 if requirements are available."""
if REQUIREMENTS_MET:
return 'designatev2'
else:
return False, ("The designatev2 execution module cannot be loaded: "
"os_client_config or keystoneauth are unavailable.")