[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 1/3] resource allocation: PropCompareBase: Break out _get_val



This is going to make defaulting etc. a bit easier.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CC: Roger Pau Monné <royger@xxxxxxxxxxx>
---
 Osstest/ResourceCondition/PropCompareBase.pm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Osstest/ResourceCondition/PropCompareBase.pm 
b/Osstest/ResourceCondition/PropCompareBase.pm
index 5306bb8..1e3aa85 100644
--- a/Osstest/ResourceCondition/PropCompareBase.pm
+++ b/Osstest/ResourceCondition/PropCompareBase.pm
@@ -44,7 +44,7 @@ sub new {
     }, $class;
 }
 
-sub check {
+sub _get_val ($$$) {
     my ($pc, $restype, $resname) = @_;
 
     # Using _cached avoids needing to worry about $dbh_tests being
@@ -57,9 +57,14 @@ END
 
     my $row= $hpropq->fetchrow_arrayref();
     $hpropq->finish();
+    
+    my $v = $row->[0];
+    return $v;
+}
 
-    my $propval = $row->[0];
-
+sub check {
+    my ($pc, $restype, $resname) = @_;
+    my $proval = $pc->_get_val($pc, $restype, $resname);
     return $pc->_check($propval);
 }
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.