Example #1
0
 def network_apply_cb(self, btn):
     # we need to do 2 steps to apply
     # a network configuration.
     # first write config to /etc/default/ovirt
     datautil.augtool_set(NIC_BOOTIF_PATH, self.dev_interface)
     # then 'actually' apply the configuration.
     datautil.conf_apply(btn)
     network = Network()
     network.configure_interface()
     network.save_network_configuration()
Example #2
0
 def network_apply_cb(self, btn):
     # we need to do 2 steps to apply
     # a network configuration.
     # first write config to /etc/default/ovirt
     datautil.augtool_set(NIC_BOOTIF_PATH, self.dev_interface)
     # then 'actually' apply the configuration.
     datautil.conf_apply(btn)
     network = Network()
     network.configure_interface()
     network.save_network_configuration()
Example #3
0
 def set_ssh_conf(self, path, _):
     try:
         from ocsetup import ocs
         ssh_btn = ocs.page_security.enable_ssh_CheckButton
         check_button_state = ssh_btn.get_active()
         current_state = augtool_get(path)
         if check_button_state is False:
             datautil.augtool_set(path, "no")
         else:
             datautil.augtool_set(path, "yes")
         if ((current_state == "no" and check_button_state is True) or
             (current_state != "no" and check_button_state is False)):
             # SSHD CONFIGURE CHANGED, RESTART.
             system_closefds("service sshd restart &>/dev/null")
     except Exception, e:
         print e
Example #4
0
 def set_ssh_conf(self, path, _):
     try:
         from ocsetup import ocs
         ssh_btn = ocs.page_security.enable_ssh_CheckButton
         check_button_state = ssh_btn.get_active()
         current_state = augtool_get(path)
         if check_button_state is False:
             datautil.augtool_set(path, "no")
         else:
             datautil.augtool_set(path, "yes")
         if ((current_state == "no" and check_button_state is True) or
                 (current_state != "no" and check_button_state is False)):
                 # SSHD CONFIGURE CHANGED, RESTART.
                 system_closefds("service sshd restart &>/dev/null")
     except Exception, e:
         print e