* Renamed all Validate->is_X to Validate->X. Also created Validate->ipv6() to validate IPv6 addresses using Data::Validate::IP (and added it as a requirement to the .spec base RPM).
* Added the fix from the last commit for System->call to handle returned data without an ending newline to Remote->call.
* Got more work done on System->update_hosts(). It's able to add new hosts, but misses the short and FQDN host names. Need to fix that and the verify existing / manual entries aren't molested.
Signed-off-by: digimer <digimer@pulsar.alteeve.com>
is($anvil->Validate->is_ipv4({ip=>"0.0.0.0"}),"1","Verifying that 'Validate->is_ipv4' recognizes '0.0.0.0' as a valid IP address.");
is($anvil->Validate->is_ipv4({ip=>"255.255.255.255"}),"1","Verifying that 'Validate->is_ipv4' recognizes '255.255.255.255' as a valid IP address.");
is($anvil->Validate->is_ipv4({ip=>"256.255.255.255"}),"0","Verifying that 'Validate->is_ipv4' recognizes '256.255.255.255' as an invalid IP address.");
is($anvil->Validate->is_ipv4({ip=>"alteeve.com"}),"0","Verifying that 'Validate->is_ipv4' recognizes 'alteeve.com' as an invalid IP address.");
is($anvil->Validate->is_ipv4({ip=>"::1"}),"0","Verifying that 'Validate->is_ipv4' recognizes '::1' as an invalid IP address.");
is($anvil->Validate->ipv4({ip=>"0.0.0.0"}),"1","Verifying that 'Validate->ipv4' recognizes '0.0.0.0' as a valid IP address.");
is($anvil->Validate->ipv4({ip=>"255.255.255.255"}),"1","Verifying that 'Validate->ipv4' recognizes '255.255.255.255' as a valid IP address.");
is($anvil->Validate->ipv4({ip=>"256.255.255.255"}),"0","Verifying that 'Validate->ipv4' recognizes '256.255.255.255' as an invalid IP address.");
is($anvil->Validate->ipv4({ip=>"alteeve.com"}),"0","Verifying that 'Validate->ipv4' recognizes 'alteeve.com' as an invalid IP address.");
is($anvil->Validate->ipv4({ip=>"::1"}),"0","Verifying that 'Validate->ipv4' recognizes '::1' as an invalid IP address.");
my$test_uuid=$anvil->Get->uuid;
is($anvil->Validate->is_uuid({uuid=>$test_uuid}),"1","Verifying that 'Validate->is_uuid' recognized: [".$test_uuid."] as a valid UUID.");
is($anvil->Validate->uuid({uuid=>$test_uuid}),"1","Verifying that 'Validate->uuid' recognized: [".$test_uuid."] as a valid UUID.");
my$bad_uuid_1=$test_uuid;
$bad_uuid_1=~s/-//g;
is($anvil->Validate->is_uuid({uuid=>$bad_uuid_1}),"0","Verifying that 'Validate->is_uuid' recognized: [".$bad_uuid_1."] as an invalid UUID.");
is($anvil->Validate->uuid({uuid=>$bad_uuid_1}),"0","Verifying that 'Validate->uuid' recognized: [".$bad_uuid_1."] as an invalid UUID.");
my$bad_uuid_2=uc($test_uuid);
is($anvil->Validate->is_uuid({uuid=>$bad_uuid_2}),"0","Verifying that 'Validate->is_uuid' recognized: [".$bad_uuid_2."] as an invalid UUID.");
is($anvil->Validate->uuid({uuid=>$bad_uuid_2}),"0","Verifying that 'Validate->uuid' recognized: [".$bad_uuid_2."] as an invalid UUID.");
my$bad_uuid_3=$test_uuid."toolong";
is($anvil->Validate->is_uuid({uuid=>$bad_uuid_3}),"0","Verifying that 'Validate->is_uuid' recognized: [".$bad_uuid_3."] as an invalid UUID.");
is($anvil->Validate->uuid({uuid=>$bad_uuid_3}),"0","Verifying that 'Validate->uuid' recognized: [".$bad_uuid_3."] as an invalid UUID.");
@ -897,6 +897,7 @@ If the targets are unique, did you copy the full database directory? A unique id
<keyname="log_0478">The libvirtd' daemon isn't running. Will check for and remove virsh networks set to start on boot.</key>
<keyname="log_0479">Removing the symlink: [#!variable!symlink!#].</key>
<keyname="log_0480">Updating the cache state file.</key>
<keyname="log_0481">[ Note ] - The host: [#!variable!host!#] entry in /etc/hosts has changed IP from: [#!variable!old_ip!#] to: [#!variable!new_ip!#].</key>
<!-- Messages for users (less technical than log entries), though sometimes used for logs, too. -->
<keyname="message_0001">The host name: [#!variable!target!#] does not resolve to an IP address.</key>
@ -1155,6 +1156,16 @@ About to try to download aproximately: [#!variable!packages!#] packages needed t
<keyname="message_0174">Confirmed by switch, proceeding with purge of: [#!variable!host_name!#].</key>
</key><!-- Translation note: System->update_hosts() looks for '##] anvil-daemon [##' to know if this alert was added to /etc/hosts. As such, please retain that exact string in your translation.
<!-- Success messages shown to the user -->
<keyname="ok_0001">Saved the mail server information successfully!</key>
@ -1632,6 +1643,7 @@ Here we will inject 't_0006', which injects 't_0001' which has a variable: [#!st
<keyname="warning_0048">[ Warning ] - The password verification was not set.</key>
<keyname="warning_0049">[ Warning ] - The passwords do not match.</key>
<keyname="warning_0050">[ Warning ] - The host: [#!variable!host!#] now belongs to the #!string!brand_0006!#, it can't be used here anymore.</key>
<keyname="warning_0051">[ Warning ] - The IP address: [#!variable!ip!#] is not valid. Ignoring associated hosts: [#!variable!hosts!#].</key>