utils.py 文件源码

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

项目:charm-plumgrid-gateway 作者: openstack 项目源码 文件源码
def remote_restart(rel_name, remote_service=None):
    trigger = {
        'restart-trigger': str(uuid.uuid4()),
    }
    if remote_service:
        trigger['remote-service'] = remote_service
    for rid in relation_ids(rel_name):
        # This subordinate can be related to two seperate services using
        # different subordinate relations so only issue the restart if
        # the principle is conencted down the relation we think it is
        if related_units(relid=rid):
            relation_set(relation_id=rid,
                         relation_settings=trigger,
                         )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号