From 5616acfc9246dfdc801769ffe43cdea70ea2aa13 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Wed, 29 Aug 2018 00:18:33 +0200 Subject: [PATCH] Add swarm-mode as COE Adds the swarm-mode COE to the cluster templates panel. Story: 2003583 Task: 24889 Change-Id: Ibae5e463a9a93886f467d9424245a2564d383698 --- .../cluster-templates/cluster-templates.module.js | 1 + .../cluster-templates/workflow/workflow.service.js | 5 +++++ .../cluster-templates/workflow/workflow.service.spec.js | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/magnum_ui/static/dashboard/container-infra/cluster-templates/cluster-templates.module.js b/magnum_ui/static/dashboard/container-infra/cluster-templates/cluster-templates.module.js index a1054c66..b5d3316e 100644 --- a/magnum_ui/static/dashboard/container-infra/cluster-templates/cluster-templates.module.js +++ b/magnum_ui/static/dashboard/container-infra/cluster-templates/cluster-templates.module.js @@ -126,6 +126,7 @@ 'singleton': true, options: [ {label: gettext('Docker Swarm'), key: 'swarm'}, + {label: gettext('Docker Swarm Mode'), key: 'swarm-mode'}, {label: gettext('Kubernetes'), key: 'kubernetes'}, {label: gettext('DC/OS'), key: 'dcos'}, {label: gettext('Mesos'), key: 'mesos'} diff --git a/magnum_ui/static/dashboard/container-infra/cluster-templates/workflow/workflow.service.js b/magnum_ui/static/dashboard/container-infra/cluster-templates/workflow/workflow.service.js index 44fad6c7..0fe472f5 100644 --- a/magnum_ui/static/dashboard/container-infra/cluster-templates/workflow/workflow.service.js +++ b/magnum_ui/static/dashboard/container-infra/cluster-templates/workflow/workflow.service.js @@ -47,6 +47,7 @@ var schema; var coes = [{value: '', name: gettext("Choose a Container Orchestration Engine")}, {value: "swarm", name: gettext("Docker Swarm")}, + {value: "swarm-mode", name: gettext("Docker Swarm Mode")}, {value: "kubernetes", name: gettext("Kubernetes")}, {value: "mesos", name: gettext("Mesos")}, {value: "dcos", name: gettext("DC/OS")}]; @@ -58,6 +59,8 @@ kubernetes: [{value:"flannel", name: gettext("Flannel")}], swarm: [{value:"docker", name: gettext("Docker")}, {value:"flannel", name: gettext("Flannel")}], + "swarm-mode": [{value:"docker", name: gettext("Docker")}, + {value:"flannel", name: gettext("Flannel")}], mesos: [{value:"docker", name: gettext("Docker")}], dcos: [{value:"docker", name: gettext("Docker")}]}; var supportedVolumeDrivers = { @@ -68,6 +71,8 @@ {value:"cinder", name: gettext("Cinder")}], swarm: [{value:"", name: gettext("Choose a Volume Driver")}, {value:"rexray", name: gettext("Rexray")}], + "swarm-mode": [{value:"", name: gettext("Choose a Volume Driver")}, + {value:"rexray", name: gettext("Rexray")}], mesos: [{value:"", name: gettext("Choose a Volume Driver")}, {value:"rexray", name: gettext("Rexray")}], dcos: [{value:"", name: gettext("Choose a Volume Driver")}, diff --git a/magnum_ui/static/dashboard/container-infra/cluster-templates/workflow/workflow.service.spec.js b/magnum_ui/static/dashboard/container-infra/cluster-templates/workflow/workflow.service.spec.js index ef01f619..f982ee0c 100644 --- a/magnum_ui/static/dashboard/container-infra/cluster-templates/workflow/workflow.service.spec.js +++ b/magnum_ui/static/dashboard/container-infra/cluster-templates/workflow/workflow.service.spec.js @@ -54,6 +54,10 @@ config.form[0].tabs[0].items[0].items[1].onChange(); config.model.coe = 'swarm'; config.form[0].tabs[0].items[0].items[1].onChange(); + + config.model.coe = 'swarm-mode'; + config.form[0].tabs[0].items[0].items[1].onChange(); + expect(config.form[0].tabs[2].items[0].items[0].items[0].titleMap[0].value).toEqual('docker'); })); });