from sys import exit
-from .config import Config
-from .errors import CLISyntaxError
+from kamaki.cli.config import Config
+from kamaki.cli.errors import CLISyntaxError
class Argument(object):
"""An argument that can be parsed from command line or otherwise"""
from new import instancemethod
from os import popen
from argparse import ArgumentParser
-from . import _update_parser, _exec_cmd
+from kamaki.cli import _update_parser, _exec_cmd
from .errors import CLIError
from .argument import _arguments
from .utils import magenta, print_dict
import json
import logging
-from .connection import HTTPConnectionError
+from kamaki.clients.connection import HTTPConnectionError
#from .connection.request import HTTPRequest
-from .connection.kamakicon import KamakiHTTPConnection
+from kamaki.clients.connection.kamakicon import KamakiHTTPConnection
sendlog = logging.getLogger('clients.send')
recvlog = logging.getLogger('clients.recv')
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
-from . import Client, ClientError
-from .connection.request import HTTPRequest
+from kamaki.clients import Client, ClientError
class AstakosClient(Client):
"""GRNet Astakos API client"""
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
-from . import Client, ClientError
-from .connection.request import HTTPRequest
-from .utils import path4url
+from kamaki.clients import Client, ClientError
+from kamaki.clients.connection.request import HTTPRequest
+from kamaki.clients.utils import path4url
import json
from urlparse import urlparse
#from .pool.http import get_http_connection
from synnefo.lib.pool.http import get_http_connection
-from . import HTTPConnection, HTTPResponse, HTTPConnectionError
+from kamaki.clients.connection import HTTPConnection, HTTPResponse, HTTPConnectionError
from json import loads
# or implied, of GRNET S.A.
import requests
-from . import HTTPConnection, HTTPResponse, HTTPConnectionError
+from kamaki.clients.connection import HTTPConnection, HTTPResponse, HTTPConnectionError
from kamaki.clients.connection.pool import ObjectPool
from urlparse import urlparse
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
-from .compute import ComputeClient, ClientError
-from .utils import path4url
+from kamaki.clients.compute import ComputeClient, ClientError
+from kamaki.clients.utils import path4url
import json
class CycladesClient(ComputeClient):
# documentation are those of the authors and should not be
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
-from . import Client, ClientError
-from .utils import path4url
+from kamaki.clients import Client, ClientError
+from kamaki.clients.utils import path4url
class ImageClient(Client):
"""OpenStack Image Service API 1.0 and GRNET Plankton client"""
from binascii import hexlify
-from .pithos_rest_api import PithosRestAPI
-from .storage import ClientError
-from .utils import path4url, filter_in
+from kamaki.clients.pithos_rest_api import PithosRestAPI
+from kamaki.clients.storage import ClientError
+from kamaki.clients.utils import path4url, filter_in
from StringIO import StringIO
def pithos_hash(block, blockhash):
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
-from . import Client, ClientError
-from .utils import filter_in, filter_out, prefix_keys, path4url
+from kamaki.clients import Client, ClientError
+from kamaki.clients.utils import filter_in, filter_out, prefix_keys, path4url
#from .connection.kamakicon import KamakiHTTPConnection
class StorageClient(Client):