Skip to content

Commit

Permalink
Stub-implement floating-ip functions on FlatManager
Browse files Browse the repository at this point in the history
This was messing up horizon in a way that would probably be difficult to fix.
It also is probably a bit tricky to implement floating ips properly for
FlatManager at this stage of the release cycle.  Stub them out for now,
to keep horizon happy.

Bug #954580
Bug #937227

Change-Id: Icb8d689860b893ebeeee02e248e836c52830b2de
  • Loading branch information
justinsb committed Mar 19, 2012
1 parent 58bed5a commit 898f86c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions nova/network/manager.py
Expand Up @@ -1635,6 +1635,35 @@ def _teardown_network_on_host(self, context, network):
"""Tear down network on this host."""
pass

# NOTE(justinsb): The floating ip functions are stub-implemented.
# We were throwing an exception, but this was messing up horizon.
# Timing makes it difficult to implement floating ips here, in Essex.

@wrap_check_policy
def get_floating_ip(self, context, id):
"""Returns a floating IP as a dict"""
return None

@wrap_check_policy
def get_floating_pools(self, context):
"""Returns list of floating pools"""
return {}

@wrap_check_policy
def get_floating_ip_by_address(self, context, address):
"""Returns a floating IP as a dict"""
return None

@wrap_check_policy
def get_floating_ips_by_project(self, context):
"""Returns the floating IPs allocated to a project"""
return []

@wrap_check_policy
def get_floating_ips_by_fixed_address(self, context, fixed_address):
"""Returns the floating IPs associated with a fixed_address"""
return []


class FlatDHCPManager(RPCAllocateFixedIP, FloatingIP, NetworkManager):
"""Flat networking with dhcp.
Expand Down

0 comments on commit 898f86c

Please sign in to comment.