summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpyros Trigazis <strigazi@gmail.com>2016-07-06 11:01:14 +0200
committerSpyros Trigazis <strigazi@gmail.com>2016-07-06 21:50:14 +0200
commit242cbe00daf495a9e224f12e963f301e914dd278 (patch)
treeaad9546b35240be06fc3feb68e6a431234948263
parentcb99c64614c32608e997df437669652343809f64 (diff)
Mesos-Ubuntu bay driver implementation
Moves templates and template_definitions to the new directory structure. Change-Id: I42e4d2bd056f3d8082ef51ef599d917f2fe82960 Paritially-Implements: blueprint bay-drivers
Notes
Notes (review): Code-Review+1: Murali Allada <murali.allada@rackspace.com> Code-Review+1: PanFengyun <fengyun.pan@easystack.cn> Code-Review+2: Hongbin Lu <hongbin.lu@huawei.com> Code-Review+2: Motohiro/Yuanying Otsuka <yuanying@fraction.jp> Workflow+1: Motohiro/Yuanying Otsuka <yuanying@fraction.jp> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 08 Jul 2016 13:26:08 +0000 Reviewed-on: https://review.openstack.org/338521 Project: openstack/magnum Branch: refs/heads/master
-rw-r--r--magnum/conductor/template_definition.py75
-rw-r--r--magnum/drivers/common/template_def.py5
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/COPYING (renamed from magnum/templates/mesos/COPYING)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/README.md (renamed from magnum/templates/mesos/README.md)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/__init__.py0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/image/Dockerfile (renamed from magnum/templates/mesos/Dockerfile)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/image/README.md (renamed from magnum/templates/mesos/elements/README.md)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/image/docker/elements-deps (renamed from magnum/templates/mesos/elements/docker/elements-deps)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/image/docker/package-installs.yaml (renamed from magnum/templates/mesos/elements/docker/package-installs.yaml)0
-rwxr-xr-xmagnum/drivers/mesos_ubuntu_v1/image/docker/post-install.d/60-disable-docker-service (renamed from magnum/templates/mesos/elements/docker/post-install.d/60-disable-docker-service)0
-rwxr-xr-xmagnum/drivers/mesos_ubuntu_v1/image/docker/pre-install.d/10-add-docker-repo (renamed from magnum/templates/mesos/elements/docker/pre-install.d/10-add-docker-repo)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/image/mesos/elements-deps (renamed from magnum/templates/mesos/elements/mesos/elements-deps)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/image/mesos/package-installs.yaml (renamed from magnum/templates/mesos/elements/mesos/package-installs.yaml)0
-rwxr-xr-xmagnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart (renamed from magnum/templates/mesos/elements/mesos/post-install.d/60-disable-upstart)0
-rwxr-xr-xmagnum/drivers/mesos_ubuntu_v1/image/mesos/pre-install.d/10-apt-repo (renamed from magnum/templates/mesos/elements/mesos/pre-install.d/10-apt-repo)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/template_def.py87
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/add-proxy.sh (renamed from magnum/templates/mesos/fragments/add-proxy.sh)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-master.sh (renamed from magnum/templates/mesos/fragments/configure-mesos-master.sh)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-slave.sh (renamed from magnum/templates/mesos/fragments/configure-mesos-slave.sh)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-master.sh (renamed from magnum/templates/mesos/fragments/start-services-master.sh)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-slave.sh (renamed from magnum/templates/mesos/fragments/start-services-slave.sh)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/volume-service.sh (renamed from magnum/templates/mesos/fragments/volume-service.sh)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/write-heat-params-master.sh (renamed from magnum/templates/mesos/fragments/write-heat-params-master.sh)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/fragments/write-heat-params.yaml (renamed from magnum/templates/mesos/fragments/write-heat-params.yaml)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml (renamed from magnum/templates/mesos/mesoscluster.yaml)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/mesosmaster.yaml (renamed from magnum/templates/mesos/mesosmaster.yaml)0
-rw-r--r--magnum/drivers/mesos_ubuntu_v1/templates/mesosslave.yaml (renamed from magnum/templates/mesos/mesosslave.yaml)0
-rw-r--r--magnum/tests/unit/conductor/test_template_definition.py9
-rw-r--r--setup.cfg2
29 files changed, 93 insertions, 85 deletions
diff --git a/magnum/conductor/template_definition.py b/magnum/conductor/template_definition.py
index 5307835..2c637fe 100644
--- a/magnum/conductor/template_definition.py
+++ b/magnum/conductor/template_definition.py
@@ -40,11 +40,6 @@ template_def_opts = [
40 cfg.StrOpt('etcd_discovery_service_endpoint_format', 40 cfg.StrOpt('etcd_discovery_service_endpoint_format',
41 default='https://discovery.etcd.io/new?size=%(size)d', 41 default='https://discovery.etcd.io/new?size=%(size)d',
42 help=_('Url for etcd public discovery endpoint.')), 42 help=_('Url for etcd public discovery endpoint.')),
43 cfg.StrOpt('mesos_ubuntu_template_path',
44 default=paths.basedir_def('templates/mesos/'
45 'mesoscluster.yaml'),
46 help=_('Location of template to build a Mesos cluster '
47 'on Ubuntu.')),
48 cfg.ListOpt('enabled_definitions', 43 cfg.ListOpt('enabled_definitions',
49 default=['magnum_vm_atomic_k8s', 'magnum_vm_coreos_k8s', 44 default=['magnum_vm_atomic_k8s', 'magnum_vm_coreos_k8s',
50 'magnum_vm_atomic_swarm', 'magnum_vm_ubuntu_mesos'], 45 'magnum_vm_atomic_swarm', 'magnum_vm_ubuntu_mesos'],
@@ -206,73 +201,3 @@ class CoreOSK8sTemplateDefinition(K8sTemplateDefinition):
206 @property 201 @property
207 def template_path(self): 202 def template_path(self):
208 return cfg.CONF.bay.k8s_coreos_template_path 203 return cfg.CONF.bay.k8s_coreos_template_path
209
210
211class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
212 """Mesos template for Ubuntu VM."""
213
214 provides = [
215 {'server_type': 'vm', 'os': 'ubuntu', 'coe': 'mesos'},
216 ]
217
218 def __init__(self):
219 super(UbuntuMesosTemplateDefinition, self).__init__()
220 self.add_parameter('external_network',
221 baymodel_attr='external_network_id',
222 required=True)
223 self.add_parameter('number_of_slaves',
224 bay_attr='node_count')
225 self.add_parameter('master_flavor',
226 baymodel_attr='master_flavor_id')
227 self.add_parameter('slave_flavor',
228 baymodel_attr='flavor_id')
229 self.add_parameter('cluster_name',
230 bay_attr='name')
231 self.add_parameter('volume_driver',
232 baymodel_attr='volume_driver')
233
234 self.add_output('api_address',
235 bay_attr='api_address')
236 self.add_output('mesos_master_private',
237 bay_attr=None)
238 self.add_output('mesos_master',
239 bay_attr='master_addresses')
240 self.add_output('mesos_slaves_private',
241 bay_attr=None)
242 self.add_output('mesos_slaves',
243 bay_attr='node_addresses')
244
245 def get_params(self, context, baymodel, bay, **kwargs):
246 extra_params = kwargs.pop('extra_params', {})
247 # HACK(apmelton) - This uses the user's bearer token, ideally
248 # it should be replaced with an actual trust token with only
249 # access to do what the template needs it to do.
250 osc = self.get_osc(context)
251 extra_params['auth_url'] = context.auth_url
252 extra_params['username'] = context.user_name
253 extra_params['tenant_name'] = context.tenant
254 extra_params['domain_name'] = context.domain_name
255 extra_params['region_name'] = osc.cinder_region_name()
256
257 label_list = ['rexray_preempt', 'mesos_slave_isolation',
258 'mesos_slave_image_providers',
259 'mesos_slave_work_dir',
260 'mesos_slave_executor_env_variables']
261
262 for label in label_list:
263 extra_params[label] = baymodel.labels.get(label)
264
265 scale_mgr = kwargs.pop('scale_manager', None)
266 if scale_mgr:
267 hosts = self.get_output('mesos_slaves_private')
268 extra_params['slaves_to_remove'] = (
269 scale_mgr.get_removal_nodes(hosts))
270
271 return super(UbuntuMesosTemplateDefinition,
272 self).get_params(context, baymodel, bay,
273 extra_params=extra_params,
274 **kwargs)
275
276 @property
277 def template_path(self):
278 return cfg.CONF.bay.mesos_ubuntu_template_path
diff --git a/magnum/drivers/common/template_def.py b/magnum/drivers/common/template_def.py
index 0666a9e..b40fe02 100644
--- a/magnum/drivers/common/template_def.py
+++ b/magnum/drivers/common/template_def.py
@@ -48,11 +48,6 @@ template_def_opts = [
48 cfg.StrOpt('etcd_discovery_service_endpoint_format', 48 cfg.StrOpt('etcd_discovery_service_endpoint_format',
49 default='https://discovery.etcd.io/new?size=%(size)d', 49 default='https://discovery.etcd.io/new?size=%(size)d',
50 help=_('Url for etcd public discovery endpoint.')), 50 help=_('Url for etcd public discovery endpoint.')),
51 cfg.StrOpt('mesos_ubuntu_template_path',
52 default=paths.basedir_def('templates/mesos/'
53 'mesoscluster.yaml'),
54 help=_('Location of template to build a Mesos cluster '
55 'on Ubuntu.')),
56 cfg.ListOpt('enabled_definitions', 51 cfg.ListOpt('enabled_definitions',
57 default=['magnum_vm_atomic_k8s', 'magnum_vm_coreos_k8s', 52 default=['magnum_vm_atomic_k8s', 'magnum_vm_coreos_k8s',
58 'magnum_vm_atomic_swarm', 'magnum_vm_ubuntu_mesos'], 53 'magnum_vm_atomic_swarm', 'magnum_vm_ubuntu_mesos'],
diff --git a/magnum/templates/mesos/COPYING b/magnum/drivers/mesos_ubuntu_v1/COPYING
index d645695..d645695 100644
--- a/magnum/templates/mesos/COPYING
+++ b/magnum/drivers/mesos_ubuntu_v1/COPYING
diff --git a/magnum/templates/mesos/README.md b/magnum/drivers/mesos_ubuntu_v1/README.md
index b5996bc..b5996bc 100644
--- a/magnum/templates/mesos/README.md
+++ b/magnum/drivers/mesos_ubuntu_v1/README.md
diff --git a/magnum/drivers/mesos_ubuntu_v1/__init__.py b/magnum/drivers/mesos_ubuntu_v1/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/magnum/drivers/mesos_ubuntu_v1/__init__.py
diff --git a/magnum/templates/mesos/Dockerfile b/magnum/drivers/mesos_ubuntu_v1/image/Dockerfile
index 55b5e06..55b5e06 100644
--- a/magnum/templates/mesos/Dockerfile
+++ b/magnum/drivers/mesos_ubuntu_v1/image/Dockerfile
diff --git a/magnum/templates/mesos/elements/README.md b/magnum/drivers/mesos_ubuntu_v1/image/README.md
index 9cf6d58..9cf6d58 100644
--- a/magnum/templates/mesos/elements/README.md
+++ b/magnum/drivers/mesos_ubuntu_v1/image/README.md
diff --git a/magnum/templates/mesos/elements/docker/elements-deps b/magnum/drivers/mesos_ubuntu_v1/image/docker/elements-deps
index 7076aba..7076aba 100644
--- a/magnum/templates/mesos/elements/docker/elements-deps
+++ b/magnum/drivers/mesos_ubuntu_v1/image/docker/elements-deps
diff --git a/magnum/templates/mesos/elements/docker/package-installs.yaml b/magnum/drivers/mesos_ubuntu_v1/image/docker/package-installs.yaml
index cda53ec..cda53ec 100644
--- a/magnum/templates/mesos/elements/docker/package-installs.yaml
+++ b/magnum/drivers/mesos_ubuntu_v1/image/docker/package-installs.yaml
diff --git a/magnum/templates/mesos/elements/docker/post-install.d/60-disable-docker-service b/magnum/drivers/mesos_ubuntu_v1/image/docker/post-install.d/60-disable-docker-service
index a602616..a602616 100755
--- a/magnum/templates/mesos/elements/docker/post-install.d/60-disable-docker-service
+++ b/magnum/drivers/mesos_ubuntu_v1/image/docker/post-install.d/60-disable-docker-service
diff --git a/magnum/templates/mesos/elements/docker/pre-install.d/10-add-docker-repo b/magnum/drivers/mesos_ubuntu_v1/image/docker/pre-install.d/10-add-docker-repo
index 67cd970..67cd970 100755
--- a/magnum/templates/mesos/elements/docker/pre-install.d/10-add-docker-repo
+++ b/magnum/drivers/mesos_ubuntu_v1/image/docker/pre-install.d/10-add-docker-repo
diff --git a/magnum/templates/mesos/elements/mesos/elements-deps b/magnum/drivers/mesos_ubuntu_v1/image/mesos/elements-deps
index 7076aba..7076aba 100644
--- a/magnum/templates/mesos/elements/mesos/elements-deps
+++ b/magnum/drivers/mesos_ubuntu_v1/image/mesos/elements-deps
diff --git a/magnum/templates/mesos/elements/mesos/package-installs.yaml b/magnum/drivers/mesos_ubuntu_v1/image/mesos/package-installs.yaml
index 8975649..8975649 100644
--- a/magnum/templates/mesos/elements/mesos/package-installs.yaml
+++ b/magnum/drivers/mesos_ubuntu_v1/image/mesos/package-installs.yaml
diff --git a/magnum/templates/mesos/elements/mesos/post-install.d/60-disable-upstart b/magnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart
index 199dc6e..199dc6e 100755
--- a/magnum/templates/mesos/elements/mesos/post-install.d/60-disable-upstart
+++ b/magnum/drivers/mesos_ubuntu_v1/image/mesos/post-install.d/60-disable-upstart
diff --git a/magnum/templates/mesos/elements/mesos/pre-install.d/10-apt-repo b/magnum/drivers/mesos_ubuntu_v1/image/mesos/pre-install.d/10-apt-repo
index 0c10337..0c10337 100755
--- a/magnum/templates/mesos/elements/mesos/pre-install.d/10-apt-repo
+++ b/magnum/drivers/mesos_ubuntu_v1/image/mesos/pre-install.d/10-apt-repo
diff --git a/magnum/drivers/mesos_ubuntu_v1/template_def.py b/magnum/drivers/mesos_ubuntu_v1/template_def.py
new file mode 100644
index 0000000..42c6c90
--- /dev/null
+++ b/magnum/drivers/mesos_ubuntu_v1/template_def.py
@@ -0,0 +1,87 @@
1# Copyright 2016 Rackspace Inc. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14import os
15
16from magnum.drivers.common import template_def
17
18
19class UbuntuMesosTemplateDefinition(template_def.BaseTemplateDefinition):
20 """Mesos template for Ubuntu VM."""
21
22 provides = [
23 {'server_type': 'vm', 'os': 'ubuntu', 'coe': 'mesos'},
24 ]
25
26 def __init__(self):
27 super(UbuntuMesosTemplateDefinition, self).__init__()
28 self.add_parameter('external_network',
29 baymodel_attr='external_network_id',
30 required=True)
31 self.add_parameter('number_of_slaves',
32 bay_attr='node_count')
33 self.add_parameter('master_flavor',
34 baymodel_attr='master_flavor_id')
35 self.add_parameter('slave_flavor',
36 baymodel_attr='flavor_id')
37 self.add_parameter('cluster_name',
38 bay_attr='name')
39 self.add_parameter('volume_driver',
40 baymodel_attr='volume_driver')
41
42 self.add_output('api_address',
43 bay_attr='api_address')
44 self.add_output('mesos_master_private',
45 bay_attr=None)
46 self.add_output('mesos_master',
47 bay_attr='master_addresses')
48 self.add_output('mesos_slaves_private',
49 bay_attr=None)
50 self.add_output('mesos_slaves',
51 bay_attr='node_addresses')
52
53 def get_params(self, context, baymodel, bay, **kwargs):
54 extra_params = kwargs.pop('extra_params', {})
55 # HACK(apmelton) - This uses the user's bearer token, ideally
56 # it should be replaced with an actual trust token with only
57 # access to do what the template needs it to do.
58 osc = self.get_osc(context)
59 extra_params['auth_url'] = context.auth_url
60 extra_params['username'] = context.user_name
61 extra_params['tenant_name'] = context.tenant
62 extra_params['domain_name'] = context.domain_name
63 extra_params['region_name'] = osc.cinder_region_name()
64
65 label_list = ['rexray_preempt', 'mesos_slave_isolation',
66 'mesos_slave_image_providers',
67 'mesos_slave_work_dir',
68 'mesos_slave_executor_env_variables']
69
70 for label in label_list:
71 extra_params[label] = baymodel.labels.get(label)
72
73 scale_mgr = kwargs.pop('scale_manager', None)
74 if scale_mgr:
75 hosts = self.get_output('mesos_slaves_private')
76 extra_params['slaves_to_remove'] = (
77 scale_mgr.get_removal_nodes(hosts))
78
79 return super(UbuntuMesosTemplateDefinition,
80 self).get_params(context, baymodel, bay,
81 extra_params=extra_params,
82 **kwargs)
83
84 @property
85 def template_path(self):
86 return os.path.join(os.path.dirname(os.path.realpath(__file__)),
87 'templates/mesoscluster.yaml')
diff --git a/magnum/templates/mesos/fragments/add-proxy.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/add-proxy.sh
index 87e8538..87e8538 100644
--- a/magnum/templates/mesos/fragments/add-proxy.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/add-proxy.sh
diff --git a/magnum/templates/mesos/fragments/configure-mesos-master.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-master.sh
index fd7b66c..fd7b66c 100644
--- a/magnum/templates/mesos/fragments/configure-mesos-master.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-master.sh
diff --git a/magnum/templates/mesos/fragments/configure-mesos-slave.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-slave.sh
index 8dd10c9..8dd10c9 100644
--- a/magnum/templates/mesos/fragments/configure-mesos-slave.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/configure-mesos-slave.sh
diff --git a/magnum/templates/mesos/fragments/start-services-master.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-master.sh
index a1043ed..a1043ed 100644
--- a/magnum/templates/mesos/fragments/start-services-master.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-master.sh
diff --git a/magnum/templates/mesos/fragments/start-services-slave.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-slave.sh
index d3bee13..d3bee13 100644
--- a/magnum/templates/mesos/fragments/start-services-slave.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/start-services-slave.sh
diff --git a/magnum/templates/mesos/fragments/volume-service.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/volume-service.sh
index ed8a95a..ed8a95a 100644
--- a/magnum/templates/mesos/fragments/volume-service.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/volume-service.sh
diff --git a/magnum/templates/mesos/fragments/write-heat-params-master.sh b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/write-heat-params-master.sh
index 6b0a889..6b0a889 100644
--- a/magnum/templates/mesos/fragments/write-heat-params-master.sh
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/write-heat-params-master.sh
diff --git a/magnum/templates/mesos/fragments/write-heat-params.yaml b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/write-heat-params.yaml
index d9a4b91..d9a4b91 100644
--- a/magnum/templates/mesos/fragments/write-heat-params.yaml
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/fragments/write-heat-params.yaml
diff --git a/magnum/templates/mesos/mesoscluster.yaml b/magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml
index 62f6903..62f6903 100644
--- a/magnum/templates/mesos/mesoscluster.yaml
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/mesoscluster.yaml
diff --git a/magnum/templates/mesos/mesosmaster.yaml b/magnum/drivers/mesos_ubuntu_v1/templates/mesosmaster.yaml
index e345692..e345692 100644
--- a/magnum/templates/mesos/mesosmaster.yaml
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/mesosmaster.yaml
diff --git a/magnum/templates/mesos/mesosslave.yaml b/magnum/drivers/mesos_ubuntu_v1/templates/mesosslave.yaml
index 521fec9..521fec9 100644
--- a/magnum/templates/mesos/mesosslave.yaml
+++ b/magnum/drivers/mesos_ubuntu_v1/templates/mesosslave.yaml
diff --git a/magnum/tests/unit/conductor/test_template_definition.py b/magnum/tests/unit/conductor/test_template_definition.py
index 4617258..c91000f 100644
--- a/magnum/tests/unit/conductor/test_template_definition.py
+++ b/magnum/tests/unit/conductor/test_template_definition.py
@@ -18,6 +18,7 @@ from oslo_config import cfg
18from magnum.common import exception 18from magnum.common import exception
19from magnum.conductor import template_definition as tdef 19from magnum.conductor import template_definition as tdef
20from magnum.drivers.common import template_def as cmn_tdef 20from magnum.drivers.common import template_def as cmn_tdef
21from magnum.drivers.mesos_ubuntu_v1 import template_def as mesos_tdef
21from magnum.drivers.swarm_fedora_atomic_v1 import template_def as swarm_tdef 22from magnum.drivers.swarm_fedora_atomic_v1 import template_def as swarm_tdef
22from magnum.tests import base 23from magnum.tests import base
23 24
@@ -87,7 +88,7 @@ class TemplateDefinitionTestCase(base.TestCase):
87 'mesos') 88 'mesos')
88 89
89 self.assertIsInstance(definition, 90 self.assertIsInstance(definition,
90 tdef.UbuntuMesosTemplateDefinition) 91 mesos_tdef.UbuntuMesosTemplateDefinition)
91 92
92 def test_get_definition_not_supported(self): 93 def test_get_definition_not_supported(self):
93 self.assertRaises(exception.BayTypeNotSupported, 94 self.assertRaises(exception.BayTypeNotSupported,
@@ -680,7 +681,7 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
680 mock_scale_manager = mock.MagicMock() 681 mock_scale_manager = mock.MagicMock()
681 mock_scale_manager.get_removal_nodes.return_value = removal_nodes 682 mock_scale_manager.get_removal_nodes.return_value = removal_nodes
682 683
683 mesos_def = tdef.UbuntuMesosTemplateDefinition() 684 mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition()
684 685
685 mesos_def.get_params(mock_context, mock_baymodel, mock_bay, 686 mesos_def.get_params(mock_context, mock_baymodel, mock_bay,
686 scale_manager=mock_scale_manager) 687 scale_manager=mock_scale_manager)
@@ -702,7 +703,7 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
702 mock_bay, **expected_kwargs) 703 mock_bay, **expected_kwargs)
703 704
704 def test_mesos_get_heat_param(self): 705 def test_mesos_get_heat_param(self):
705 mesos_def = tdef.UbuntuMesosTemplateDefinition() 706 mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition()
706 707
707 heat_param = mesos_def.get_heat_param(bay_attr='node_count') 708 heat_param = mesos_def.get_heat_param(bay_attr='node_count')
708 self.assertEqual('number_of_slaves', heat_param) 709 self.assertEqual('number_of_slaves', heat_param)
@@ -711,7 +712,7 @@ class UbuntuMesosTemplateDefinitionTestCase(base.TestCase):
711 self.assertEqual('number_of_masters', heat_param) 712 self.assertEqual('number_of_masters', heat_param)
712 713
713 def test_update_outputs(self): 714 def test_update_outputs(self):
714 mesos_def = tdef.UbuntuMesosTemplateDefinition() 715 mesos_def = mesos_tdef.UbuntuMesosTemplateDefinition()
715 716
716 expected_api_address = 'updated_address' 717 expected_api_address = 'updated_address'
717 expected_node_addresses = ['ex_slave', 'address'] 718 expected_node_addresses = ['ex_slave', 'address']
diff --git a/setup.cfg b/setup.cfg
index c84b370..ee674a3 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -59,7 +59,7 @@ magnum.template_definitions =
59 magnum_vm_atomic_k8s = magnum.conductor.template_definition:AtomicK8sTemplateDefinition 59 magnum_vm_atomic_k8s = magnum.conductor.template_definition:AtomicK8sTemplateDefinition
60 magnum_vm_coreos_k8s = magnum.conductor.template_definition:CoreOSK8sTemplateDefinition 60 magnum_vm_coreos_k8s = magnum.conductor.template_definition:CoreOSK8sTemplateDefinition
61 magnum_vm_atomic_swarm = magnum.drivers.swarm_fedora_atomic_v1.template_def:AtomicSwarmTemplateDefinition 61 magnum_vm_atomic_swarm = magnum.drivers.swarm_fedora_atomic_v1.template_def:AtomicSwarmTemplateDefinition
62 magnum_vm_ubuntu_mesos = magnum.conductor.template_definition:UbuntuMesosTemplateDefinition 62 magnum_vm_ubuntu_mesos = magnum.drivers.mesos_ubuntu_v1.template_def:UbuntuMesosTemplateDefinition
63 63
64magnum.database.migration_backend = 64magnum.database.migration_backend =
65 sqlalchemy = magnum.db.sqlalchemy.migration 65 sqlalchemy = magnum.db.sqlalchemy.migration