Merge "Fix magnum cluster-update error"
This commit is contained in:
commit
331c835aa5
@ -29,7 +29,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
def get_scale_manager(context, osclient, cluster):
|
def get_scale_manager(context, osclient, cluster):
|
||||||
manager = None
|
manager = None
|
||||||
coe = cluster.baymodel.coe
|
coe = cluster.cluster_template.coe
|
||||||
if coe == 'kubernetes':
|
if coe == 'kubernetes':
|
||||||
manager = K8sScaleManager(context, osclient, cluster)
|
manager = K8sScaleManager(context, osclient, cluster)
|
||||||
elif coe == 'mesos':
|
elif coe == 'mesos':
|
||||||
|
@ -26,11 +26,11 @@ class TestScaleManager(base.TestCase):
|
|||||||
mock_context = mock.MagicMock()
|
mock_context = mock.MagicMock()
|
||||||
mock_osc = mock.MagicMock()
|
mock_osc = mock.MagicMock()
|
||||||
k8s_cluster = mock.MagicMock()
|
k8s_cluster = mock.MagicMock()
|
||||||
k8s_cluster.baymodel.coe = 'kubernetes'
|
k8s_cluster.cluster_template.coe = 'kubernetes'
|
||||||
mesos_cluster = mock.MagicMock()
|
mesos_cluster = mock.MagicMock()
|
||||||
mesos_cluster.baymodel.coe = 'mesos'
|
mesos_cluster.cluster_template.coe = 'mesos'
|
||||||
invalid_cluster = mock.MagicMock()
|
invalid_cluster = mock.MagicMock()
|
||||||
invalid_cluster.baymodel.coe = 'fake'
|
invalid_cluster.cluster_template.coe = 'fake'
|
||||||
|
|
||||||
mgr = scale_manager.get_scale_manager(
|
mgr = scale_manager.get_scale_manager(
|
||||||
mock_context, mock_osc, k8s_cluster)
|
mock_context, mock_osc, k8s_cluster)
|
||||||
|
Loading…
Reference in New Issue
Block a user