Пример #1
0
    def configure_cobbler(self, cobbler):
        client = CobblerClient(
            cobbler.get_ip_address_by_network_name('internal'))
        token = client.login('cobbler', 'cobbler')
        master = self.environment().node_by_name('master')
        for node in self.ci().client_nodes():
            self.add_node(
                client,
                token,
                cobbler,
                node,
                gateway=cobbler.get_ip_address_by_network_name('internal'),
                net_mask=self.ci().internal_net_mask())

        remote = master.remote('internal', login='******', password='******')
        add_to_hosts(remote, master.get_ip_address_by_network_name('internal'),
                     master.name, master.name + DOMAIN_NAME)

        self.environment().snapshot('cobbler-configured', force=True)
Пример #2
0
 def configure_cobbler(self):
     cobbler = self.ci().nodes().cobblers[0]
     client = CobblerClient(
         cobbler.get_ip_address_by_network_name('internal'))
     token = client.login('cobbler', 'cobbler')
     for node in self.ci().client_nodes():
         self.add_node(
             client, token, cobbler, node,
             gateway=self.ci().internal_router(),
             net_mask=self.ci().internal_net_mask()
         )
     master = self.environment().node_by_name('master')
     remote = master.remote('internal',
         login='******',
         password='******')
     add_to_hosts(
         remote,
         master.get_ip_address_by_network_name('internal'),
         master.name,
         master.name + ".your-domain-name.com")
     self.environment().snapshot('cobbler-configured', force=True)
Пример #3
0
 def add_nodes_to_hosts(self, remote, nodes):
     for node in nodes:
         add_to_hosts(remote,
             node.get_ip_address_by_network_name('internal'), node.name,
             node.name + '.localdomain')
Пример #4
0
 def add_nodes_to_hosts(self, remote, nodes):
     for node in nodes:
         add_to_hosts(remote,
                      node.get_ip_address_by_network_name('internal'),
                      node.name, node.name + '.localdomain')
Пример #5
0
 def add_nodes_to_hosts(self, remote, nodes):
     for node in nodes:
         add_to_hosts(
             remote, node.get_ip_address_by_network_name("internal"), node.name, node.name + ".your-domain-name.com"
         )