Validate interger flavor properties
Change-Id: I1520b73ccae3c68afd2f310465c335c9b099ca43 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -88,26 +88,32 @@ Puppet::Type.newtype(:nova_flavor) do
|
|||||||
|
|
||||||
newproperty(:ram) do
|
newproperty(:ram) do
|
||||||
desc 'Amount of RAM to use (in megabytes).'
|
desc 'Amount of RAM to use (in megabytes).'
|
||||||
|
newvalues(/\d+/)
|
||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:disk) do
|
newproperty(:disk) do
|
||||||
desc 'Amount of disk space (in gigabytes) to use for the root (/) partition.'
|
desc 'Amount of disk space (in gigabytes) to use for the root (/) partition.'
|
||||||
|
newvalues(/\d+/)
|
||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:vcpus) do
|
newproperty(:vcpus) do
|
||||||
desc 'Number of virtual CPUs to use.'
|
desc 'Number of virtual CPUs to use.'
|
||||||
|
newvalues(/\d+/)
|
||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:ephemeral) do
|
newproperty(:ephemeral) do
|
||||||
desc 'Amount of disk space (in gigabytes) to use for the ephemeral partition.'
|
desc 'Amount of disk space (in gigabytes) to use for the ephemeral partition.'
|
||||||
|
newvalues(/\d+/)
|
||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:swap) do
|
newproperty(:swap) do
|
||||||
desc 'Amount of swap space (in megabytes) to use.'
|
desc 'Amount of swap space (in megabytes) to use.'
|
||||||
|
newvalues(/\d+/)
|
||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:rxtx_factor) do
|
newproperty(:rxtx_factor) do
|
||||||
desc 'The slice of bandwidth that the instances with this flavor can use (through the Virtual Interface (vif) creation in the hypervisor)'
|
desc 'The slice of bandwidth that the instances with this flavor can use (through the Virtual Interface (vif) creation in the hypervisor)'
|
||||||
|
newvalues(/\d+(\.\d+)?/)
|
||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:is_public) do
|
newproperty(:is_public) do
|
||||||
|
Reference in New Issue
Block a user