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

[OSSTEST PATCH 4/4] TestSupport: honour OSSTEST_PDU_MANUAL override env var



This takes effect on everything that uses selecthost().  The result is
that PDU operations are made manual.  This can be useful for testing
etc.

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

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 3700a8fe..1e7da676 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1059,6 +1059,12 @@ sub power_cycle_host_setup ($) {
            MethObjs => power_cycle_parse_method($ho, $spec),
         };
     }
+    if ($ENV{OSSTEST_PDU_MANUAL}) {
+       @approaches = ({
+            Name => 'manual-override',
+            MethObjs => power_cycle_parse_method($ho, 'manual'),
+        });
+    }
     $ho->{PowerApproaches} = \@approaches;
 }
 
-- 
2.20.1




 


Rackspace

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