Home > openstack > Openstack Nova Database API

Openstack Nova Database API

Almost all of the command (ex. ‘nova boot’, ‘nova delete’, ‘keystone user-create’ and so on) in OpenStack nova make a direct or indirect (through rpc, which is eventually complicated) database call. The interface and functionalities for directly connecting to database is at nova/nova/db/directory (in my devstack installation it is @/opt/stack/nova/nova/db). The directly has two related files namely

1. db/api.py
2. db/sqlalchemy/api.py

The first one is the database Interface and the actual implementation (back end) is available the later of the two. For example, if you delete a vm by ‘nova delete’ and nova decides to delete it locally (based on the state of the vm to be deleted), nova calls ‘instance_destroy’ method in db/api which in turn calls ‘instance_destroy’ method in the sqlalchemy/api.py file.

Ref:
[1] https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py
[2] https://github.com/openstack/nova/blob/master/nova/db/api.py

Advertisements
Categories: openstack Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: