From: Ian Jackson Date: Mon, 10 Apr 2017 15:29:52 +0000 (+0000) Subject: selecthost: Honour IDENT_hostflagadjust runvar X-Git-Tag: openstack-v11~92 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8a569f7975055da913e2851a19c98d2e0e56a62b;p=people%2Faperard%2Fosstest.git selecthost: Honour IDENT_hostflagadjust runvar This allows runvars to override hostflags from the resource database or configuration. Signed-off-by: Ian Jackson --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index fb62dfbb..2b4a1f4d 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;