Remove nova network legacy code to enable ipv6-only vifs

Registered by Amir Sadoughi

nova.network.model.NetworkInfo.legacy converts an instance of NetworkInfo into a legacy version of NetworkInfo.

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
Medium
Drafter:
None
Direction:
Approved
Assignee:
Yaguang Tang
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon 2013.2
Started by
Russell Bryant
Completed by
Russell Bryant

Related branches

Sprints

Whiteboard

From bug 1044383, the following implementation still holds:

From running `grep -nH -R -e "legacy()" .` on the code base I have come up with an approach. Let me know if I have missed anything. My current plan of attack is as follows:

0. Make each of the compute drivers compatible with the current network model (non-legacy), pushing any legacy dependency into the firewall driver.
From my enumeration that means: i. baremetal.BareMetalDriver <bug 1112642> ii. libvirt.LibvirtDriver <bug 1112646>, and iii. vmwareapi.VMwareESXDriver <bug 1112655>.

1. Remove legacy_nwinfo from the nova.virt.driver.ComputeDriver base class. This involves minor code changes (test code and stub drivers) once the previous step is completed.

2. Fix the firewall driver to use the current network model. <bug 1112657>

3. Fix any other legacy-dependent code to use the current network model (e.g. nova.virt.netutils.get_injected_network_template) <bug 1112659>

4. Remove the legacy function from the network model.

---

Worth noting previous attempts at this for libvirt:

https://review.openstack.org/#/c/11923/ (tail end of Folsom)
https://review.openstack.org/#/c/21382/ (tail end of Grizzly)

Also, *if* the nova-network firewalling is to be removed in Havana then the job becomes a lot simpler as the virt drivers should no longer care about the addresses of ports. Perhaps someone could confirm if that's in the plan? -- ijw-ubuntu

if not any one working on this, I'd like to pick it up and get it in to Havana . --heut2008

I haven't had the time I expected to work on this blueprint in the Havana release cycle. I'm fine with heut2008 taking it over. --amir-sadoughi

Gerrit topic: https://review.openstack.org/#q,topic:bp/nova-network-legacy,n,z

Addressed by: https://review.openstack.org/38297
    Update BareMetal driver from legacy network to current nova.network.model.

Addressed by: https://review.openstack.org/38589
    Update libvirt driver to current nova.network.model.

Addressed by: https://review.openstack.org/38596
    Update nova.virt.firewall to use current nova.network.model.

Addressed by: https://review.openstack.org/38920
    Remove legacy network info model usage in unit tests

Addressed by: https://review.openstack.org/38922
    Remove deprecated legacy network info model in Hypervisor drivers

Gerrit topic: https://review.openstack.org/#q,topic:bug/1210203,n,z

Addressed by: https://review.openstack.org/41286
    Fix bug by passing correct number of arguments

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.