From cfe968cbb0581f79e223ae46684351c42fd2d21e Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Sun, 27 May 2018 17:21:06 +0000 Subject: [PATCH] Add back the attach_external_network policy The policy 'network:attach_external_network' was accidentally deleted. This patch adds it back. Change-Id: I7313ff3226fa55b0b3347d37b88d8e4c9a8a2e33 Closes-Bug: #1771883 --- zun/common/policies/network.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zun/common/policies/network.py b/zun/common/policies/network.py index 324ca7839..df9a71f11 100644 --- a/zun/common/policies/network.py +++ b/zun/common/policies/network.py @@ -17,6 +17,17 @@ from zun.common.policies import base NETWORK = 'network:%s' rules = [ + policy.DocumentedRuleDefault( + name=NETWORK % 'attach_external_network', + check_str=base.ROLE_ADMIN, + description='Attach an unshared external network to a container', + operations=[ + { + 'path': '/v1/containers', + 'method': 'POST' + } + ] + ), policy.DocumentedRuleDefault( name=NETWORK % 'create', check_str=base.ROLE_ADMIN,