From 9955c8a9ed48562e2f3175962adf02f7b366189c Mon Sep 17 00:00:00 2001 From: Murali Raju Date: Wed, 12 Sep 2012 15:46:55 -0400 Subject: [PATCH] Minor fixes to devstack_myql.py --- scripts/devstack_mysql.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/devstack_mysql.py b/scripts/devstack_mysql.py index 1b81054..4a7c5ee 100644 --- a/scripts/devstack_mysql.py +++ b/scripts/devstack_mysql.py @@ -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()