Implements use of yaml.safe_load as per sec audit
[releng.git] / utils / lab-reconfiguration / reconfigUcsNet.py
index ac7376e..4c08f3d 100755 (executable)
@@ -157,7 +157,7 @@ def read_yaml_file(yamlFile):
     """
     # TODO: add check if vnic templates specified in file exist on UCS
     with open(yamlFile, 'r') as stream:
-        return yaml.load(stream)
+        return yaml.safe_load(stream)
 
 
 def set_network(handle=None, yamlFile=None):
@@ -187,6 +187,8 @@ def set_network(handle=None, yamlFile=None):
 
 
 if __name__ == "__main__":
+    print "\n*** SKIPING RECONFIGURATION.***\n"
+    sys.exit(0)
     # Latest urllib2 validate certs by default
     # The process wide "revert to the old behaviour" hook is to monkeypatch the ssl module
     # https://bugs.python.org/issue22417