def default_flagfile(filename='nova.conf'):
for arg in sys.argv:
if arg.find('flagfile') != -1:
break
else:
if not os.path.isabs(filename):
# turn relative filename into an absolute path script_dir = os.path.dirname(inspect.stack()[-1][1]) filename = os.path.abspath(os.path.join(script_dir, filename))
if os.path.exists(filename): sys.argv = sys.argv[:1] + ['--flagfile=%s' % filename] + sys.argv[1:]
Anyway, I think it may have to do with Python sys.path, because when I print network, it shows I have the darn module loaded, but doesn't think there is a network.lease_ip attributes (which of course there is):
jpipes@serialcoder:~/repos/nova/bug608772$ TESTING=1 ./bin/nova-dhcpbridge add fake 127.0.0.1 serialcoder
warning: no vendor libraries included
DEBUG:root:Called add for mac fake with ip 127.0.0.1 and hostname serialcoder on interface br0
<module 'nova.compute.network' from '/usr/lib/pymodules/python2.6/nova/compute/network.py'>
Traceback (most recent call last):
File "./bin/nova-dhcpbridge", line 89, in <module>
globals()[action+'_lease'](mac, ip, hostname, interface)
File "./bin/nova-dhcpbridge", line 48, in add_lease
network.lease_ip(ip)
AttributeError: 'module' object has no attribute 'lease_ip'
Sure it will.
from /nova/utils.py:
def default_ flagfile( filename= 'nova.conf' ): 'flagfile' ) != -1: isabs(filename) :
script_ dir = os.path. dirname( inspect. stack() [-1][1] )
filename = os.path. abspath( os.path. join(script_ dir, filename)) exists( filename) :
sys. argv = sys.argv[:1] + ['--flagfile=%s' % filename] + sys.argv[1:]
for arg in sys.argv:
if arg.find(
break
else:
if not os.path.
# turn relative filename into an absolute path
if os.path.
Anyway, I think it may have to do with Python sys.path, because when I print network, it shows I have the darn module loaded, but doesn't think there is a network.lease_ip attributes (which of course there is):
jpipes@ serialcoder: ~/repos/ nova/bug608772$ TESTING=1 ./bin/nova- dhcpbridge add fake 127.0.0.1 serialcoder network' from '/usr/lib/ pymodules/ python2. 6/nova/ compute/ network. py'> nova-dhcpbridge ", line 89, in <module> )[action+ '_lease' ](mac, ip, hostname, interface) nova-dhcpbridge ", line 48, in add_lease lease_ip( ip)
warning: no vendor libraries included
DEBUG:root:Called add for mac fake with ip 127.0.0.1 and hostname serialcoder on interface br0
<module 'nova.compute.
Traceback (most recent call last):
File "./bin/
globals(
File "./bin/
network.
AttributeError: 'module' object has no attribute 'lease_ip'