Browse Source

k8s coreos bay driver

This patch moves k8s-coreos specific templates and
template_definition class to the new drivers folder.

It also deletes the /magnum/templates folder
as everything has been moved to the drivers directory.

Change-Id: I6b2ca49e4d7d5fcfb96d0abc373d6476fd907358
Paritially-Implements: blueprint bay-drivers
changes/96/339196/5
murali allada 5 years ago
parent
commit
f09f314da4
  1. 4
      contrib/templates/example/example_template/__init__.py
  2. 6
      magnum/drivers/common/template_def.py
  3. 0
      magnum/drivers/k8s_coreos_v1/__init__.py
  4. 49
      magnum/drivers/k8s_coreos_v1/template_def.py
  5. 0
      magnum/drivers/k8s_coreos_v1/templates/COPYING
  6. 0
      magnum/drivers/k8s_coreos_v1/templates/README.md
  7. 0
      magnum/drivers/k8s_coreos_v1/templates/elements/README.md
  8. 0
      magnum/drivers/k8s_coreos_v1/templates/elements/kubernetes/elements-deps
  9. 0
      magnum/drivers/k8s_coreos_v1/templates/elements/kubernetes/package-installs.yaml
  10. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/add-proxy.sh
  11. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/configure-docker-registry.sh
  12. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/configure-docker-storage.sh
  13. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/configure-etcd-coreos.yaml
  14. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/configure-etcd.sh
  15. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/configure-flannel.sh
  16. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/configure-kubernetes-master.sh
  17. 5
      magnum/drivers/k8s_coreos_v1/templates/fragments/configure-kubernetes-minion.sh
  18. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/create-kube-namespace-coreos.yaml
  19. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/disable-selinux.sh
  20. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-docker-registry.sh
  21. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-etcd.sh
  22. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-apiserver-coreos.yaml
  23. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-controller-manager-coreos.yaml
  24. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-podmaster-coreos.yaml
  25. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-podmaster.sh
  26. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-proxy-master-coreos.yaml
  27. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-proxy-master.sh
  28. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-proxy-minion-coreos.yaml
  29. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-proxy-minion.sh
  30. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-scheduler-coreos.yaml
  31. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kubelet-master-coreos.yaml
  32. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kubelet-minion-coreos.yaml
  33. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-network-service-coreos.yaml
  34. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-services-master.sh
  35. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/enable-services-minion.sh
  36. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/kube-examples.yaml
  37. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/kube-system-namespace-service.sh
  38. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/kube-ui-service.sh
  39. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/kube-user.yaml
  40. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert-client-coreos.yaml
  41. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert-client.sh
  42. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert-coreos.yaml
  43. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert.sh
  44. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/network-config-service.sh
  45. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/network-service.sh
  46. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/wc-notify-coreos.yaml
  47. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/wc-notify-master.sh
  48. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/write-heat-params-master.yaml
  49. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/write-heat-params.yaml
  50. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/write-kube-os-config.sh
  51. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/write-kubeconfig-coreos.yaml
  52. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/write-kubeconfig.yaml
  53. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/write-network-config-coreos.yaml
  54. 0
      magnum/drivers/k8s_coreos_v1/templates/fragments/write-network-config.sh
  55. 0
      magnum/drivers/k8s_coreos_v1/templates/kubecluster-coreos.yaml
  56. 0
      magnum/drivers/k8s_coreos_v1/templates/kubemaster-coreos.yaml
  57. 0
      magnum/drivers/k8s_coreos_v1/templates/kubeminion-coreos.yaml
  58. 6
      magnum/opts.py
  59. 38
      magnum/templates/common/fragments/configure_docker_storage_driver_atomic.sh
  60. 4
      magnum/tests/unit/conductor/handlers/test_k8s_bay_conductor.py
  61. 0
      magnum/tests/unit/drivers/__init__.py
  62. 6
      magnum/tests/unit/drivers/test_template_definition.py
  63. 2
      setup.cfg

