diff --git a/magnum_ui/api/magnum.py b/magnum_ui/api/magnum.py index bb5fc2c7..8883c870 100644 --- a/magnum_ui/api/magnum.py +++ b/magnum_ui/api/magnum.py @@ -36,8 +36,8 @@ CLUSTER_TEMPLATE_CREATE_ATTRS = ['name', 'image_id', 'flavor_id', 'floating_ip_enabled', 'master_lb_enabled', 'insecure_registry'] -CLUSTER_CREATE_ATTRS = ['name', 'baymodel_id', 'node_count', - 'discovery_url', 'cluster_create_timeout', +CLUSTER_CREATE_ATTRS = ['name', 'cluster_template_id', 'node_count', + 'discovery_url', 'create_timeout', 'master_count'] CERTIFICATE_CREATE_ATTRS = ['cluster_uuid', 'csr'] @@ -83,21 +83,21 @@ def cluster_template_create(request, **kwargs): kv = v.split("=", 1) labels[kv[0]] = kv[1] args["labels"] = labels - return magnumclient(request).baymodels.create(**args) + return magnumclient(request).cluster_templates.create(**args) def cluster_template_delete(request, id): - return magnumclient(request).baymodels.delete(id) + return magnumclient(request).cluster_templates.delete(id) def cluster_template_list(request, limit=None, marker=None, sort_key=None, sort_dir=None, detail=True): - return magnumclient(request).baymodels.list(limit, marker, sort_key, - sort_dir, detail) + return magnumclient(request).cluster_templates.list( + limit, marker, sort_key, sort_dir, detail) def cluster_template_show(request, id): - return magnumclient(request).baymodels.get(id) + return magnumclient(request).cluster_templates.get(id) def cluster_create(request, **kwargs): @@ -108,25 +108,25 @@ def cluster_create(request, **kwargs): else: raise exceptions.BadRequest( "Key must be in %s" % ",".join(CLUSTER_CREATE_ATTRS)) - return magnumclient(request).bays.create(**args) + return magnumclient(request).clusters.create(**args) def cluster_update(request, id, patch): - return magnumclient(request).bays.update(id, patch) + return magnumclient(request).clusters.update(id, patch) def cluster_delete(request, id): - return magnumclient(request).bays.delete(id) + return magnumclient(request).clusters.delete(id) def cluster_list(request, limit=None, marker=None, sort_key=None, sort_dir=None, detail=True): - return magnumclient(request).bays.list(limit, marker, sort_key, - sort_dir, detail) + return magnumclient(request).clusters.list(limit, marker, sort_key, + sort_dir, detail) def cluster_show(request, id): - return magnumclient(request).bays.get(id) + return magnumclient(request).clusters.get(id) def certificate_create(request, **kwargs): diff --git a/magnum_ui/static/dashboard/container-infra/clusters/create/cluster-model.js b/magnum_ui/static/dashboard/container-infra/clusters/create/cluster-model.js index b52e6ba3..3ce3f082 100644 --- a/magnum_ui/static/dashboard/container-infra/clusters/create/cluster-model.js +++ b/magnum_ui/static/dashboard/container-infra/clusters/create/cluster-model.js @@ -37,11 +37,11 @@ function initNewClusterSpec() { model.newClusterSpec = { name: null, - baymodel_id: null, + cluster_template_id: null, master_count: null, node_count: null, discover_url: null, - bay_create_timeout: null + create_timeout: null }; } diff --git a/magnum_ui/static/dashboard/container-infra/clusters/create/info/cluster.info.controller.js b/magnum_ui/static/dashboard/container-infra/clusters/create/info/cluster.info.controller.js index bf5d49ce..d5c72c79 100644 --- a/magnum_ui/static/dashboard/container-infra/clusters/create/info/cluster.info.controller.js +++ b/magnum_ui/static/dashboard/container-infra/clusters/create/info/cluster.info.controller.js @@ -39,7 +39,7 @@ function createClusterInfoController($q, $scope, basePath, magnum) { var ctrl = this; ctrl.cluster_templates = [{id:"", name: gettext("Choose a Cluster Template")}]; - $scope.model.newClusterSpec.baymodel_id = ""; + $scope.model.newClusterSpec.cluster_template_id = ""; $scope.cluster_template_detail = { name: "", id: "", @@ -53,7 +53,7 @@ $scope.changeClusterTemplate = function(){ angular.forEach(ctrl.cluster_templates, function(model, idx){ - if($scope.model.newClusterSpec.baymodel_id === model.id){ + if($scope.model.newClusterSpec.cluster_template_id === model.id){ $scope.cluster_template_detail.name = model.name; $scope.cluster_template_detail.id = model.id; $scope.cluster_template_detail.coe = model.coe; @@ -75,7 +75,7 @@ function onGetClusterTemplates(response) { Array.prototype.push.apply(ctrl.cluster_templates, response.items); if($scope.selected instanceof Object){ - $scope.model.newClusterSpec.baymodel_id = $scope.selected.id; + $scope.model.newClusterSpec.cluster_template_id = $scope.selected.id; $scope.changeClusterTemplate(); } } diff --git a/magnum_ui/static/dashboard/container-infra/clusters/create/info/info.html b/magnum_ui/static/dashboard/container-infra/clusters/create/info/info.html index ed5b44ae..62921e0d 100644 --- a/magnum_ui/static/dashboard/container-infra/clusters/create/info/info.html +++ b/magnum_ui/static/dashboard/container-infra/clusters/create/info/info.html @@ -15,14 +15,14 @@ -