This change allows tests to specify DBUsername/DBPassword if necessary.
The keyname is still looked up in nova and the distribution is retrieved
from the already existing Stack parameter.
Change-Id: I3732ffb685d68c8a72a83247f74ed11a50a74cd1
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
import nose
from nose.plugins.attrib import attr
import unittest
+import os
@attr(speed='slow')
def setUp(self):
template = 'WordPress_Composed_Instances.template'
- self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools')
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
+
+ self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools',
+ stack_paramstr)
self.WebServer = util.Instance('WebServer')
self.WebServer.check_cfntools()
import nose
from nose.plugins.attrib import attr
import unittest
+import os
@attr(speed='slow')
def setUp(self):
template = 'WordPress_Single_Instance.template'
- self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools')
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
+
+ self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools',
+ stack_paramstr)
self.WikiDatabase = util.Instance('WikiDatabase')
self.WikiDatabase.check_cfntools()
self.WikiDatabase.wait_for_provisioning()
import nose
from nose.plugins.attrib import attr
import unittest
+import os
@attr(speed='slow')
def setUp(self):
template = 'WordPress_Single_Instance.template'
- self.stack = util.StackBoto(template, 'F17', 'x86_64', 'cfntools')
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
+
+ self.stack = util.StackBoto(template, 'F17', 'x86_64', 'cfntools',
+ stack_paramstr)
self.WikiDatabase = util.Instance('WikiDatabase')
self.WikiDatabase.check_cfntools()
self.WikiDatabase.wait_for_provisioning()
from heat.common import context
from heat.engine import manager
import unittest
+import os
@attr(speed='slow')
def setUp(self):
template = 'WordPress_Single_Instance_With_EBS.template'
- self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools')
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
+
+ self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools',
+ stack_paramstr)
self.WikiDatabase = util.Instance('WikiDatabase')
self.WikiDatabase.check_cfntools()
self.WikiDatabase.wait_for_provisioning()
from heat.common import context
from heat.engine import manager
import unittest
+import os
@attr(speed='slow')
def setUp(self):
template = 'WordPress_Single_Instance_With_EBS_EIP.template'
- self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools')
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
+
+ self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools',
+ stack_paramstr)
self.WikiDatabase = util.Instance('WikiDatabase')
self.WikiDatabase.check_cfntools()
self.WikiDatabase.wait_for_provisioning()
from heat.common import context
from heat.engine import manager
import unittest
+import os
@attr(speed='slow')
def setUp(self):
template = 'WordPress_Single_Instance_With_EIP.template'
- self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools')
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
+
+ self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools',
+ stack_paramstr)
self.WikiDatabase = util.Instance('WikiDatabase')
self.WikiDatabase.check_cfntools()
self.WikiDatabase.wait_for_provisioning()
import nose
from nose.plugins.attrib import attr
import unittest
+import os
@attr(speed='slow')
def setUp(self):
template = 'WordPress_Single_Instance_With_HA.template'
- self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools')
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
+
+ self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools',
+ stack_paramstr)
self.WikiDatabase = util.Instance('WikiDatabase')
self.WikiDatabase.check_cfntools()
self.WikiDatabase.wait_for_provisioning()
import nose
from nose.plugins.attrib import attr
import unittest
+import os
@attr(speed='slow')
def setUp(self):
template = 'WordPress_With_LB.template'
- self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools')
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
+
+ self.stack = util.Stack(template, 'F17', 'x86_64', 'cfntools',
+ stack_paramstr)
self.WikiServerOne = util.Instance('WikiServerOne')
self.LBInstance = util.Instance('LB_instance')
class WordPressRDSFunctionalTest(unittest.TestCase):
def setUp(self):
template = 'WordPress_With_RDS.template'
+ stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
+ 'DBUsername=dbuser',
+ 'DBPassword=' + os.environ['OS_PASSWORD']])
self.func_utils = util.FuncUtils()
class Stack(object):
- def __init__(self, template_file, distribution, arch, jeos_type):
+ def __init__(self, template_file, distribution, arch, jeos_type,
+ stack_paramstr):
self.prepare_jeos(distribution, arch, jeos_type)
assert self.heatclient
- # Dummy up the optparse.Values we get from CLI args in bin/heat
- stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
- 'DBUsername=' + self.dbusername,
- 'DBPassword=' + os.environ['OS_PASSWORD'],
- 'KeyName=' + keyname,
+ full_paramstr = stack_paramstr + ';' + ';'.join(['KeyName=' + keyname,
'LinuxDistribution=' + distribution])
- template_params = optparse.Values({'parameters': stack_paramstr})
+ template_params = optparse.Values({'parameters': full_paramstr})
# Format parameters and create the stack
parameters = {}
Version of the Stack class which uses the boto client (hence AWS auth and
the CFN API).
'''
- def __init__(self, template_file, distribution, arch, jeos_type):
+ def __init__(self, template_file, distribution, arch, jeos_type,
+ stack_paramstr):
self.prepare_jeos(distribution, arch, jeos_type)
assert self.heatclient
- # Dummy up the optparse.Values we get from CLI args in bin/heat
- stack_paramstr = ';'.join(['InstanceType=m1.xlarge',
- 'DBUsername=' + self.dbusername,
- 'DBPassword=' + os.environ['OS_PASSWORD'],
- 'KeyName=' + keyname,
+ full_paramstr = stack_paramstr + ';' + ';'.join(['KeyName=' + keyname,
'LinuxDistribution=' + distribution])
- template_params = optparse.Values({'parameters': stack_paramstr})
+ template_params = optparse.Values({'parameters': full_paramstr})
# Format parameters and create the stack
parameters = {}