4
contrib/templates/example/example_template/__init__.py

@ -15,10 +15,10 @@
import os
from magnum.conductor import template_definition
from magnum.drivers.common import template_def
class ExampleTemplate(template_definition.BaseTemplateDefinition):
class ExampleTemplate(template_def.BaseTemplateDefinition):
provides = [
{'server_type': 'vm', 'os': 'example', 'coe': 'example_coe'},
{'server_type': 'vm', 'os': 'example2', 'coe': 'example_coe'},

6
magnum/drivers/common/template_def.py

@ -22,7 +22,6 @@ import six
from magnum.common import clients
from magnum.common import exception
from magnum.common import paths
from magnum.i18n import _
from magnum.i18n import _LW
@ -33,11 +32,6 @@ LOG = logging.getLogger(__name__)
template_def_opts = [
cfg.StrOpt('k8s_coreos_template_path',
default=paths.basedir_def('templates/kubernetes/'
'kubecluster-coreos.yaml'),
help=_(
'Location of template to build a k8s cluster on CoreOS.')),
cfg.StrOpt('etcd_discovery_service_endpoint_format',
default='https://discovery.etcd.io/new?size=%(size)d',
help=_('Url for etcd public discovery endpoint.')),

0
magnum/drivers/k8s_coreos_v1/__init__.py

49
magnum/conductor/template_definition.py → magnum/drivers/k8s_coreos_v1/template_def.py

@ -1,4 +1,4 @@
# Copyright 2014 Rackspace Inc. All rights reserved.
# Copyright 2016 Rackspace Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
@ -11,47 +11,15 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log as logging
import os
from magnum.common import paths
from magnum.drivers.common import template_def
from magnum.i18n import _
LOG = logging.getLogger(__name__)
from oslo_config import cfg
CONF = cfg.CONF
KUBE_SECURE_PORT = '6443'
KUBE_INSECURE_PORT = '8080'
template_def_opts = [
cfg.StrOpt('k8s_coreos_template_path',
default=paths.basedir_def('templates/kubernetes/'
'kubecluster-coreos.yaml'),
help=_(
'Location of template to build a k8s cluster on CoreOS.')),
cfg.StrOpt('etcd_discovery_service_endpoint_format',
default='https://discovery.etcd.io/new?size=%(size)d',
help=_('Url for etcd public discovery endpoint.')),
cfg.ListOpt('enabled_definitions',
default=['magnum_vm_atomic_k8s', 'magnum_vm_coreos_k8s',
'magnum_vm_atomic_swarm', 'magnum_vm_ubuntu_mesos'],
help=_('Enabled bay definition entry points.')),
]
docker_registry_opts = [
cfg.StrOpt('swift_region',
help=_('Region name of Swift')),
cfg.StrOpt('swift_registry_container',
default='docker_registry',
help=_('Name of the container in Swift which docker registry '
'stores images in'))
]
CONF = cfg.CONF
CONF.register_opts(template_def_opts, group='bay')
CONF.register_opts(docker_registry_opts, group='docker_registry')
class K8sApiAddressOutputMapping(template_def.OutputMapping):
@ -149,12 +117,6 @@ class K8sTemplateDefinition(template_def.BaseTemplateDefinition):
extra_params=extra_params,
**kwargs)
def get_env_files(self, baymodel):
if baymodel.master_lb_enabled:
return ['environments/with_master_lb.yaml']
else:
return ['environments/no_master_lb.yaml']
class CoreOSK8sTemplateDefinition(K8sTemplateDefinition):
"""Kubernetes template for CoreOS VM."""
@ -165,4 +127,5 @@ class CoreOSK8sTemplateDefinition(K8sTemplateDefinition):
@property
def template_path(self):
return cfg.CONF.bay.k8s_coreos_template_path
return os.path.join(os.path.dirname(os.path.realpath(__file__)),
'templates/kubecluster-coreos.yaml')

0
magnum/templates/kubernetes/COPYING → magnum/drivers/k8s_coreos_v1/templates/COPYING

0
magnum/templates/kubernetes/README.md → magnum/drivers/k8s_coreos_v1/templates/README.md

0
magnum/templates/kubernetes/elements/README.md → magnum/drivers/k8s_coreos_v1/templates/elements/README.md

0
magnum/templates/kubernetes/elements/kubernetes/elements-deps → magnum/drivers/k8s_coreos_v1/templates/elements/kubernetes/elements-deps

0
magnum/templates/kubernetes/elements/kubernetes/package-installs.yaml → magnum/drivers/k8s_coreos_v1/templates/elements/kubernetes/package-installs.yaml

0
magnum/templates/kubernetes/fragments/add-proxy.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/add-proxy.sh

0
magnum/templates/kubernetes/fragments/configure-docker-registry.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/configure-docker-registry.sh

0
magnum/templates/kubernetes/fragments/configure-docker-storage.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/configure-docker-storage.sh

0
magnum/templates/kubernetes/fragments/configure-etcd-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/configure-etcd-coreos.yaml

0
magnum/templates/kubernetes/fragments/configure-etcd.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/configure-etcd.sh

0
magnum/templates/kubernetes/fragments/configure-flannel.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/configure-flannel.sh

0
magnum/templates/kubernetes/fragments/configure-kubernetes-master.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/configure-kubernetes-master.sh

5
magnum/templates/kubernetes/fragments/configure-kubernetes-minion.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/configure-kubernetes-minion.sh

@ -5,12 +5,11 @@
echo "configuring kubernetes (minion)"
ETCD_SERVER_IP=${ETCD_SERVER_IP:-$KUBE_MASTER_IP}
KUBE_PROTOCOL="https"
KUBE_CONFIG=""
if [ "$TLS_DISABLED" = "True" ]; then
KUBE_PROTOCOL="http"
KUBE_CONFIG=""
else
KUBE_PROTOCOL="https"
KUBE_CONFIG="--kubeconfig=/srv/kubernetes/kubeconfig.yaml"
fi
KUBE_MASTER_URI="$KUBE_PROTOCOL://$KUBE_MASTER_IP:$KUBE_API_PORT"

0
magnum/templates/kubernetes/fragments/create-kube-namespace-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/create-kube-namespace-coreos.yaml

0
magnum/templates/kubernetes/fragments/disable-selinux.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/disable-selinux.sh

0
magnum/templates/kubernetes/fragments/enable-docker-registry.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-docker-registry.sh

0
magnum/templates/kubernetes/fragments/enable-etcd.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-etcd.sh

0
magnum/templates/kubernetes/fragments/enable-kube-apiserver-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-apiserver-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-kube-controller-manager-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-controller-manager-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-kube-podmaster-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-podmaster-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-kube-podmaster.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-podmaster.sh

0
magnum/templates/kubernetes/fragments/enable-kube-proxy-master-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-proxy-master-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-kube-proxy-master.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-proxy-master.sh

0
magnum/templates/kubernetes/fragments/enable-kube-proxy-minion-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-proxy-minion-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-kube-proxy-minion.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-proxy-minion.sh

0
magnum/templates/kubernetes/fragments/enable-kube-scheduler-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kube-scheduler-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-kubelet-master-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kubelet-master-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-kubelet-minion-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-kubelet-minion-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-network-service-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-network-service-coreos.yaml

0
magnum/templates/kubernetes/fragments/enable-services-master.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-services-master.sh

0
magnum/templates/kubernetes/fragments/enable-services-minion.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/enable-services-minion.sh

0
magnum/templates/kubernetes/fragments/kube-examples.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/kube-examples.yaml

0
magnum/templates/kubernetes/fragments/kube-system-namespace-service.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/kube-system-namespace-service.sh

0
magnum/templates/kubernetes/fragments/kube-ui-service.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/kube-ui-service.sh

0
magnum/templates/kubernetes/fragments/kube-user.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/kube-user.yaml

0
magnum/templates/kubernetes/fragments/make-cert-client-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert-client-coreos.yaml

0
magnum/templates/kubernetes/fragments/make-cert-client.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert-client.sh

0
magnum/templates/kubernetes/fragments/make-cert-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert-coreos.yaml

0
magnum/templates/kubernetes/fragments/make-cert.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert.sh

0
magnum/templates/kubernetes/fragments/network-config-service.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/network-config-service.sh

0
magnum/templates/kubernetes/fragments/network-service.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/network-service.sh

0
magnum/templates/kubernetes/fragments/wc-notify-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/wc-notify-coreos.yaml

0
magnum/templates/kubernetes/fragments/wc-notify-master.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/wc-notify-master.sh

0
magnum/templates/kubernetes/fragments/write-heat-params-master.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/write-heat-params-master.yaml

0
magnum/templates/kubernetes/fragments/write-heat-params.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/write-heat-params.yaml

0
magnum/templates/kubernetes/fragments/write-kube-os-config.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/write-kube-os-config.sh

0
magnum/templates/kubernetes/fragments/write-kubeconfig-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/write-kubeconfig-coreos.yaml

0
magnum/templates/kubernetes/fragments/write-kubeconfig.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/write-kubeconfig.yaml

0
magnum/templates/kubernetes/fragments/write-network-config-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/fragments/write-network-config-coreos.yaml

0
magnum/templates/kubernetes/fragments/write-network-config.sh → magnum/drivers/k8s_coreos_v1/templates/fragments/write-network-config.sh

0
magnum/templates/kubernetes/kubecluster-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/kubecluster-coreos.yaml

0
magnum/templates/kubernetes/kubemaster-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/kubemaster-coreos.yaml

0
magnum/templates/kubernetes/kubeminion-coreos.yaml → magnum/drivers/k8s_coreos_v1/templates/kubeminion-coreos.yaml

6
magnum/opts.py

@ -27,8 +27,8 @@ import magnum.conductor.config
import magnum.conductor.handlers.bay_conductor
import magnum.conductor.handlers.docker_conductor
import magnum.conductor.handlers.k8s_conductor
import magnum.conductor.template_definition
import magnum.db
import magnum.drivers.common.template_def
def list_opts():
@ -40,7 +40,7 @@ def list_opts():
magnum.common.service.service_opts,
)),
('api', magnum.api.app.API_SERVICE_OPTS),
('bay', magnum.conductor.template_definition.template_def_opts),
('bay', magnum.drivers.common.template_def.template_def_opts),
('conductor', magnum.conductor.config.SERVICE_OPTS),
('database', magnum.db.sql_opts),
('docker', magnum.common.docker_utils.docker_opts),
@ -61,5 +61,5 @@ def list_opts():
('baymodel', magnum.api.validation.baymodel_opts),
('keystone_auth', magnum.common.keystone.keystone_auth_opts),
('docker_registry',
magnum.conductor.template_definition.docker_registry_opts)
magnum.drivers.common.template_def.docker_registry_opts)
]

