當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。