enable to select a specific subnet in a net when creating a vm

Registered by Ihar Hrachyshka on 2014-01-09

Originally, this feature was requested against neutron project: https://blueprints.launchpad.net/neutron/+spec/selecting-subnet-when-creating-vm Investigation of its documentation and code shows that all the required functionality is already present both on neutron and neutronclient side.

What is missing is applying existing neutron functionality to horizon and nova codebases. This blueprint is for Nova.

More information can be found at the original neutron blueprint mentioned above.

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Undefined
Drafter:
Rui Chen
Direction:
Needs approval
Assignee:
Rui Chen
Definition:
Obsolete
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
wingwj on 2014-06-09
Completed by
Rui Chen on 2015-11-13

Related branches

Sprints

Whiteboard

The code used to invoke new instance and assign it to network can be found in: nova/network/neutronv2/api.py. Specifically, the following function is used to create a port for an instance: API._create_port(). It's passed the following argument, among other things: ":param fixed_ip: Optional fixed IP to use from the given network." It's a simple string representation of the desired IP address.

What we miss is passing specific subnet_id instead of fixed_ip to the function, and properly setting it for Neutron port POST request.
The code used to invoke new instance and assign it to network can be found in: nova/network/neutronv2/api.py. Specifically, the following function is used to create a port for an instance: API._create_port(). It's passed the following argument, among other things: ":param fixed_ip: Optional fixed IP to use from the given network." It's a simple string representation of the desired IP address.

What we miss is passing specific subnet_id instead of fixed_ip to the function, and properly setting it for Neutron port POST request.

If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

I'll submit the nova-spec in these days. --wingwj (4th Jun 2014)

Gerrit topic: https://review.openstack.org/#q,topic:bp/selecting-subnet-when-creating-vm,n,z

Addressed by: https://review.openstack.org/98741
    CreateVM supports subnet specified

You should not set a milestone target unless the blueprint has been properly prioritized by the project drivers.

Feature Proposal Freeze means this must not land in juno, because it appears like the code is not all currently ready to be reviewed. To be able to merge in kilo, we would first need to merge a kilo spec. More details on the exact process will be available on the ML shortly. --johnthetubaguy 22nd August 2014

Transfer it to kiwik. --wingwj 27th March 2015

Liberty spec: Addressed by: https://review.openstack.org/169638
    CreateVM supports subnet specified

The approver change to John, because Russell quit from nova core team. --RuiChen (20th April 2015)

Addressed by: https://review.openstack.org/182969
    CreateVM supports subnet specified

Addressed by: https://review.openstack.org/190474
    Dump microversion for bp selecting-subnet-when-creating-vm

Addressed by: https://review.openstack.org/190475
    Add subnet_id in NetworkRequest object

Addressed by: https://review.openstack.org/190476
    Support creating port with subnet_id in neutron api

Sorry, we are not longer accepting nova-specs or blueprints for liberty.
Please move your nova-spec into specs/backlog/approved/ so it is ready for the next release.
For more details, please see: https://wiki.openstack.org/wiki/Nova/Liberty_Release_Schedule
--johnthetubaguy 15th July 2015

Abandoned
out of nova scope:
http://docs.openstack.org/developer/nova/project_scope.html#no-more-api-proxies --RuiChen 2015-11-12

Addressed by: https://review.openstack.org/603344
    Move juno approved specs

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.