ip addresses work now

This commit is contained in:
Vishvananda Ishaya
2010-08-30 09:03:43 -07:00
parent 35039fbc39
commit c963656ff0
2 changed files with 3 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ from nova import rpc
from nova import utils
from nova import datastore # for redis_db flag
from nova.auth import manager # for auth flags
from nova.network import linux_net
from nova.network import manager # for network flags
FLAGS = flags.FLAGS
@@ -74,8 +75,7 @@ def del_lease(_mac, ip_address, _hostname, _interface):
def init_leases(interface):
"""Get the list of hosts for an interface."""
network_ref = db.network_get_by_bridge(None, interface)
network_manager = utils.import_object(FLAGS.network_manager)
return network_manager.driver.get_dhcp_hosts(None, network_ref['id'])
return linux_net.get_dhcp_hosts(None, network_ref['id'])
def main():

View File

@@ -53,7 +53,6 @@ def import_object(import_str):
return sys.modules[import_str]
except ImportError:
cls = import_class(import_str)
print cls
return cls()
def fetchfile(url, target):
@@ -136,6 +135,7 @@ def last_octet(address):
def get_my_ip():
''' returns the actual ip of the local machine.
'''
return '127.0.0.1'
if getattr(FLAGS, 'fake_tests', None):
return '127.0.0.1'
try: