Minor fixes to devstack_myql.py
This commit is contained in:
parent
e2cc00e74d
commit
9955c8a9ed
|
@ -16,8 +16,8 @@ except Exception, e:
|
|||
def create_dummy_ipallocations_id():
|
||||
"""
|
||||
[murraju] This is a quick hack to generate an ipallocations id
|
||||
that can be used by fixed id in port forwards to allow successful
|
||||
POST requests. This for devstack or development purposes only
|
||||
that can be used by fixed_id in port forwards to allow successful
|
||||
POST requests. This is only for devstack or development purposes.
|
||||
"""
|
||||
engine.execute("USE ovs_quantum")
|
||||
subnets = engine.execute('select * from subnets limit 1')
|
||||
|
@ -36,10 +36,14 @@ def create_dummy_ipallocations_id():
|
|||
ipallocations_table = sqlalchemy.Table("ipallocations",
|
||||
metadata, autoload=True)
|
||||
insert_sql = ipallocations_table.insert()
|
||||
insert_sql.execute(id=ipallocations_id,
|
||||
insert_sql.execute(id=ipallocations_id, port_id=None,
|
||||
subnet_id=subnet_id, network_id=network_id,
|
||||
ip_address='172.16.20.1')
|
||||
|
||||
print ''
|
||||
print "Created ipallocations id: ", ipallocations_id
|
||||
print ''
|
||||
print "Use %s as the fixed_id field for portforward" % ipallocations_id
|
||||
print ''
|
||||
|
||||
create_dummy_ipallocations_id()
|
||||
|
|
Loading…
Reference in New Issue