示例#1
0
            def commit(self):
                from ovirtnode import network as onet, ovirtfunctions
                network = onet.Network()

                if self.hostname:
                    network.remove_non_localhost()
                    network.add_localhost_alias(self.hostname)
                else:
                    network.remove_non_localhost()
                    self.hostname = "localhost.localdomain"

                config.network.hostname(self.hostname)

                ovirtfunctions.ovirt_store_config("/etc/sysconfig/network")
                ovirtfunctions.ovirt_store_config("/etc/hosts")

                utils.network.reset_resolver()
示例#2
0
 def commit(self):
     import ovirtnode.network as onet
     net = onet.Network()
     net.configure_ntp()
     net.save_ntp_configuration()
示例#3
0
            def commit(self):
                import ovirtnode.network as onet
                net = onet.Network()
                net.configure_dns()

                utils.network.reset_resolver()