コード例 #1
0
ファイル: build.py プロジェクト: fanyuxing/generator
def build_console(_console_dir):
    """[download console]

    Arguments:
        _console_dir {[type]} -- [description]
    """
    data = _console_dir
    utils.download_console(data)
    CONSOLER.info(
        "download console success, obtain the sdk certificates now...")
    if utils.Status.gm_ssl:
        opr_cert.get_console_cert_gmssl('{}/console/conf'.format(data))
    else:
        opr_cert.get_console_cert('{}/console/conf'.format(data))
    CONSOLER.info(
        "obtain the sdk certificates success, configure the console now")
    if utils.console_use_xml_configuration():
        CONSOLER.info("configure applicationContext.xml")
        shutil.copyfile(
            '{}/tpl/applicationContext.xml'.format(path.get_path()),
            '{}/console/conf/applicationContext.xml'.format(data))
        config.get_console_file(
            '{}/console/conf/applicationContext.xml'.format(data))
    else:
        CONSOLER.info("configure config-example.toml")
        # copy the config-example.toml to config.toml
        shutil.copyfile('{}/console/conf/config-example.toml'.format(data),
                        '{}/console/conf/config.toml'.format(data))
        # update the connections
        config.config_console_toml_file(
            '{}/console/conf/config.toml'.format(data))
    CONSOLER.info("configure the console success")
コード例 #2
0
ファイル: build.py プロジェクト: yovenchen/generator
def get_sdk(_dir):
    """[summary]

    Arguments:
        _dir {[type]} -- [description]
    """
    data = _dir
    utils.dir_must_not_exists(_dir)
    os.mkdir(_dir)
    opr_cert.get_console_cert(_dir)
    shutil.copyfile('{}/tpl/applicationContext.xml'.format(path.get_path()),
                    '{}/applicationContext.xml'.format(data))
    config.get_console_file('{}/applicationContext.xml'.format(data))
コード例 #3
0
ファイル: build.py プロジェクト: yovenchen/generator
def build_console(_console_dir):
    """[download console]

    Arguments:
        _console_dir {[type]} -- [description]
    """
    data = _console_dir
    utils.download_console(data)
    opr_cert.get_console_cert('{}/console/conf'.format(data))
    shutil.copyfile('{}/tpl/applicationContext.xml'.format(path.get_path()),
                    '{}/console/conf/applicationContext.xml'.format(data))
    config.get_console_file(
        '{}/console/conf/applicationContext.xml'.format(data))