Browse Source

Merge "Fix magnum cluster-update error"

changes/30/391830/1
Jenkins 5 years ago
committed by Gerrit Code Review
parent
commit
331c835aa5
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      magnum/conductor/scale_manager.py
  2. +3
    -3
      magnum/tests/unit/conductor/test_scale_manager.py

+ 1
- 1
magnum/conductor/scale_manager.py View File

@ -29,7 +29,7 @@ LOG = logging.getLogger(__name__)
def get_scale_manager(context, osclient, cluster):
manager = None
coe = cluster.baymodel.coe
coe = cluster.cluster_template.coe
if coe == 'kubernetes':
manager = K8sScaleManager(context, osclient, cluster)
elif coe == 'mesos':


+ 3
- 3
magnum/tests/unit/conductor/test_scale_manager.py View File

@ -26,11 +26,11 @@ class TestScaleManager(base.TestCase):
mock_context = mock.MagicMock()
mock_osc = mock.MagicMock()
k8s_cluster = mock.MagicMock()
k8s_cluster.baymodel.coe = 'kubernetes'
k8s_cluster.cluster_template.coe = 'kubernetes'
mesos_cluster = mock.MagicMock()
mesos_cluster.baymodel.coe = 'mesos'
mesos_cluster.cluster_template.coe = 'mesos'
invalid_cluster = mock.MagicMock()
invalid_cluster.baymodel.coe = 'fake'
invalid_cluster.cluster_template.coe = 'fake'
mgr = scale_manager.get_scale_manager(
mock_context, mock_osc, k8s_cluster)


Loading…
Cancel
Save