From c8e10c89e7eddd307170a6d245d8dc01742d38c9 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 2 Oct 2025 18:36:50 +0900 Subject: [PATCH] Validate interger flavor properties Change-Id: I1520b73ccae3c68afd2f310465c335c9b099ca43 Signed-off-by: Takashi Kajinami --- lib/puppet/type/nova_flavor.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/puppet/type/nova_flavor.rb b/lib/puppet/type/nova_flavor.rb index 42bfb5592..1684e62e9 100644 --- a/lib/puppet/type/nova_flavor.rb +++ b/lib/puppet/type/nova_flavor.rb @@ -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