def copy_shim(self):
     shim_dir = os.path.join(t_utils.get_res_path('shims'), self.name)
     copy_tree(shim_dir, utils.ROOT_DIR)
from distutils.dir_util import copy_tree

from jinja2 import Environment, FileSystemLoader
from multipledispatch import dispatch
import sh
import arrow
import docker as docker_py
from docker.utils import kwargs_from_env
from docker.errors import DockerException

from stackhut_common import utils
from stackhut_common.runtime import rpc
from stackhut_common.utils import log
from stackhut_toolkit import utils as t_utils

template_env = Environment(loader=FileSystemLoader(t_utils.get_res_path('templates')))

# OS Types - for docker flags
OS_TYPE = None
try:
    os_str = (str(sh.lsb_release('-i', '-s'))).strip()
    if os_str in ['Fedora']:
        OS_TYPE = 'SELINUX'
    else:
        OS_TYPE = 'UNKNOWN'
except sh.CommandNotFound as e:
    OS_TYPE = 'UNKNOWN'


# TODO - move to docker machine/toolkit instead
class DockerClient: