def test_deploy_compact_wo_quantum_cinder_all_by_ipaddr(self): if ASTUTE_USE: config = Config().generate( template=Template.compact(), ci=self.ci(), nodes = self.nodes().controllers + self.nodes().computes, quantums=self.nodes().quantums, quantum=False, cinder=True, cinder_nodes=map( lambda x: x.get_ip_address_by_network_name('internal'), self.nodes().controllers + self.nodes().computes + self.nodes().storages),) self.deploy_by_astute(config) else: Manifest().generate_openstack_manifest( template=Template.compact(), ci=self.ci(), controllers=self.nodes().controllers, cinder=True, cinder_nodes=map( lambda x: x.get_ip_address_by_network_name('internal'), self.nodes().controllers + self.nodes().computes + self.nodes().storages), quantums=self.nodes().quantums, quantum=False,) self.deploy_compact(quantum_node=False)
def _add_node(self, client, token, cobbler, node_name, node_mac0, node_mac1, node_mac2, node_ip, stomp_name, gateway, net_mask): system_id = client.new_system(token) profile = CURRENT_PROFILE client.modify_system_args( system_id, token, ks_meta=Config().get_ks_meta('master.localdomain', stomp_name), name=node_name, hostname=node_name, name_servers=cobbler.get_ip_address_by_network_name('internal'), name_servers_search="localdomain", profile=profile, gateway=gateway, netboot_enabled="1") client.modify_system( system_id, 'modify_interface', { "macaddress-eth0": str(node_mac0), "static-eth0": "1", "macaddress-eth1": str(node_mac1), "ipaddress-eth1": str(node_ip), "netmask-eth1": str(net_mask), "dnsname-eth1": node_name + DOMAIN_NAME, "static-eth1": "1", "macaddress-eth2": str(node_mac2), "static-eth2": "1" }, token) client.save_system(system_id, token) client.sync(token)
def test_generate_full(self): print Config().generate(ci=self.ci(), nodes=self.nodes().controllers, template=Template.full(), quantums=self.nodes().quantums, swift=False, loopback=False, use_syslog=False, quantum=True)
def prepare_astute(self): config = Config().generate(template=Template.single(), ci=self.ci(), nodes=[self.ci().nodes().controllers[:1]], quantum=False) print "Generated config.yaml:", config config_path = "/root/config.yaml" write_config(self.remote(), config_path, str(config)) self.remote().check_call("cobbler_system -f %s" % config_path) self.remote().check_stderr( "openstack_system -c %s -o /etc/puppet/manifests/site.pp -a /root/astute.yaml" % config_path, True)
def prepare_astute(self): config = Config().generate(template=Template.minimal(), ci=self.ci(), nodes=self.nodes().controllers + self.nodes().computes, quantums=self.nodes().quantums, quantum=True, cinder_nodes=['controller']) print "Generated config.yaml:", config config_path = "/root/config.yaml" write_config(self.remote(), config_path, str(config)) self.remote().check_call("cobbler_system -f %s" % config_path) self.remote().check_stderr( "openstack_system -c %s -o /etc/puppet/manifests/site.pp -a /root/astute.yaml" % config_path, True)
def prepare_astute(self): config = Config().generate( ci=self.ci(), nodes=self.nodes(), template=Template.full(), quantums=self.nodes().quantums, swift=False, loopback=False, use_syslog=False, quantum=True ) print "Generated config.yaml:", config config_path = "/root/config.yaml" write_config(self.remote(), config_path, str(config)) self.remote().check_call("cobbler_system -f %s" % config_path) self.remote().check_stderr("openstack_system -c %s -o /etc/puppet/manifests/site.pp -a /root/astute.yaml" % config_path, True)
def test_deploy_compact_wo_quantum(self): if ASTUTE_USE: config = Config().generate( template=Template.compact(), ci=self.ci(), nodes = self.nodes().controllers, quantums=self.nodes().quantums, quantum=False, cinder_nodes=['controller']) self.deploy_by_astute(config) else: Manifest().generate_openstack_manifest( template=Template.compact(), ci=self.ci(), controllers=self.nodes().controllers, quantums=self.nodes().quantums, quantum=False, cinder_nodes=['controller']) self.deploy_compact(quantum_node=False)
def test_deploy_compact_quantum_standalone(self): if ASTUTE_USE: config = Config().generate( template=Template.compact(), ci=self.ci(), nodes = self.nodes().controllers, quantums=self.nodes().quantums, quantum=True, quantum_netnode_on_cnt=False, cinder_nodes=['controller']) self.deploy_by_astute(config) else: Manifest().generate_openstack_manifest( template=Template.compact(), ci=self.ci(), controllers=self.nodes().controllers, quantums=self.nodes().quantums, quantum=True, quantum_netnode_on_cnt=False, ha_provider=False, cinder_nodes=['controller']) self.deploy_compact(quantum_node=True)
def test_deploy_compact_wo_quantum_cinder_all(self): if ASTUTE_USE: config = Config().generate(template=Template.compact(), ci=self.ci(), nodes=self.nodes().controllers + self.nodes().computes, quantums=self.nodes().quantums, quantum=True, cinder=True, cinder_nodes=['all']) self.deploy_by_astute(config) else: manifest = Manifest().generate_openstack_manifest( template=Template.compact(), ci=self.ci(), controllers=self.nodes().controllers, cinder=True, cinder_nodes=['all'], quantums=self.nodes().quantums, quantum=False) self.deploy_compact(manifest=manifest, quantum_node=False)
def update_config_yaml(self): config = yaml.safe_dump(Config().generate(self.ci()), default_flow_style=False) write_config(self.remote(), "/root/config.yaml", config)
def test_generate_stomp(self): print Config().generate(ci=self.ci(), nodes=[self.nodes().computes[0]], template=Template.stomp())
def test_generate_simple(self): print Config().generate(ci=self.ci(), nodes=self.nodes().storages + self.nodes().proxies + [self.nodes().controllers[0]], template=Template.simple())