Add ability to set floating IP Pool names

- Defaults to 'nova'
  - Allows user to create multiple pools outside
    of the 'nova::manage::floating' definition.

Change-Id: Ia0482cf24a7d9b9589e9b401879268f40e397be3
This commit is contained in:
Aimon Bustardo
2014-08-26 15:54:53 -07:00
parent d7d36abb97
commit 08e37e94c8
2 changed files with 7 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ Puppet::Type.type(:nova_floating).provide(:nova_manage) do
end
def create
nova_manage("floating", "create", resource[:network])
nova_manage("floating", "create", '--pool', resource[:pool], resource[:network])
end
def destroy

View File

@@ -9,4 +9,10 @@ Puppet::Type.newtype(:nova_floating) do
newvalues(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\/[0-9]{1,2}$/)
end
newparam(:pool) do
desc "Floating IP pool name. Default: 'nova'"
defaultto :nova
newvalues(/^.{1,255}$/)
end
end