Test standalone quantum node

This commit is contained in:
vic 2013-03-22 12:47:12 +04:00
parent f972adcc57
commit 623d5b914f
2 changed files with 20 additions and 8 deletions

View File

@ -6,7 +6,7 @@ from fuel_test.settings import CREATE_SNAPSHOTS
class CompactTestCase(CobblerTestCase):
def deploy_compact(self, quantum=True, loopback=True):
def deploy_compact(self, quantum_node=True, loopback=True):
self.do(self.nodes().controllers[:1], 'puppet agent --test 2>&1')
self.do(self.nodes().controllers[1:], 'puppet agent --test 2>&1')
if loopback:
@ -14,7 +14,7 @@ class CompactTestCase(CobblerTestCase):
self.do(self.nodes().controllers[:1], 'puppet agent --test 2>&1')
self.do(self.nodes().controllers[1:], 'puppet agent --test 2>&1')
self.validate(self.nodes().controllers, 'puppet agent --test 2>&1')
if quantum:
if quantum_node:
self.validate(self.nodes().quantums, 'puppet agent --test 2>&1')
self.validate(self.nodes().computes, 'puppet agent --test 2>&1')
@ -26,7 +26,18 @@ class CompactTestCase(CobblerTestCase):
controllers=self.nodes().controllers,
quantums=self.nodes().quantums,
quantum=True)
self.deploy_compact()
self.deploy_compact(quantum_node=False)
if CREATE_SNAPSHOTS:
self.environment().snapshot('compact', force=True)
def test_deploy_compact_quantum_standalone(self):
Manifest().write_openstack_manifest(
remote=self.remote(),
template=Template.compact(), ci=self.ci(),
controllers=self.nodes().controllers,
quantums=self.nodes().quantums,
quantum=True, quantum_netnode_on_cnt=False)
self.deploy_compact(quantum_node=True)
if CREATE_SNAPSHOTS:
self.environment().snapshot('compact', force=True)
@ -37,7 +48,7 @@ class CompactTestCase(CobblerTestCase):
controllers=self.nodes().controllers,
quantums=self.nodes().quantums,
quantum=False)
self.deploy_compact(quantum=False)
self.deploy_compact(quantum_node=False)
if CREATE_SNAPSHOTS:
self.environment().snapshot('compact_wo_quantum', force=True)
@ -48,7 +59,7 @@ class CompactTestCase(CobblerTestCase):
controllers=self.nodes().controllers,
quantums=self.nodes().quantums,
quantum=False, loopback=False, use_syslog=False)
self.deploy_compact(quantum=False, loopback=False)
self.deploy_compact(quantum_node=False, loopback=False)
if CREATE_SNAPSHOTS:
self.environment().snapshot('compact_woloopback', force=True)

View File

@ -254,7 +254,7 @@ class Manifest(object):
def write_openstack_ha_minimal_manifest(self, remote, template, ci, controllers, quantums,
proxies=None, use_syslog=True,
quantum=True, loopback=True,
cinder=True, cinder_on_computes=False):
cinder=True, cinder_on_computes=False, quantum_netnode_on_cnt=True):
template.replace(
internal_virtual_ip=ci.internal_virtual_ip(),
public_virtual_ip=ci.public_virtual_ip(),
@ -282,7 +282,7 @@ class Manifest(object):
if is_not_essex():
template.replace(
quantum=quantum,
quantum_netnode_on_cnt=quantum,
quantum_netnode_on_cnt=quantum_netnode_on_cnt,
)
self.write_manifest(remote, template)
@ -291,7 +291,7 @@ class Manifest(object):
def write_openstack_manifest(self, remote, template, ci, controllers, quantums,
proxies=None, use_syslog=True,
quantum=True, loopback=True,
cinder=True, swift=True):
cinder=True, swift=True, quantum_netnode_on_cnt=True):
template.replace(
internal_virtual_ip=ci.internal_virtual_ip(),
public_virtual_ip=ci.public_virtual_ip(),
@ -321,6 +321,7 @@ class Manifest(object):
if is_not_essex():
template.replace(
quantum=quantum,
quantum_netnode_on_cnt=quantum_netnode_on_cnt,
)
self.write_manifest(remote, template)