[openstack-dev] [Neutron] Extending database schema from 3rd-party plugin

Henry Gessau gessau at cisco.com
Wed May 13 12:10:54 UTC 2015


Note: I missed this email because Neutron was misspelled in the subject. I
have corrected it for this message.

On Tue, May 12, 2015, Alexey I. Froloff <raorn at raorn.name> wrote:
> I am developing ML2 type/mech plugin for some very special
> environment.  Because this environment is very special (using
> addressing based on physical hypervisor location), it will be
> separate package, I don't plan to alter Neutron code.  And this
> plugin needs to store some information in Neutron database.  Not
> altering existing tables, but adding couple.
> 
> I'm not very good with alembic (better say not good at all),
> maybe someone can enlight me, if this possible at all and how to
> make it with minimal damage.  I am writing this plugin for Kilo
> release, and this installation is supposed to be further updated
> to next OpenStack releases.

Alembic supports migration branches. The advanced services (FW/LB/VPNaaS) have
separate migration branches for their own tables. Unfortunately neutron's
alembic script is hard-coded to only support these three external services for
now. I hope to work on a more pluggable framework in the future.

For Kilo you could try to monkeypatch neutron's script to support your
plugin's migration. Or you can try to do something like the group-based-policy
project does, by consuming the neutron migration script[1]. (GBP also has its
own migration branch.)

Find me on IRC as HenryG and I will try to help you get more familiar with
alembic and neutron's migrations.

[1]
https://github.com/stackforge/group-based-policy/blob/master/gbpservice/neutron/db/migration/cli.py




More information about the OpenStack-dev mailing list