Validate interger flavor properties

Change-Id: I1520b73ccae3c68afd2f310465c335c9b099ca43
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-10-02 18:36:50 +09:00
parent fd692c7b43
commit c8e10c89e7

View File

@@ -88,26 +88,32 @@ Puppet::Type.newtype(:nova_flavor) do
newproperty(:ram) do
desc 'Amount of RAM to use (in megabytes).'
newvalues(/\d+/)
end
newproperty(:disk) do
desc 'Amount of disk space (in gigabytes) to use for the root (/) partition.'
newvalues(/\d+/)
end
newproperty(:vcpus) do
desc 'Number of virtual CPUs to use.'
newvalues(/\d+/)
end
newproperty(:ephemeral) do
desc 'Amount of disk space (in gigabytes) to use for the ephemeral partition.'
newvalues(/\d+/)
end
newproperty(:swap) do
desc 'Amount of swap space (in megabytes) to use.'
newvalues(/\d+/)
end
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)'
newvalues(/\d+(\.\d+)?/)
end
newproperty(:is_public) do