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)
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)
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')
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" )