merge trunk, fix conflict frim dprince's branch to remove hostname from bin/nova-dhcpbridge
This commit is contained in:
@@ -52,7 +52,7 @@ flags.DECLARE('update_dhcp_on_disassociate', 'nova.network.manager')
|
|||||||
LOG = logging.getLogger('nova.dhcpbridge')
|
LOG = logging.getLogger('nova.dhcpbridge')
|
||||||
|
|
||||||
|
|
||||||
def add_lease(mac, ip_address, _hostname):
|
def add_lease(mac, ip_address, _interface):
|
||||||
"""Set the IP that was assigned by the DHCP server."""
|
"""Set the IP that was assigned by the DHCP server."""
|
||||||
if FLAGS.fake_rabbit:
|
if FLAGS.fake_rabbit:
|
||||||
LOG.debug(_("leasing ip"))
|
LOG.debug(_("leasing ip"))
|
||||||
@@ -66,13 +66,13 @@ def add_lease(mac, ip_address, _hostname):
|
|||||||
"args": {"address": ip_address}})
|
"args": {"address": ip_address}})
|
||||||
|
|
||||||
|
|
||||||
def old_lease(mac, ip_address, hostname):
|
def old_lease(mac, ip_address, interface):
|
||||||
"""Update just as add lease."""
|
"""Update just as add lease."""
|
||||||
LOG.debug(_("Adopted old lease or got a change of mac/hostname"))
|
LOG.debug(_("Adopted old lease or got a change of mac"))
|
||||||
add_lease(mac, ip_address, hostname)
|
add_lease(mac, ip_address, interface)
|
||||||
|
|
||||||
|
|
||||||
def del_lease(mac, ip_address, _hostname):
|
def del_lease(mac, ip_address, _interface):
|
||||||
"""Called when a lease expires."""
|
"""Called when a lease expires."""
|
||||||
if FLAGS.fake_rabbit:
|
if FLAGS.fake_rabbit:
|
||||||
LOG.debug(_("releasing ip"))
|
LOG.debug(_("releasing ip"))
|
||||||
@@ -115,11 +115,10 @@ def main():
|
|||||||
if action in ['add', 'del', 'old']:
|
if action in ['add', 'del', 'old']:
|
||||||
mac = argv[2]
|
mac = argv[2]
|
||||||
ip = argv[3]
|
ip = argv[3]
|
||||||
hostname = argv[4]
|
msg = _("Called %(action)s for mac %(mac)s with ip %(ip)s"
|
||||||
msg = _("Called %(action)s for mac %(mac)s with ip %(ip)s and"
|
" on interface %(interface)s") % locals()
|
||||||
" hostname %(hostname)s on network %(network_id)s") % locals()
|
|
||||||
LOG.debug(msg)
|
LOG.debug(msg)
|
||||||
globals()[action + '_lease'](mac, ip, hostname)
|
globals()[action + '_lease'](mac, ip, interface)
|
||||||
else:
|
else:
|
||||||
print init_leases(network_id)
|
print init_leases(network_id)
|
||||||
|
|
||||||
|
|||||||
@@ -345,6 +345,12 @@ DEFINE_string('logdir', None, 'output to a per-service log file in named '
|
|||||||
'directory')
|
'directory')
|
||||||
DEFINE_integer('logfile_mode', 0644, 'Default file mode of the logs.')
|
DEFINE_integer('logfile_mode', 0644, 'Default file mode of the logs.')
|
||||||
DEFINE_string('sqlite_db', 'nova.sqlite', 'file name for sqlite')
|
DEFINE_string('sqlite_db', 'nova.sqlite', 'file name for sqlite')
|
||||||
|
DEFINE_integer('sql_pool_timeout', 30,
|
||||||
|
'seconds to wait for connection from pool before erroring')
|
||||||
|
DEFINE_integer('sql_min_pool_size', 10,
|
||||||
|
'minimum number of SQL connections to pool')
|
||||||
|
DEFINE_integer('sql_max_pool_size', 10,
|
||||||
|
'maximum number of SQL connections to pool')
|
||||||
DEFINE_string('sql_connection',
|
DEFINE_string('sql_connection',
|
||||||
'sqlite:///$state_path/$sqlite_db',
|
'sqlite:///$state_path/$sqlite_db',
|
||||||
'connection string for sql database')
|
'connection string for sql database')
|
||||||
|
|||||||
Reference in New Issue
Block a user