Title: [opsview] [10262] Attributes allowed to use numbers in the name
- Revision
- 10262
- Author
- tvoon
- Date
- 2012-10-02 18:42:48 +0100 (Tue, 02 Oct 2012)
Log Message
Attributes allowed to use numbers in the name
Modified Paths
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2012-10-02 17:01:48 UTC (rev 10261)
+++ trunk/CHANGES 2012-10-02 17:42:48 UTC (rev 10262)
@@ -3,6 +3,7 @@
??????
FEATURES:
ENHANCEMENTS:
+ Attributes are now allowed to use numbers in the name
NOTICES:
FIXES:
Fixed apache configuration for redundancy, specifically removing apache_proxy_ssl.conf and replacing with apache_ssl.conf
Modified: trunk/opsview-core/lib/Opsview/Schema/Attributes.pm
===================================================================
--- trunk/opsview-core/lib/Opsview/Schema/Attributes.pm 2012-10-02 17:01:48 UTC (rev 10261)
+++ trunk/opsview-core/lib/Opsview/Schema/Attributes.pm 2012-10-02 17:42:48 UTC (rev 10262)
@@ -250,7 +250,7 @@
required => [qw/name/],
optional => [qw/value/],
constraint_methods => {
- name => qr/^[A-Z_]{1,63}$/,
+ name => qr/^[A-Z0-9_]{1,63}$/,
value => qr/^[\w .\/-]{1,63}$/,
},
msgs => { format => "%s", },
Modified: trunk/opsview-core/t/946hostattributes.t
===================================================================
--- trunk/opsview-core/t/946hostattributes.t 2012-10-02 17:01:48 UTC (rev 10261)
+++ trunk/opsview-core/t/946hostattributes.t 2012-10-02 17:42:48 UTC (rev 10262)
@@ -43,7 +43,7 @@
is_deeply(
$validation,
{
- name => '/^[A-Z_]{1,63}$/',
+ name => '/^[A-Z0-9_]{1,63}$/',
value => '/^[\w ./-]{1,63}$/'
},
"Validation as expected"
@@ -68,3 +68,6 @@
eval { $rs->synchronise( { name => "NRPE_PORT", value => 'bad%char$again' } ) };
is( $@, "value: Invalid\n" );
+
+eval { $rs->synchronise( { name => "ORACLE_10G", value => 'valid' } ) };
+is( $@, "", "Allow numbers" );
_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins