当前位置: 首页>>代码示例>>Python>>正文


Python nulecule.NuleculeManager类代码示例

本文整理汇总了Python中atomicapp.nulecule.NuleculeManager的典型用法代码示例。如果您正苦于以下问题:Python NuleculeManager类的具体用法?Python NuleculeManager怎么用?Python NuleculeManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了NuleculeManager类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: cli_run

def cli_run(args):
    try:
        argdict = args.__dict__
        destination = argdict['destination']
        nm = NuleculeManager(app_spec=argdict['app_spec'],
                             destination=destination,
                             cli_answers=argdict['cli_answers'],
                             answers_file=argdict['answers'])
        nm.run(**argdict)
        # Clean up the files if the user asked us to. Otherwise
        # notify the user where they can manage the application
        if destination and destination.lower() == 'none':
            Utils.rm_dir(nm.app_path)
        else:
            print_app_location(nm.app_path)
        sys.exit(0)
    except DockerException as e:
        logger.error(e)
        sys.exit(1)
    except NuleculeException as e:
        logger.error(e)
        sys.exit(1)
    except Exception as e:
        logger.error(e, exc_info=True)
        sys.exit(1)
开发者ID:Preeticp,项目名称:atomicapp,代码行数:25,代码来源:main.py

示例2: cli_genanswers

def cli_genanswers(args):
    argdict = args.__dict__
    nm = NuleculeManager(app_spec=argdict['app_spec'],
                         destination='none')
    nm.genanswers(**argdict)
    Utils.rm_dir(nm.app_path)  # clean up files
    sys.exit(0)
开发者ID:chuanchang,项目名称:atomicapp,代码行数:7,代码来源:main.py

示例3: cli_stop

def cli_stop(args):
    try:
        argdict = args.__dict__
        nm = NuleculeManager(app_spec=argdict['app_spec'])
        nm.stop(**argdict)
        sys.exit(0)
    except NuleculeException as e:
        logger.error(e)
        sys.exit(1)
    except Exception as e:
        logger.error(e, exc_info=True)
        sys.exit(1)
开发者ID:Preeticp,项目名称:atomicapp,代码行数:12,代码来源:main.py

示例4: cli_genanswers

def cli_genanswers(args):
    try:
        argdict = args.__dict__
        nm = NuleculeManager(app_spec=argdict['app_spec'],
                             destination='none')
        nm.genanswers(**argdict)
        Utils.rm_dir(nm.app_path)  # clean up files
        sys.exit(0)
    except NuleculeException as e:
        logger.error(e)
        sys.exit(1)
    except Exception as e:
        logger.error(e, exc_info=True)
        sys.exit(1)
开发者ID:Preeticp,项目名称:atomicapp,代码行数:14,代码来源:main.py

示例5: cli_fetch

def cli_fetch(args):
    argdict = args.__dict__
    destination = argdict['destination']
    nm = NuleculeManager(app_spec=argdict['app_spec'],
                         destination=destination,
                         cli_answers=argdict['cli_answers'],
                         answers_file=argdict['answers'])
    nm.fetch(**argdict)
    # Clean up the files if the user asked us to. Otherwise
    # notify the user where they can manage the application
    if destination and destination.lower() == 'none':
        Utils.rm_dir(nm.app_path)
    else:
        print_app_location(nm.app_path)
    sys.exit(0)
开发者ID:chuanchang,项目名称:atomicapp,代码行数:15,代码来源:main.py

示例6: cli_run

def cli_run(args):
    try:
        argdict = args.__dict__
        nm = NuleculeManager(app_spec=argdict['app_spec'],
                             destination=argdict['destination'],
                             answers_file=argdict['answers'])
        nm.run(**argdict)
        print_app_location(nm.app_path)
        sys.exit(0)
    except NuleculeException as e:
        logger.error(e)
        sys.exit(1)
    except Exception as e:
        logger.error(e, exc_info=True)
        sys.exit(1)
开发者ID:yghannam,项目名称:atomicapp,代码行数:15,代码来源:main.py

示例7: cli_install

def cli_install(args):
    try:
        argdict = args.__dict__
        nm = NuleculeManager(
            app_spec=argdict["app_spec"], destination=argdict["destination"], answers_file=argdict["answers"]
        )
        nm.install(**argdict)
        print_app_location(nm.app_path)
        sys.exit(0)
    except NuleculeException as e:
        logger.error(e)
        sys.exit(1)
    except Exception as e:
        logger.error(e, exc_info=True)
        sys.exit(1)
开发者ID:schmerk,项目名称:atomicapp,代码行数:15,代码来源:main.py

示例8: cli_init

def cli_init(args):
    try:
        argdict = args.__dict__
        appdir = NuleculeManager.init(argdict['app_name'],
                                      argdict['destination'])
        if appdir:
            print('\nAtomic App: %s initialized at %s' %
                  (argdict['app_name'], appdir))
        sys.exit(0)
    except Exception as e:
        logger.error(e, exc_info=True)
        sys.exit(1)
开发者ID:chuanchang,项目名称:atomicapp,代码行数:12,代码来源:main.py

示例9: cli_init

def cli_init(args):
    try:
        argdict = args.__dict__
        created, destination = NuleculeManager.init(argdict['app_name'], argdict['destination'])
        if created:
            print('\nAtomic App: %s initialized at %s' % (argdict['app_name'], destination))
        else:
            print(
                '\nAtomic App: %s was not initialized because destination directory: %s is not empty.' % (
                    argdict['app_name'], destination)
            )
        sys.exit(0)
    except Exception as e:
        logger.error(e, exc_info=True)
        sys.exit(1)
开发者ID:bexelbie,项目名称:atomicapp,代码行数:15,代码来源:main.py

示例10: cli_stop

def cli_stop(args):
    argdict = args.__dict__
    nm = NuleculeManager(app_spec=argdict['app_spec'])
    nm.stop(**argdict)
    sys.exit(0)
开发者ID:chuanchang,项目名称:atomicapp,代码行数:5,代码来源:main.py


注:本文中的atomicapp.nulecule.NuleculeManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。