utils.py 文件源码

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

项目:aws-greengrass-mini-fulfillment 作者: awslabs 项目源码 文件源码
def discover_configured_core(device_name, dip, config_file):
    cfg = GroupConfigFile(config_file)
    gg_core = None
    # Discover Greengrass Core

    discovered, discovery_info = ggc_discovery(
        device_name, dip, retry_count=10
    )
    logging.info("[discover_cores] Device: {0} discovery success".format(
        device_name)
    )

    # find the configured Group's core
    for group in discovery_info.getAllGroups():
        dump_core_info_list(group.coreConnectivityInfoList)
        gg_core = group.getCoreConnectivityInfo(cfg['core']['thing_arn'])

        if gg_core:
            logging.info('Found the configured core and Group CA.')
            break

    return gg_core, discovery_info
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号