38
magnum/templates/common/fragments/configure_docker_storage_driver_atomic.sh

@ -1,38 +0,0 @@
# This file contains docker storage drivers configuration for fedora
# atomic hosts. Currently, devicemapper and overlay are supported.
# Remove any existing docker-storage configuration. In case of an
# existing configuration, docker-storage-setup will fail.
clear_docker_storage_congiguration () {
if [ -f /etc/sysconfig/docker-storage ]; then
sed -i "/^DOCKER_STORAGE_OPTIONS=/ s/=.*/=/" /etc/sysconfig/docker-storage
fi
}
# Configure docker storage with xfs as backing filesystem.
configure_overlay () {
clear_docker_storage_congiguration
rm -rf /var/lib/docker/*
mkfs.xfs ${device_path}
echo "${device_path} /var/lib/docker xfs defaults 0 0" >> /etc/fstab
mount -a
echo "STORAGE_DRIVER=overlay" > /etc/sysconfig/docker-storage-setup
# SELinux must be enabled and in enforcing mode on the physical
# machine, but must be disabled in the container when performing
# container separation
sed -i "/^OPTIONS=/ s/--selinux-enabled/--selinux-enabled=false/" /etc/sysconfig/docker
}
# Configure docker storage with devicemapper using direct LVM
configure_devicemapper () {
clear_docker_storage_congiguration
pvcreate ${device_path}
vgcreate docker ${device_path}
echo "VG=docker" > /etc/sysconfig/docker-storage-setup
}

4
magnum/tests/unit/conductor/handlers/test_k8s_bay_conductor.py

@ -297,7 +297,7 @@ class TestBayConductorWithK8s(base.TestCase):
'insecure_registry_url': '10.0.0.1:5000',
}
self.assertEqual(expected, definition)
self.assertEqual(['environments/no_master_lb.yaml'], env_files)
self.assertEqual([], env_files)
@patch('requests.get')
@patch('magnum.objects.BayModel.get_by_uuid')
@ -349,7 +349,7 @@ class TestBayConductorWithK8s(base.TestCase):
'insecure_registry_url': '10.0.0.1:5000',
}
self.assertEqual(expected, definition)
self.assertEqual(['environments/no_master_lb.yaml'], env_files)
self.assertEqual([], env_files)
@patch('requests.get')
@patch('magnum.objects.BayModel.get_by_uuid')

0
magnum/tests/unit/drivers/__init__.py

6
magnum/tests/unit/conductor/test_template_definition.py → magnum/tests/unit/drivers/test_template_definition.py

@ -16,8 +16,8 @@ import mock
from oslo_config import cfg
from magnum.common import exception
from magnum.conductor import template_definition as tdef
from magnum.drivers.common import template_def as cmn_tdef
from magnum.drivers.k8s_coreos_v1 import template_def as k8s_coreos_tdef
from magnum.drivers.k8s_fedora_atomic_v1 import template_def as k8sa_tdef
from magnum.drivers.mesos_ubuntu_v1 import template_def as mesos_tdef
from magnum.drivers.swarm_fedora_atomic_v1 import template_def as swarm_tdef
@ -52,7 +52,7 @@ class TemplateDefinitionTestCase(base.TestCase):
self.assertEqual(k8sa_tdef.AtomicK8sTemplateDefinition,
vm_atomic_k8s['magnum_vm_atomic_k8s'])
self.assertEqual(1, len(vm_coreos_k8s))
self.assertEqual(tdef.CoreOSK8sTemplateDefinition,
self.assertEqual(k8s_coreos_tdef.CoreOSK8sTemplateDefinition,
vm_coreos_k8s['magnum_vm_coreos_k8s'])
def test_get_vm_atomic_kubernetes_definition(self):
@ -71,7 +71,7 @@ class TemplateDefinitionTestCase(base.TestCase):
'kubernetes')
self.assertIsInstance(definition,
tdef.CoreOSK8sTemplateDefinition)
k8s_coreos_tdef.CoreOSK8sTemplateDefinition)
def test_get_vm_atomic_swarm_definition(self):
definition = cmn_tdef.TemplateDefinition.get_template_definition(

2
setup.cfg

@ -57,7 +57,7 @@ oslo.config.opts.defaults =
magnum.template_definitions =
magnum_vm_atomic_k8s = magnum.drivers.k8s_fedora_atomic_v1.template_def:AtomicK8sTemplateDefinition
magnum_vm_coreos_k8s = magnum.conductor.template_definition:CoreOSK8sTemplateDefinition
magnum_vm_coreos_k8s = magnum.drivers.k8s_coreos_v1.template_def:CoreOSK8sTemplateDefinition
magnum_vm_atomic_swarm = magnum.drivers.swarm_fedora_atomic_v1.template_def:AtomicSwarmTemplateDefinition
magnum_vm_ubuntu_mesos = magnum.drivers.mesos_ubuntu_v1.template_def:UbuntuMesosTemplateDefinition

Loading…
Cancel
Save