Cisco nexus plugin port-binding table needs to be redesigned

Bug #1244777 reported by Baodong (Robert) Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-cisco
New
Undecided
Unassigned

Bug Description

In the current implementation, the table cisco_nexusport_bindings uses an automatically incremented field as its primary key.
cisco_nexusport_bindings:
    id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
    port_id = sa.Column(sa.String(255))
    vlan_id = sa.Column(sa.Integer, nullable=False)
    switch_ip = sa.Column(sa.String(255))
    instance_id = sa.Column(sa.String(255))

There should be one-to-one mapping between entries in the table and neutron ports. However, based on the above definition, such relationship is not properly maintained. Instead, neutron port id should be used as the table's primary key. Such change will improve the plugin design and code.

Tags: nexus cisco
Brian Bowen (brbowen)
tags: added: cisco
Changed in neutron:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Henry Gessau (gessau) wrote :

Also, the vlan_id should not be nullable.
See the review comments here:
https://review.openstack.org/#/c/55411/6/neutron/plugins/cisco/db/nexus_models_v2.py

no longer affects: neutron
Henry Gessau (gessau)
tags: added: nexus
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.