Beispiel #1
0
from __future__ import print_function

import logging
import re

from keystoneclient import access
from keystoneclient import adapter
from keystoneclient.auth.identity import base
from keystoneclient import discover
import requests

from gutsclient import exceptions
from gutsclient.openstack.common import importutils
from gutsclient.openstack.common import strutils

osprofiler_web = importutils.try_import("osprofiler.web")

try:
    import urlparse
except ImportError:
    import urllib.parse as urlparse

try:
    from eventlet import sleep
except ImportError:
    from time import sleep

try:
    import json
except ImportError:
    import simplejson as json
Beispiel #2
0
from gutsclient import utils
import gutsclient.auth_plugin
import gutsclient.extension
from gutsclient.openstack.common import importutils
from gutsclient.openstack.common import strutils
from gutsclient.openstack.common.gettextutils import _
from gutsclient.v1 import shell as shell_v1

from keystoneclient import discover
from keystoneclient import session
from keystoneclient.auth.identity import v2 as v2_auth
from keystoneclient.auth.identity import v3 as v3_auth
from keystoneclient.exceptions import DiscoveryFailure
import six.moves.urllib.parse as urlparse

osprofiler_profiler = importutils.try_import("osprofiler.profiler")

DEFAULT_OS_MIGRATION_API_VERSION = "1"
DEFAULT_GUTS_ENDPOINT_TYPE = 'publicURL'
DEFAULT_GUTS_SERVICE_TYPE = 'migration'

logging.basicConfig()
logger = logging.getLogger(__name__)


class GutsClientArgumentParser(argparse.ArgumentParser):

    def __init__(self, *args, **kwargs):
        super(GutsClientArgumentParser, self).__init__(*args, **kwargs)

    def error(self, message):