Merge "Add policy description for networks_associate"
This commit is contained in:
commit
a2beeab720
|
@ -13,8 +13,6 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_policy import policy
|
|
||||||
|
|
||||||
from nova.policies import base
|
from nova.policies import base
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,9 +20,27 @@ BASE_POLICY_NAME = 'os_compute_api:os-networks-associate'
|
||||||
|
|
||||||
|
|
||||||
networks_associate_policies = [
|
networks_associate_policies = [
|
||||||
policy.RuleDefault(
|
base.create_rule_default(
|
||||||
name=BASE_POLICY_NAME,
|
BASE_POLICY_NAME,
|
||||||
check_str=base.RULE_ADMIN_API),
|
base.RULE_ADMIN_API,
|
||||||
|
"""Associates and Disassociates a network from a host or project.
|
||||||
|
|
||||||
|
These APIs are only available with nova-network which is deprecated.""",
|
||||||
|
[
|
||||||
|
{
|
||||||
|
'method': 'POST',
|
||||||
|
'path': '/os-networks/{network_id}/action (disassociate_host)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'method': 'POST',
|
||||||
|
'path': '/os-networks/{network_id}/action'
|
||||||
|
' (disassociate_project)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'method': 'POST',
|
||||||
|
'path': '/os-networks/{network_id}/action (associate_host)'
|
||||||
|
}
|
||||||
|
]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue