Nova DB Poking

So, you want to play with some sqlalchemy queries against the Nova DB in an interactive python console?

$> sudo nova-manage shell python
>>> from nova.db.sqlalchemy import api
>>> from nova.db.sqlalchemy import models
>>> from nova import context
>>> ctxt = context.get_admin_context()
>>> vars(api.model_query(ctxt, models.Service).all()[0])
{'binary': u'nova-compute', ..., 'topic': u'compute', 'host': u'f16', 'disabled': False, 'deleted_at': None, 'id': 1L}

One Response to “Nova DB Poking”

  1. […] By Mark McLoughlin: Nova DB Poking […]

    [WORDPRESS HASHCASH] The comment’s server IP ( doesn’t match the comment’s URL host IP ( and so is spam.