hook_utils.py 文件源码

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

项目:eclcli 作者: nttcom 项目源码 文件源码
def clear_wildcard_hooks(hc, stack_id, stack_patterns, hook_type,
                         resource_pattern):
    if stack_patterns:
        for resource in hc.resources.list(stack_id):
            res_name = resource.resource_name
            if fnmatch.fnmatchcase(res_name, stack_patterns[0]):
                nested_stack = hc.resources.get(
                    stack_id=stack_id,
                    resource_name=res_name)
                clear_wildcard_hooks(
                    hc,
                    nested_stack.physical_resource_id,
                    stack_patterns[1:], hook_type, resource_pattern)
    else:
        for resource in hc.resources.list(stack_id):
            res_name = resource.resource_name
            if fnmatch.fnmatchcase(res_name, resource_pattern):
                clear_hook(hc, stack_id, res_name, hook_type)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号