Fix deprecation warning by validate_legacy
Currently the swift::storage::node defined type shows the warning
message below, followed by huge call trace log, when zone parameter is
set by a string value.
~~~
Warning: validate_legacy(validate_re) expects an Integer value, got
String at ...
~~~
This change fixes usage of the validate_legacy function to avoid
that warning.
Change-Id: Ic9ca9fb952e4a678deeb1b8e04c09ba620b8ae20
(cherry picked from commit 4be2336843
)
This commit is contained in:
@@ -54,8 +54,10 @@ define swift::storage::node(
|
||||
|
||||
include swift::deps
|
||||
|
||||
validate_legacy(Integer, 'validate_re', $zone,
|
||||
['^\d+$', 'The zone parameter must be an integer'])
|
||||
if ! $zone =~ Integer {
|
||||
validate_legacy(Pattern[/^\d+$/], 'validate_re', $zone,
|
||||
['^\d+$', 'The zone parameter must be an integer'])
|
||||
}
|
||||
|
||||
Swift::Storage::Server {
|
||||
storage_local_net_ip => $storage_local_net_ip,
|
||||
|
Reference in New Issue
Block a user