Project

General

Profile

Actions

Feature #25553

closed

Neutron fixed ip support

Added by Petr Benas over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - OpenStack
Target version:
-
Difficulty:
trivial
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When deploying a host on OpenStack with Neutron based networking, it's only possible to select networks. It would be nice to be able to specify a fixed IP as well.

fog-openstack has support for specifying a fixed address already: https://github.com/fog/fog-openstack/blob/master/lib/fog/openstack/compute/requests/create_server.rb#L50
It's not possible to use this feature right away because Foreman only expects the network ID and constructs the nic hash for fog itself https://github.com/theforeman/foreman/blob/develop/app/models/compute_resources/foreman/model/openstack.rb#L136

A simple backward-compatible change of the line 136 would allow user to post the whole nic hash to /api/hosts when deploying the host.

nics.map {|nic| nic.is_a?(String) ? { 'net_id' => nic } : nic }

I will create a pull request, filing this issue just to have the bug #.

Actions #1

Updated by Petr Benas over 5 years ago

s/nics.map/args[:nics].map!/

Actions #2

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6282 added
Actions #3

Updated by Lukas Zapletal over 5 years ago

  • Triaged changed from No to Yes

Ahoj Petře, thanks for the patch.

Actions #4

Updated by Tomer Brisker over 5 years ago

  • Fixed in Releases 1.21.0 added
Actions #5

Updated by Petr Benas over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF