OpenStack builder: fix floating IP docs

Update website documentation about "floating_ip_network" parameter.
Add new inline comment about alghoritm that is used for checking
floatingIP-related configuration parameters.
This commit is contained in:
Andrei Ozerov 2018-08-17 07:55:31 +03:00
parent 103403db48
commit 6bf442f039
2 changed files with 8 additions and 3 deletions

View File

@ -43,7 +43,12 @@ func (s *StepAllocateIp) Run(_ context.Context, state multistep.StateBag) multis
// statebag below, because it is requested by Cleanup()
state.Put("access_ip", &instanceIP)
// WRITE NEW COMMENT>
// Try to Use the OpenStack floating IP by checking provided parameters in
// the following order:
// - try to use "FloatingIP" ID directly if it's provided
// - try to find free floating IP in the project if "ReuseIPs" is set
// - create a new floating IP if "FloatingIPNetwork" is provided (it can be
// ID or name of the network).
if s.FloatingIP != "" {
// Try to use FloatingIP if it was provided by the user.
freeFloatingIP, err := CheckFloatingIP(networkClient, s.FloatingIP)

View File

@ -112,8 +112,8 @@ builder.
- `floating_ip` (string) - A specific floating IP to assign to this instance.
- `floating_ip_network` (string) - The ID of an external network that can be
used for creation of a new floating IP.
- `floating_ip_network` (string) - The ID or name of an external network that
can be used for creation of a new floating IP.
- `floating_ip_pool` (string) - *Deprecated* use `floating_ip_network`
instead.