Beispiel #1
0
 def enable_nm(self):
     logging.warning("====================================================")
     logging.warning("Enabling use of NetworkManager on controller request")
     logging.warning("====================================================")
     val = lnst_config.get_option("environment", "use_nm")
     lnst_config.set_option("environment", "use_nm", True)
     return val
Beispiel #2
0
 def disable_nm(self):
     logging.warning("=====================================================")
     logging.warning("Disabling use of NetworkManager on controller request")
     logging.warning("=====================================================")
     val = lnst_config.get_option("environment", "use_nm")
     lnst_config.set_option("environment", "use_nm", False)
     return val
Beispiel #3
0
 def restore_nm_option(self):
     val = lnst_config.get_option("environment", "use_nm")
     if val == self._bkp_nm_opt_val:
         return val
     logging.warning("=========================================")
     logging.warning("Restoring use_nm option to original value")
     logging.warning("=========================================")
     lnst_config.set_option("environment", "use_nm", self._bkp_nm_opt_val)
     return val
Beispiel #4
0
 def restore_nm_option(self):
     val = lnst_config.get_option("environment", "use_nm")
     if val == self._bkp_nm_opt_val:
         return val
     logging.warning("=========================================")
     logging.warning("Restoring use_nm option to original value")
     logging.warning("=========================================")
     lnst_config.set_option("environment", "use_nm", self._bkp_nm_opt_val)
     return val