Remove duplicated policy check at nova-network FlatManager

There are some duplicated and useless policy enforcement at nova-network
FlatManager. The floatingip related function just stubbed out for FlatManager
and the same policies already enforcement at network api layer:

669e1c5d3a/
nova/network/api.py#L170

If the request violated the policy rule, the network api layer enforcement will
stop the request, it nerver can reach the nova network manager side.

This patch just clean them up.

Partially implements blueprint v3-api-policy

Change-Id: I8ca807aee42191c19e11ea322aa8174cd56773a5
This commit is contained in:
He Jie Xu 2014-12-24 13:23:08 +08:00
parent 0d20e72fcd
commit 6e16e73446
3 changed files with 0 additions and 6 deletions

View File

@ -351,7 +351,6 @@
"network:get_floating_ips_by_project": "",
"network:get_floating_ips_by_fixed_address": "",
"network:allocate_floating_ip": "",
"network:deallocate_floating_ip": "",
"network:associate_floating_ip": "",
"network:disassociate_floating_ip": "",
"network:release_floating_ip": "",

View File

@ -1740,18 +1740,15 @@ class FlatManager(NetworkManager):
# we major version the network_rpcapi to 2.0.
return []
@network_api.wrap_check_policy
def allocate_floating_ip(self, context, project_id, pool):
"""Gets a floating ip from the pool."""
return None
@network_api.wrap_check_policy
def deallocate_floating_ip(self, context, address,
affect_auto_assigned):
"""Returns a floating ip to the pool."""
return None
@network_api.wrap_check_policy
def associate_floating_ip(self, context, floating_address, fixed_address,
affect_auto_assigned=False):
"""Associates a floating ip with a fixed ip.
@ -1761,7 +1758,6 @@ class FlatManager(NetworkManager):
"""
return None
@network_api.wrap_check_policy
def disassociate_floating_ip(self, context, address,
affect_auto_assigned=False):
"""Disassociates a floating ip from its fixed ip.

View File

@ -363,7 +363,6 @@ policy_data = """
"network:get_floating_ips_by_project": "",
"network:get_floating_ips_by_fixed_address": "",
"network:allocate_floating_ip": "",
"network:deallocate_floating_ip": "",
"network:associate_floating_ip": "",
"network:disassociate_floating_ip": "",
"network:release_floating_ip": "",