[openstack-dev] [Openstack] Error while using Rally with Python

Aleksandr Maretskiy amaretskiy at mirantis.com
Tue Feb 2 10:55:23 UTC 2016


Hi

try this:

  # It is important to have these lines first!!!
  from rally.common import db
  db.api.db_options.set_defaults(db.api.CONF,
connection='sqlite:///path/to/your/rally.sqlite')

  # now run your code


On Tue, Feb 2, 2016 at 12:47 PM, varun bhatnagar <varun292006 at gmail.com>
wrote:

> Hi,
>
> I am trying out Rally with Python and I have written a very small snippet
> of code to register the deployment
>
> from rally.api import Deployment
> deploymentObject = Deployment()
> deploymentObject.create({
>     "type": "ExistingCloud",
>     "auth_url": "http://192.168.136.145:5000/v2.0",
>     "region_name": "RegionOne",
>     "endpoint_type": "public",
>     "admin": {
>         "username": "admin",
>         "password": "admin",
>         "tenant_name": "admin"
>     },
>     "https_insecure": "false",
>     "https_cacert": ""
> }, "MyCloud")
>
>
> but it is throwing an error.
>
>   File
> "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
> 450, in do_execute
>     cursor.execute(statement, parameters)
> 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": "http://192.168.136.145:5000/v2.0",
> "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')]
>
> Can anyone please help.
>
> BR,
> Varun
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160202/666dcc84/attachment.html>


More information about the OpenStack-dev mailing list