<div dir="ltr"><div>Hi<br><br></div>try this:<br><div><div><br></div><div>  # It is important to have these lines first!!!<br></div><div>  from rally.common import db<br>  db.api.db_options.set_defaults(db.api.CONF, connection='sqlite:///path/to/your/rally.sqlite')<br></div><div><br>  # now run your code<br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 2, 2016 at 12:47 PM, varun bhatnagar <span dir="ltr"><<a href="mailto:varun292006@gmail.com" target="_blank">varun292006@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am trying out Rally with Python and I have written a very small snippet of code to register the deployment </div><div><br></div><div>from rally.api import Deployment<br></div><div><div>deploymentObject = Deployment()</div><div>deploymentObject.create({<br></div><div>    "type": "ExistingCloud",</div><div>    "auth_url": "<a href="http://192.168.136.145:5000/v2.0" target="_blank">http://192.168.136.145:5000/v2.0</a>",</div><div>    "region_name": "RegionOne",</div><div>    "endpoint_type": "public",</div><div>    "admin": {</div><div>        "username": "admin",</div><div>        "password": "admin",</div><div>        "tenant_name": "admin"</div><div>    },</div><div>    "https_insecure": "false",</div><div>    "https_cacert": ""</div><div>}, "MyCloud") </div></div><div><br></div><div><br></div><div>but it is throwing an error.</div><div><br></div><div><div>  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute</div><div>    cursor.execute(statement, parameters)</div><div>sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: deployments [SQL: u'INSERT INTO deployments (created_at, updated_at, uuid, parent_uuid, name, started_at, completed_at, config, admin, users, enum_deployments_status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'] [parameters: ('2016-02-02 10:39:46.549138', '2016-02-02 10:39:46.549149', '7f56f359-4001-42ee-a60f-fbe9023f7dc7', None, 'ExistingCloud', None, None, '{"endpoint_type": "public", "auth_url": "<a href="http://192.168.136.145:5000/v2.0" target="_blank">http://192.168.136.145:5000/v2.0</a>", "region_name": "RegionOne", "https_insecure": "false", "admin": {"username": "admin", "tenant_name": "admin", "password": "admin"}, "type": "ExistingCloud", "https_cacert": ""}', None, <read-only buffer for 0x7f8fd25b9ae0, size -1, offset 0 at 0x7f8fd20ac2b0>, 'deploy->init')]</div></div><div><br></div><div>Can anyone please help.</div><div><br></div><div>BR,</div><div>Varun</div></div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>