commands.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:docl 作者: cloudify-cosmo 项目源码 文件源码
def init(docker_host=constants.DOCKER_HOST,
         ssh_key_path=constants.SSH_KEY,
         clean_image_docker_tag=constants.CLEAN_IMAGE_DOCKER_TAG,
         manager_image_docker_tag=constants.MANAGER_IMAGE_DOCKER_TAG,
         source_root=constants.SOURCE_ROOT,
         workdir=None,
         reset=False,
         debug_ip=None):
    ssh_key_path = path(ssh_key_path).expanduser()
    if not ssh_key_path.isfile():
        raise argh.CommandError(
            'You need to create a key (see man ssh-keygen) first'
        )
    configuration.save(
        docker_host=docker_host,
        ssh_key_path=ssh_key_path.abspath(),
        clean_image_docker_tag=clean_image_docker_tag,
        manager_image_docker_tag=manager_image_docker_tag,
        source_root=source_root,
        workdir=workdir,
        reset=reset,
        debug_ip=debug_ip)
    logger.info('Configuration is saved to {}. Feel free to change it to your '
                'liking.'.format(configuration.conf_path))
    work.init()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号