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

[Xen-devel] [PATCH 2/8] selecthost: Honour IDENT_hostflagadjust runvar



This allows runvars to override hostflags from the resource database
or configuration.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/TestSupport.pm |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index a498ddd..88b0a65 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -966,6 +966,14 @@ sub selecthost ($) {
 
     $ho->{Flags} = $mhostdb->get_flags($ho);
 
+    foreach my $adj (split /,/, ($r{"${ident}_hostflagadjust"} // '')) {
+       if ($adj =~ s/^!//) {
+           delete $ho->{Flags}{$adj};
+       } else {
+           $ho->{Flags}{$adj} = 1;
+       }
+    }
+
     #----- fqdn -----
 
     my $defaultfqdn = $name;
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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