teuthology 1.1.0__py3-none-any.whl → 1.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scripts/describe.py +1 -0
- scripts/dispatcher.py +55 -26
- scripts/exporter.py +18 -0
- scripts/lock.py +1 -1
- scripts/node_cleanup.py +58 -0
- scripts/openstack.py +9 -9
- scripts/results.py +12 -11
- scripts/schedule.py +4 -0
- scripts/suite.py +57 -16
- scripts/supervisor.py +44 -0
- scripts/update_inventory.py +10 -4
- teuthology/__init__.py +24 -26
- teuthology/beanstalk.py +4 -3
- teuthology/config.py +16 -6
- teuthology/contextutil.py +18 -14
- teuthology/describe_tests.py +25 -18
- teuthology/dispatcher/__init__.py +210 -35
- teuthology/dispatcher/supervisor.py +140 -58
- teuthology/exceptions.py +43 -0
- teuthology/exporter.py +347 -0
- teuthology/kill.py +76 -81
- teuthology/lock/cli.py +3 -3
- teuthology/lock/ops.py +135 -61
- teuthology/lock/query.py +61 -44
- teuthology/ls.py +1 -1
- teuthology/misc.py +61 -75
- teuthology/nuke/__init__.py +12 -353
- teuthology/openstack/__init__.py +4 -3
- teuthology/openstack/openstack-centos-7.0-user-data.txt +1 -1
- teuthology/openstack/openstack-centos-7.1-user-data.txt +1 -1
- teuthology/openstack/openstack-centos-7.2-user-data.txt +1 -1
- teuthology/openstack/openstack-debian-8.0-user-data.txt +1 -1
- teuthology/openstack/openstack-opensuse-42.1-user-data.txt +1 -1
- teuthology/openstack/openstack-teuthology.cron +0 -1
- teuthology/orchestra/cluster.py +49 -7
- teuthology/orchestra/connection.py +17 -4
- teuthology/orchestra/console.py +111 -50
- teuthology/orchestra/daemon/cephadmunit.py +15 -2
- teuthology/orchestra/daemon/state.py +8 -1
- teuthology/orchestra/daemon/systemd.py +4 -4
- teuthology/orchestra/opsys.py +30 -11
- teuthology/orchestra/remote.py +405 -338
- teuthology/orchestra/run.py +3 -3
- teuthology/packaging.py +19 -16
- teuthology/provision/__init__.py +30 -10
- teuthology/provision/cloud/openstack.py +12 -6
- teuthology/provision/cloud/util.py +1 -2
- teuthology/provision/downburst.py +4 -3
- teuthology/provision/fog.py +68 -20
- teuthology/provision/openstack.py +5 -4
- teuthology/provision/pelagos.py +1 -1
- teuthology/repo_utils.py +43 -13
- teuthology/report.py +57 -35
- teuthology/results.py +5 -3
- teuthology/run.py +13 -14
- teuthology/run_tasks.py +27 -43
- teuthology/schedule.py +4 -3
- teuthology/scrape.py +28 -22
- teuthology/suite/__init__.py +74 -45
- teuthology/suite/build_matrix.py +34 -24
- teuthology/suite/fragment-merge.lua +105 -0
- teuthology/suite/matrix.py +31 -2
- teuthology/suite/merge.py +175 -0
- teuthology/suite/placeholder.py +6 -9
- teuthology/suite/run.py +175 -100
- teuthology/suite/util.py +64 -218
- teuthology/task/__init__.py +1 -1
- teuthology/task/ansible.py +101 -32
- teuthology/task/buildpackages.py +2 -2
- teuthology/task/ceph_ansible.py +13 -6
- teuthology/task/cephmetrics.py +2 -1
- teuthology/task/clock.py +33 -14
- teuthology/task/exec.py +18 -0
- teuthology/task/hadoop.py +2 -2
- teuthology/task/install/__init__.py +29 -7
- teuthology/task/install/bin/adjust-ulimits +16 -0
- teuthology/task/install/bin/daemon-helper +114 -0
- teuthology/task/install/bin/stdin-killer +263 -0
- teuthology/task/install/deb.py +1 -1
- teuthology/task/install/rpm.py +17 -5
- teuthology/task/install/util.py +3 -3
- teuthology/task/internal/__init__.py +41 -10
- teuthology/task/internal/edit_sudoers.sh +10 -0
- teuthology/task/internal/lock_machines.py +2 -9
- teuthology/task/internal/redhat.py +31 -1
- teuthology/task/internal/syslog.py +31 -8
- teuthology/task/kernel.py +152 -145
- teuthology/task/lockfile.py +1 -1
- teuthology/task/mpi.py +10 -10
- teuthology/task/pcp.py +1 -1
- teuthology/task/selinux.py +16 -8
- teuthology/task/ssh_keys.py +4 -4
- teuthology/timer.py +3 -3
- teuthology/util/loggerfile.py +19 -0
- teuthology/util/scanner.py +159 -0
- teuthology/util/sentry.py +52 -0
- teuthology/util/time.py +52 -0
- teuthology-1.2.1.data/scripts/adjust-ulimits +16 -0
- teuthology-1.2.1.data/scripts/daemon-helper +114 -0
- teuthology-1.2.1.data/scripts/stdin-killer +263 -0
- teuthology-1.2.1.dist-info/METADATA +88 -0
- teuthology-1.2.1.dist-info/RECORD +168 -0
- {teuthology-1.1.0.dist-info → teuthology-1.2.1.dist-info}/WHEEL +1 -1
- {teuthology-1.1.0.dist-info → teuthology-1.2.1.dist-info}/entry_points.txt +3 -2
- scripts/nuke.py +0 -47
- scripts/worker.py +0 -37
- teuthology/lock/test/__init__.py +0 -0
- teuthology/lock/test/test_lock.py +0 -7
- teuthology/nuke/actions.py +0 -456
- teuthology/openstack/test/__init__.py +0 -0
- teuthology/openstack/test/openstack-integration.py +0 -286
- teuthology/openstack/test/test_config.py +0 -35
- teuthology/openstack/test/test_openstack.py +0 -1695
- teuthology/orchestra/test/__init__.py +0 -0
- teuthology/orchestra/test/integration/__init__.py +0 -0
- teuthology/orchestra/test/integration/test_integration.py +0 -94
- teuthology/orchestra/test/test_cluster.py +0 -240
- teuthology/orchestra/test/test_connection.py +0 -106
- teuthology/orchestra/test/test_console.py +0 -217
- teuthology/orchestra/test/test_opsys.py +0 -404
- teuthology/orchestra/test/test_remote.py +0 -185
- teuthology/orchestra/test/test_run.py +0 -286
- teuthology/orchestra/test/test_systemd.py +0 -54
- teuthology/orchestra/test/util.py +0 -12
- teuthology/task/tests/__init__.py +0 -110
- teuthology/task/tests/test_locking.py +0 -25
- teuthology/task/tests/test_run.py +0 -40
- teuthology/test/__init__.py +0 -0
- teuthology/test/fake_archive.py +0 -107
- teuthology/test/fake_fs.py +0 -92
- teuthology/test/integration/__init__.py +0 -0
- teuthology/test/integration/test_suite.py +0 -86
- teuthology/test/task/__init__.py +0 -205
- teuthology/test/task/test_ansible.py +0 -624
- teuthology/test/task/test_ceph_ansible.py +0 -176
- teuthology/test/task/test_console_log.py +0 -88
- teuthology/test/task/test_install.py +0 -337
- teuthology/test/task/test_internal.py +0 -57
- teuthology/test/task/test_kernel.py +0 -243
- teuthology/test/task/test_pcp.py +0 -379
- teuthology/test/task/test_selinux.py +0 -35
- teuthology/test/test_config.py +0 -189
- teuthology/test/test_contextutil.py +0 -68
- teuthology/test/test_describe_tests.py +0 -316
- teuthology/test/test_email_sleep_before_teardown.py +0 -81
- teuthology/test/test_exit.py +0 -97
- teuthology/test/test_get_distro.py +0 -47
- teuthology/test/test_get_distro_version.py +0 -47
- teuthology/test/test_get_multi_machine_types.py +0 -27
- teuthology/test/test_job_status.py +0 -60
- teuthology/test/test_ls.py +0 -48
- teuthology/test/test_misc.py +0 -391
- teuthology/test/test_nuke.py +0 -290
- teuthology/test/test_packaging.py +0 -763
- teuthology/test/test_parallel.py +0 -28
- teuthology/test/test_repo_utils.py +0 -225
- teuthology/test/test_report.py +0 -77
- teuthology/test/test_results.py +0 -155
- teuthology/test/test_run.py +0 -239
- teuthology/test/test_safepath.py +0 -55
- teuthology/test/test_schedule.py +0 -45
- teuthology/test/test_scrape.py +0 -167
- teuthology/test/test_timer.py +0 -80
- teuthology/test/test_vps_os_vers_parameter_checking.py +0 -84
- teuthology/test/test_worker.py +0 -303
- teuthology/worker.py +0 -354
- teuthology-1.1.0.dist-info/METADATA +0 -76
- teuthology-1.1.0.dist-info/RECORD +0 -213
- {teuthology-1.1.0.dist-info → teuthology-1.2.1.dist-info}/LICENSE +0 -0
- {teuthology-1.1.0.dist-info → teuthology-1.2.1.dist-info}/top_level.txt +0 -0
@@ -1,286 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2015, 2016 Red Hat, Inc.
|
3
|
-
#
|
4
|
-
# Author: Loic Dachary <loic@dachary.org>
|
5
|
-
#
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
# of this software and associated documentation files (the "Software"), to deal
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
11
|
-
# furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
23
|
-
#
|
24
|
-
import argparse
|
25
|
-
import logging
|
26
|
-
import json
|
27
|
-
import os
|
28
|
-
import subprocess
|
29
|
-
import tempfile
|
30
|
-
import shutil
|
31
|
-
|
32
|
-
import teuthology.lock
|
33
|
-
import teuthology.lock.cli
|
34
|
-
import teuthology.lock.query
|
35
|
-
import teuthology.lock.util
|
36
|
-
import teuthology.nuke
|
37
|
-
import teuthology.misc
|
38
|
-
import teuthology.schedule
|
39
|
-
import teuthology.suite
|
40
|
-
import teuthology.openstack
|
41
|
-
import scripts.schedule
|
42
|
-
import scripts.lock
|
43
|
-
import scripts.suite
|
44
|
-
from teuthology.config import config as teuth_config
|
45
|
-
from teuthology.config import set_config_attr
|
46
|
-
|
47
|
-
|
48
|
-
class Integration(object):
|
49
|
-
|
50
|
-
@classmethod
|
51
|
-
def setup_class(self):
|
52
|
-
teuthology.log.setLevel(logging.DEBUG)
|
53
|
-
set_config_attr(argparse.Namespace())
|
54
|
-
self.teardown_class()
|
55
|
-
|
56
|
-
@classmethod
|
57
|
-
def teardown_class(self):
|
58
|
-
os.system("sudo /etc/init.d/beanstalkd restart")
|
59
|
-
# if this fails it will not show the error but some weird
|
60
|
-
# INTERNALERROR> IndexError: list index out of range
|
61
|
-
# move that to def tearDown for debug and when it works move it
|
62
|
-
# back in tearDownClass so it is not called on every test
|
63
|
-
ownedby = "ownedby='" + teuth_config.openstack['ip']
|
64
|
-
all_instances = teuthology.openstack.OpenStack().run(
|
65
|
-
"server list -f json --long")
|
66
|
-
for instance in json.loads(all_instances):
|
67
|
-
if ownedby in instance['Properties']:
|
68
|
-
teuthology.openstack.OpenStack().run(
|
69
|
-
"server delete --wait " + instance['ID'])
|
70
|
-
|
71
|
-
def setup_worker(self):
|
72
|
-
self.logs = self.d + "/log"
|
73
|
-
os.mkdir(self.logs, 0o755)
|
74
|
-
self.archive = self.d + "/archive"
|
75
|
-
os.mkdir(self.archive, 0o755)
|
76
|
-
self.worker_cmd = ("teuthology-worker --tube openstack " +
|
77
|
-
"-l " + self.logs + " "
|
78
|
-
"--archive-dir " + self.archive + " ")
|
79
|
-
logging.info(self.worker_cmd)
|
80
|
-
self.worker = subprocess.Popen(self.worker_cmd,
|
81
|
-
stdout=subprocess.PIPE,
|
82
|
-
stderr=subprocess.PIPE,
|
83
|
-
shell=True)
|
84
|
-
|
85
|
-
def wait_worker(self):
|
86
|
-
if not self.worker:
|
87
|
-
return
|
88
|
-
|
89
|
-
(stdoutdata, stderrdata) = self.worker.communicate()
|
90
|
-
stdoutdata = stdoutdata.decode('utf-8')
|
91
|
-
stderrdata = stderrdata.decode('utf-8')
|
92
|
-
logging.info(self.worker_cmd + ":" +
|
93
|
-
" stdout " + stdoutdata +
|
94
|
-
" stderr " + stderrdata + " end ")
|
95
|
-
assert self.worker.returncode == 0
|
96
|
-
self.worker = None
|
97
|
-
|
98
|
-
def get_teuthology_log(self):
|
99
|
-
# the archive is removed before each test, there must
|
100
|
-
# be only one run and one job
|
101
|
-
run = os.listdir(self.archive)[0]
|
102
|
-
job = os.listdir(os.path.join(self.archive, run))[0]
|
103
|
-
path = os.path.join(self.archive, run, job, 'teuthology.log')
|
104
|
-
return open(path, 'r').read()
|
105
|
-
|
106
|
-
class TestSuite(Integration):
|
107
|
-
|
108
|
-
def setup(self):
|
109
|
-
self.d = tempfile.mkdtemp()
|
110
|
-
self.setup_worker()
|
111
|
-
logging.info("TestSuite: done worker")
|
112
|
-
|
113
|
-
def teardown(self):
|
114
|
-
self.wait_worker()
|
115
|
-
shutil.rmtree(self.d)
|
116
|
-
|
117
|
-
def test_suite_noop(self):
|
118
|
-
cwd = os.getcwd()
|
119
|
-
os.mkdir(self.d + '/upload', 0o755)
|
120
|
-
upload = 'localhost:' + self.d + '/upload'
|
121
|
-
args = ['--suite', 'noop',
|
122
|
-
'--suite-dir', cwd + '/teuthology/openstack/test',
|
123
|
-
'--machine-type', 'openstack',
|
124
|
-
'--archive-upload', upload,
|
125
|
-
'--verbose']
|
126
|
-
logging.info("TestSuite:test_suite_noop")
|
127
|
-
scripts.suite.main(args)
|
128
|
-
self.wait_worker()
|
129
|
-
log = self.get_teuthology_log()
|
130
|
-
assert "teuthology.run:pass" in log
|
131
|
-
assert "Well done" in log
|
132
|
-
upload_key = teuth_config.archive_upload_key
|
133
|
-
if upload_key:
|
134
|
-
ssh = "RSYNC_RSH='ssh -i " + upload_key + "'"
|
135
|
-
else:
|
136
|
-
ssh = ''
|
137
|
-
assert 'teuthology.log' in teuthology.misc.sh(ssh + " rsync -av " + upload)
|
138
|
-
|
139
|
-
def test_suite_nuke(self):
|
140
|
-
cwd = os.getcwd()
|
141
|
-
args = ['--suite', 'nuke',
|
142
|
-
'--suite-dir', cwd + '/teuthology/openstack/test',
|
143
|
-
'--machine-type', 'openstack',
|
144
|
-
'--verbose']
|
145
|
-
logging.info("TestSuite:test_suite_nuke")
|
146
|
-
scripts.suite.main(args)
|
147
|
-
self.wait_worker()
|
148
|
-
log = self.get_teuthology_log()
|
149
|
-
assert "teuthology.run:FAIL" in log
|
150
|
-
locks = teuthology.lock.query.list_locks(locked=True)
|
151
|
-
assert len(locks) == 0
|
152
|
-
|
153
|
-
class TestSchedule(Integration):
|
154
|
-
|
155
|
-
def setup(self):
|
156
|
-
self.d = tempfile.mkdtemp()
|
157
|
-
self.setup_worker()
|
158
|
-
|
159
|
-
def teardown(self):
|
160
|
-
self.wait_worker()
|
161
|
-
shutil.rmtree(self.d)
|
162
|
-
|
163
|
-
def test_schedule_stop_worker(self):
|
164
|
-
job = 'teuthology/openstack/test/stop_worker.yaml'
|
165
|
-
args = ['--name', 'fake',
|
166
|
-
'--verbose',
|
167
|
-
'--owner', 'test@test.com',
|
168
|
-
'--worker', 'openstack',
|
169
|
-
job]
|
170
|
-
scripts.schedule.main(args)
|
171
|
-
self.wait_worker()
|
172
|
-
|
173
|
-
def test_schedule_noop(self):
|
174
|
-
job = 'teuthology/openstack/test/noop.yaml'
|
175
|
-
args = ['--name', 'fake',
|
176
|
-
'--verbose',
|
177
|
-
'--owner', 'test@test.com',
|
178
|
-
'--worker', 'openstack',
|
179
|
-
job]
|
180
|
-
scripts.schedule.main(args)
|
181
|
-
self.wait_worker()
|
182
|
-
log = self.get_teuthology_log()
|
183
|
-
assert "teuthology.run:pass" in log
|
184
|
-
assert "Well done" in log
|
185
|
-
|
186
|
-
def test_schedule_resources_hint(self):
|
187
|
-
"""It is tricky to test resources hint in a provider agnostic way. The
|
188
|
-
best way seems to ask for at least 1GB of RAM and 10GB
|
189
|
-
disk. Some providers do not offer a 1GB RAM flavor (OVH for
|
190
|
-
instance) and the 2GB RAM will be chosen instead. It however
|
191
|
-
seems unlikely that a 4GB RAM will be chosen because it would
|
192
|
-
mean such a provider has nothing under that limit and it's a
|
193
|
-
little too high.
|
194
|
-
|
195
|
-
Since the default when installing is to ask for 7000 MB, we
|
196
|
-
can reasonably assume that the hint has been taken into
|
197
|
-
account if the instance has less than 4GB RAM.
|
198
|
-
"""
|
199
|
-
try:
|
200
|
-
teuthology.openstack.OpenStack().run("volume list")
|
201
|
-
job = 'teuthology/openstack/test/resources_hint.yaml'
|
202
|
-
has_cinder = True
|
203
|
-
except subprocess.CalledProcessError:
|
204
|
-
job = 'teuthology/openstack/test/resources_hint_no_cinder.yaml'
|
205
|
-
has_cinder = False
|
206
|
-
args = ['--name', 'fake',
|
207
|
-
'--verbose',
|
208
|
-
'--owner', 'test@test.com',
|
209
|
-
'--worker', 'openstack',
|
210
|
-
job]
|
211
|
-
scripts.schedule.main(args)
|
212
|
-
self.wait_worker()
|
213
|
-
log = self.get_teuthology_log()
|
214
|
-
assert "teuthology.run:pass" in log
|
215
|
-
assert "RAM size ok" in log
|
216
|
-
if has_cinder:
|
217
|
-
assert "Disk size ok" in log
|
218
|
-
|
219
|
-
class TestLock(Integration):
|
220
|
-
|
221
|
-
def setup(self):
|
222
|
-
self.options = ['--verbose',
|
223
|
-
'--machine-type', 'openstack' ]
|
224
|
-
|
225
|
-
def test_main(self):
|
226
|
-
args = scripts.lock.parse_args(self.options + ['--lock'])
|
227
|
-
assert teuthology.lock.cli.main(args) == 0
|
228
|
-
|
229
|
-
def test_lock_unlock(self):
|
230
|
-
default_archs = teuthology.openstack.OpenStack().get_available_archs()
|
231
|
-
if 'TEST_IMAGES' in os.environ:
|
232
|
-
images = os.environ['TEST_IMAGES'].split()
|
233
|
-
else:
|
234
|
-
images = teuthology.openstack.OpenStack.image2url.keys()
|
235
|
-
for image in images:
|
236
|
-
(os_type, os_version, arch) = image.split('-')
|
237
|
-
if arch not in default_archs:
|
238
|
-
logging.info("skipping " + image + " because arch " +
|
239
|
-
" is not supported (" + str(default_archs) + ")")
|
240
|
-
continue
|
241
|
-
args = scripts.lock.parse_args(self.options +
|
242
|
-
['--lock-many', '1',
|
243
|
-
'--os-type', os_type,
|
244
|
-
'--os-version', os_version,
|
245
|
-
'--arch', arch])
|
246
|
-
assert teuthology.lock.cli.main(args) == 0
|
247
|
-
locks = teuthology.lock.query.list_locks(locked=True)
|
248
|
-
assert len(locks) == 1
|
249
|
-
args = scripts.lock.parse_args(self.options +
|
250
|
-
['--unlock', locks[0]['name']])
|
251
|
-
assert teuthology.lock.cli.main(args) == 0
|
252
|
-
|
253
|
-
def test_list(self, capsys):
|
254
|
-
args = scripts.lock.parse_args(self.options + ['--list', '--all'])
|
255
|
-
teuthology.lock.cli.main(args)
|
256
|
-
out, err = capsys.readouterr()
|
257
|
-
assert 'machine_type' in out
|
258
|
-
assert 'openstack' in out
|
259
|
-
|
260
|
-
class TestNuke(Integration):
|
261
|
-
|
262
|
-
def setup(self):
|
263
|
-
self.options = ['--verbose',
|
264
|
-
'--machine-type', 'openstack']
|
265
|
-
|
266
|
-
def test_nuke(self):
|
267
|
-
image = next(iter(teuthology.openstack.OpenStack.image2url.keys()))
|
268
|
-
|
269
|
-
(os_type, os_version, arch) = image.split('-')
|
270
|
-
args = scripts.lock.parse_args(self.options +
|
271
|
-
['--lock-many', '1',
|
272
|
-
'--os-type', os_type,
|
273
|
-
'--os-version', os_version])
|
274
|
-
assert teuthology.lock.cli.main(args) == 0
|
275
|
-
locks = teuthology.lock.query.list_locks(locked=True)
|
276
|
-
logging.info('list_locks = ' + str(locks))
|
277
|
-
assert len(locks) == 1
|
278
|
-
ctx = argparse.Namespace(name=None,
|
279
|
-
config={
|
280
|
-
'targets': { locks[0]['name']: None },
|
281
|
-
},
|
282
|
-
owner=locks[0]['locked_by'],
|
283
|
-
teuthology_config={})
|
284
|
-
teuthology.nuke.nuke(ctx, should_unlock=True)
|
285
|
-
locks = teuthology.lock.query.list_locks(locked=True)
|
286
|
-
assert len(locks) == 0
|
@@ -1,35 +0,0 @@
|
|
1
|
-
from teuthology.config import config
|
2
|
-
|
3
|
-
|
4
|
-
class TestOpenStack(object):
|
5
|
-
|
6
|
-
def setup(self):
|
7
|
-
self.openstack_config = config['openstack']
|
8
|
-
|
9
|
-
def test_config_clone(self):
|
10
|
-
assert 'clone' in self.openstack_config
|
11
|
-
|
12
|
-
def test_config_user_data(self):
|
13
|
-
os_type = 'rhel'
|
14
|
-
os_version = '7.0'
|
15
|
-
template_path = self.openstack_config['user-data'].format(
|
16
|
-
os_type=os_type,
|
17
|
-
os_version=os_version)
|
18
|
-
assert os_type in template_path
|
19
|
-
assert os_version in template_path
|
20
|
-
|
21
|
-
def test_config_ip(self):
|
22
|
-
assert 'ip' in self.openstack_config
|
23
|
-
|
24
|
-
def test_config_machine(self):
|
25
|
-
assert 'machine' in self.openstack_config
|
26
|
-
machine_config = self.openstack_config['machine']
|
27
|
-
assert 'disk' in machine_config
|
28
|
-
assert 'ram' in machine_config
|
29
|
-
assert 'cpus' in machine_config
|
30
|
-
|
31
|
-
def test_config_volumes(self):
|
32
|
-
assert 'volumes' in self.openstack_config
|
33
|
-
volumes_config = self.openstack_config['volumes']
|
34
|
-
assert 'count' in volumes_config
|
35
|
-
assert 'size' in volumes_config
|