Hello community,

here is the log from the commit of package velum for openSUSE:Factory checked 
in at 2018-04-11 14:02:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/velum (Old)
 and      /work/SRC/openSUSE:Factory/.velum.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "velum"

Wed Apr 11 14:02:38 2018 rev:19 rq:595184 
version:3.0.0+dev+git_r717_cf9fe3cc189a6efc1b972ff3e7a724202bb75f7b

Changes:
--------
--- /work/SRC/openSUSE:Factory/velum/velum.changes      2018-04-05 
15:33:25.740278286 +0200
+++ /work/SRC/openSUSE:Factory/.velum.new/velum.changes 2018-04-11 
14:04:53.144526877 +0200
@@ -1,0 +2,88 @@
+Mon Apr  9 18:30:36 UTC 2018 - containers-bugow...@suse.de
+
+- Commit 349e38b by James Mason jma...@suse.com
+ Add cursor: pointer to .instance-type-box
+ 
+ re: https://github.com/kubic-project/velum/pull/488#issuecomment-378876002
+ re:
+ https://github.com/kubic-project/velum/pull/449#pullrequestreview-101140932
+ 
+ Commit 47044f0 by James Mason jma...@suse.com
+ PubCloud#Azure Add a help link for authentication inputs
+ 
+ Commit 5b175f3 by James Mason jma...@suse.com
+ PubCloud#UI Resize input fields on public cloud bootstrap
+ 
+ ... based on actual browser testing
+ 
+ Commit c1e842c by James Mason jma...@suse.com
+ PubCloud#Azure Add an input when bootrapping on Azure
+ 
+ The storage_account attribute was discovered to be required, not optional.
+
+
+-------------------------------------------------------------------
+Mon Apr  9 11:58:32 UTC 2018 - containers-bugow...@suse.de
+
+- Commit ee7e6f1 by Vítor Avelino cont...@vitoravelino.me
+ Fixed # of masters warning when adding a new master
+ 
+ This patch fixes the warning that was being shown when the user selected a
+ new master node to be added and it wasn't breaking the odd number constraint.
+ Before this, the current assigned masters were not being considered to
+ show/not show the warning.
+ 
+ Now the warning will only be shown if the number of masters to be added
+ breaks the constraint as it's expected to be.
+ 
+ bsc#1087267
+ 
+ Signed-off-by: Vítor Avelino <cont...@vitoravelino.me>
+
+
+-------------------------------------------------------------------
+Fri Apr  6 08:49:08 UTC 2018 - containers-bugow...@suse.de
+
+- Commit 6171165 by Vítor Avelino cont...@vitoravelino.me
+ Fixed # of masters warning when removing worker
+ 
+ This patch fixes the warning modal that was being shown when the cluster was
+ in an unsupported configuration (even # masters) and user was trying to
+ remove a normal worker node. This scenario should trigger that warning modal.
+ 
+ bsc#1087123
+ 
+ Signed-off-by: Vítor Avelino <cont...@vitoravelino.me>
+
+
+-------------------------------------------------------------------
+Fri Apr  6 08:45:44 UTC 2018 - containers-bugow...@suse.de
+
+- Commit 03c5c49 by Vítor Avelino cont...@vitoravelino.me
+ Hide CPI panel when no cloud framework
+ 
+ When no cloud:framework pillar is set, it means that CaaSP is not running in
+ a cloud environment. So it doesn't make sense to show that option in that
+ scenario.
+ 
+ feature#cpi
+ 
+ Signed-off-by: Vítor Avelino <cont...@vitoravelino.me>
+
+
+-------------------------------------------------------------------
+Thu Apr  5 08:06:35 UTC 2018 - containers-bugow...@suse.de
+
+- Commit ff412c6 by James Mason jma...@suse.com
+ Correct rubocop target ruby version
+ 
+ Rubcop only considers major.minor:
+ https://github.com/bbatsov/rubocop/issues/2663
+ 
+ Commit 81f7409 by James Mason jma...@suse.com
+ Update preferred ruby dev version to match SLE12 release
+ 
+ 2.1.2 -> 2.1.9
+
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ velum.spec ++++++
--- /var/tmp/diff_new_pack.P3Vg1t/_old  2018-04-11 14:04:54.288485538 +0200
+++ /var/tmp/diff_new_pack.P3Vg1t/_new  2018-04-11 14:04:54.288485538 +0200
@@ -23,7 +23,7 @@
 # Version:      1.0.0
 # %%define branch 1.0.0
 
-Version:        3.0.0+dev+git_r703_df2128664b7874c6a1ace8bd622484e95db32af9
+Version:        3.0.0+dev+git_r717_cf9fe3cc189a6efc1b972ff3e7a724202bb75f7b
 Release:        0
 %define branch master
 Summary:        Dashboard for CaasP
@@ -96,7 +96,7 @@
 %description
 velum is the dashboard for CaasP to manage and deploy kubernetes clusters on 
top of MicroOS
 
-This package has been built with commit 
df2128664b7874c6a1ace8bd622484e95db32af9 from branch master on date Wed, 04 Apr 
2018 09:32:21 +0000
+This package has been built with commit 
cf9fe3cc189a6efc1b972ff3e7a724202bb75f7b from branch master on date Mon, 09 Apr 
2018 18:29:58 +0000
 
 %prep
 %setup -q -n velum-%{branch}

++++++ master.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/velum-master/.rubocop.yml 
new/velum-master/.rubocop.yml
--- old/velum-master/.rubocop.yml       2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/.rubocop.yml       2018-04-09 20:30:07.000000000 +0200
@@ -56,7 +56,7 @@
     - spec/features/**/*
 
 AllCops:
-  TargetRubyVersion: 2.1.9
+  TargetRubyVersion: 2.1
   TargetRailsVersion: 4.2
 
   DisplayCopNames: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/velum-master/.ruby-version 
new/velum-master/.ruby-version
--- old/velum-master/.ruby-version      2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/.ruby-version      2018-04-09 20:30:07.000000000 +0200
@@ -1 +1 @@
-2.1.2
+2.1.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/app/assets/javascripts/dashboard/dashboard.js 
new/velum-master/app/assets/javascripts/dashboard/dashboard.js
--- old/velum-master/app/assets/javascripts/dashboard/dashboard.js      
2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/app/assets/javascripts/dashboard/dashboard.js      
2018-04-09 20:30:07.000000000 +0200
@@ -116,6 +116,7 @@
           minions = allMinions;
           break;
         case "Unassigned":
+          State.assignedMinions = minions;
           minions = unassignedMinions;
           break;
         default:
@@ -562,10 +563,12 @@
 // begin unassigned
 function isAssignable() {
   var errors = [];
+  var masters = State.assignedMinions.filter(function (m) { return m.role === 
'master' });
 
   // We need an odd number of masters
-  if (selectedMastersLength() % 2 !== 0) {
-    errors.push('The number of masters to be added has to be an even number in 
order to maintain the odd constraint number in the cluster');
+  if (selectedMastersLength() > 0 &&
+      (masters.length + selectedMastersLength()) % 2 === 0) {
+    errors.push('The number of masters to be added needs to maintain the odd 
constraint number in the cluster');
   }
 
   // We need unique hostnames
@@ -874,6 +877,7 @@
 
 function canRemoveWithoutWarning(id) {
   var errors = [];
+  var minion = State.minions.find(function (m) { return m.minion_id === id });
   var newCluster = State.minions.filter(function(m) { return m.minion_id !== 
id });
   var masters = newCluster.filter(function (m) { return m.role === 'master' });
   var workers = newCluster.filter(function (m) { return m.role === 'worker' });
@@ -894,7 +898,7 @@
   }
 
   // We need an odd number of masters
-  if (masters.length % 2 !== 1) {
+  if (minion.role === 'master' && masters.length % 2 !== 1) {
     errors.push('The number of masters has to be an odd number');
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/app/assets/stylesheets/pages/instance_type.scss 
new/velum-master/app/assets/stylesheets/pages/instance_type.scss
--- old/velum-master/app/assets/stylesheets/pages/instance_type.scss    
2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/app/assets/stylesheets/pages/instance_type.scss    
2018-04-09 20:30:07.000000000 +0200
@@ -30,6 +30,8 @@
             background: $table-bg;
             color: $brand-success;
 
+            cursor: pointer;
+
             margin: 10px;
             padding: 10px;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/app/controllers/internal_api/v1/pillars_controller.rb 
new/velum-master/app/controllers/internal_api/v1/pillars_controller.rb
--- old/velum-master/app/controllers/internal_api/v1/pillars_controller.rb      
2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/app/controllers/internal_api/v1/pillars_controller.rb      
2018-04-09 20:30:07.000000000 +0200
@@ -99,6 +99,7 @@
         profiles:  {
           cluster_node: {
             size:                   Pillar.value(pillar: :cloud_worker_type),
+            storage_account:        Pillar.value(pillar: 
:cloud_storage_account),
             resource_group:         Pillar.value(pillar: 
:cloud_worker_resourcegroup),
             network_resource_group: Pillar.value(pillar: 
:cloud_worker_resourcegroup),
             network:                Pillar.value(pillar: :cloud_worker_net),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/velum-master/app/controllers/setup_controller.rb 
new/velum-master/app/controllers/setup_controller.rb
--- old/velum-master/app/controllers/setup_controller.rb        2018-04-04 
11:32:28.000000000 +0200
+++ new/velum-master/app/controllers/setup_controller.rb        2018-04-09 
20:30:07.000000000 +0200
@@ -198,7 +198,8 @@
     cloud_cluster = params.require(:cloud_cluster).permit(
       :subscription_id, :tenant_id, :client_id, :secret,
       :instance_type, :instance_type_custom, :instance_count,
-      :resource_group, :network_id, :subnet_id, :security_group_id
+      :resource_group, :storage_account,
+      :network_id, :subnet_id, :security_group_id
     )
     cloud_cluster["cloud_framework"] = Pillar.value(pillar: :cloud_framework)
     cloud_cluster
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/velum-master/app/helpers/setup_helper.rb 
new/velum-master/app/helpers/setup_helper.rb
--- old/velum-master/app/helpers/setup_helper.rb        2018-04-04 
11:32:28.000000000 +0200
+++ new/velum-master/app/helpers/setup_helper.rb        2018-04-09 
20:30:07.000000000 +0200
@@ -1,6 +1,10 @@
 # SetupHelper contains all the view helpers for the setup process.
 module SetupHelper
-  def cloud_provider_value
-    Pillar.value(pillar: :cloud_framework) || "openstack"
+  def cloud_framework_value
+    Pillar.value(pillar: :cloud_framework)
+  end
+
+  def cloud_provider_options?
+    ["openstack"].include?(cloud_framework_value)
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/velum-master/app/models/cloud_cluster.rb 
new/velum-master/app/models/cloud_cluster.rb
--- old/velum-master/app/models/cloud_cluster.rb        2018-04-04 
11:32:28.000000000 +0200
+++ new/velum-master/app/models/cloud_cluster.rb        2018-04-09 
20:30:07.000000000 +0200
@@ -7,7 +7,7 @@
     :instance_count, :instance_type, :instance_type_custom, :subnet_id,
     :security_group_id, # EC2 profile
     :subscription_id, :tenant_id, :client_id, :secret, # Azure provider
-    :resource_group, :network_id # Azure profile
+    :storage_account, :resource_group, :network_id # Azure profile
 
   def initialize(*args)
     super
@@ -44,6 +44,7 @@
     persist_to_pillar!(:azure_secret, @secret)
     # cloud.profile pillars
     persist_to_pillar!(:cloud_worker_type, @instance_type)
+    persist_to_pillar!(:cloud_storage_account, @storage_account)
     persist_to_pillar!(:cloud_worker_resourcegroup, @resource_group)
     persist_to_pillar!(:cloud_worker_net, @network_id)
     persist_to_pillar!(:cloud_worker_subnet, @subnet_id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/velum-master/app/models/pillar.rb 
new/velum-master/app/models/pillar.rb
--- old/velum-master/app/models/pillar.rb       2018-04-04 11:32:28.000000000 
+0200
+++ new/velum-master/app/models/pillar.rb       2018-04-09 20:30:07.000000000 
+0200
@@ -64,6 +64,8 @@
           "cloud:providers:azure:client_id",
         azure_secret:
           "cloud:providers:azure:secret",
+        cloud_storage_account:
+          "cloud:profiles:cluster_node:storage_account",
         cloud_worker_type:
           "cloud:profiles:cluster_node:size",
         cloud_worker_subnet:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/app/views/setup/cloud/_settings.html.slim 
new/velum-master/app/views/setup/cloud/_settings.html.slim
--- old/velum-master/app/views/setup/cloud/_settings.html.slim  2018-04-04 
11:32:28.000000000 +0200
+++ new/velum-master/app/views/setup/cloud/_settings.html.slim  2018-04-09 
20:30:07.000000000 +0200
@@ -1,18 +1,19 @@
-.cloud-settings-wrapper
-  .cloud-settings-panel.panel.panel-default
-    .panel-heading.clearfix
-      h3.panel-title
-        | Cloud provider integration
-        | &nbsp;
-        i class='glyphicon glyphicon-info-sign' title="If running on a 
supported cloud provider, this enables Kubernetes' integration features, such 
as load-balancing and persistent storage."
-      .btn-group.btn-group-sm.btn-group-toggle.pull-right data-toggle="buttons"
-        = label_tag :cloud_provider, nil, class: "enable-cpi btn btn-default 
#{'btn-primary active' if @cloud_provider}", data: {toggle: "collapse", target: 
".cloud-settings-panel-body"}
-          = f.radio_button :cloud_provider, cloud_provider_value, checked: 
@cloud_provider.present?
-          | Enable
-        = label_tag :cloud_provider, nil, class: "disable-cpi btn btn-default 
#{'btn-primary active'    unless @cloud_provider}", data: {toggle: "collapse", 
target: ".cloud-settings-panel-body"}
-          = f.radio_button :cloud_provider, "disable", checked: 
@cloud_provider.blank?
-          | Disable
+- if cloud_framework_value
+  .cloud-settings-wrapper
+    .cloud-settings-panel.panel.panel-default
+      .panel-heading.clearfix
+        h3.panel-title
+          | Cloud provider integration
+          | &nbsp;
+          i class='glyphicon glyphicon-info-sign' title="If running on a 
supported cloud provider, this enables Kubernetes' integration features, such 
as load-balancing and persistent storage."
+        .btn-group.btn-group-sm.btn-group-toggle.pull-right 
data-toggle="buttons"
+          = label_tag :cloud_provider, nil, class: "enable-cpi btn btn-default 
#{'btn-primary active' if @cloud_provider}", data: {toggle: "collapse", target: 
".cloud-settings-panel-body"}
+            = f.radio_button :cloud_provider, cloud_framework_value, checked: 
@cloud_provider.present?
+            | Enable
+          = label_tag :cloud_provider, nil, class: "disable-cpi btn 
btn-default #{'btn-primary active'    unless @cloud_provider}", data: {toggle: 
"collapse", target: ".cloud-settings-panel-body"}
+            = f.radio_button :cloud_provider, "disable", checked: 
@cloud_provider.blank?
+            | Disable
 
-    .cloud-settings-panel-body.panel-collapse.collapse class="#{'in' if 
@cloud_provider.present?} #{'hidden' if cloud_provider_value != 'openstack'}"
-      .panel-body
-        = render partial: 'setup/cloud/openstack_configuration', locals: { f: 
f }
\ No newline at end of file
+      .cloud-settings-panel-body.panel-collapse.collapse class="#{'in' if 
@cloud_provider.present?} #{'hidden' unless cloud_provider_options?}"
+        .panel-body
+          = render partial: 'setup/cloud/openstack_configuration', locals: { 
f: f }
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/app/views/setup/worker_bootstrap_azure.html.slim 
new/velum-master/app/views/setup/worker_bootstrap_azure.html.slim
--- old/velum-master/app/views/setup/worker_bootstrap_azure.html.slim   
2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/app/views/setup/worker_bootstrap_azure.html.slim   
2018-04-09 20:30:07.000000000 +0200
@@ -15,23 +15,28 @@
     .panel-heading
       h3.panel-title Service Principal Authentication
     .panel-body
-      .col-md-4
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_subscription_id" Subscription ID
           = form.text_field :subscription_id, class: "form-control"
-      .col-md-4
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_tenant_id" Tenant ID
           = form.text_field :tenant_id, class: "form-control"
-      .col-md-4
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_client_id" Application ID
           = form.text_field :client_id, class: "form-control"
-      .col-md-4
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_secret" Client Secret
           = form.password_field :secret, class: "form-control"
-
+    .panel-footer
+      h4 Tip
+      p
+        ' Questions about services principals? Check out the
+        = link_to("Azure documentation", 
"https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal";)
+        ' .
 
   = render "instance_type_panel",
     form: form,
@@ -43,15 +48,19 @@
     .panel-heading
       h3.panel-title Resource Scopes
     .panel-body
-      .col-md-3
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_resource_group" Resource Group
           = form.text_field :resource_group, class: "form-control"
-      .col-md-3
+      .col-lg-3.col-md-6
+        .form-group
+          label for="cloud_cluster_storage_account" Storage Account
+          = form.text_field :storage_account, class: "form-control"
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_network_id" Network
           = form.text_field :network_id, class: "form-control"
-      .col-md-3
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_subnet_id" Subnet
           = form.text_field :subnet_id, class: "form-control"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/app/views/setup/worker_bootstrap_ec2.html.slim 
new/velum-master/app/views/setup/worker_bootstrap_ec2.html.slim
--- old/velum-master/app/views/setup/worker_bootstrap_ec2.html.slim     
2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/app/views/setup/worker_bootstrap_ec2.html.slim     
2018-04-09 20:30:07.000000000 +0200
@@ -21,11 +21,11 @@
     .panel-heading
       h3.panel-title Networking
     .panel-body
-      .col-md-4
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_subnet_id" Subnet ID
           = form.text_field :subnet_id, class: "form-control"
-      .col-md-4
+      .col-lg-3.col-md-6
         .form-group
           label for="cloud_cluster_security_group_id" Security Group ID
           = form.text_field :security_group_id, class: "form-control"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/spec/controllers/internal_api/v1/pillars_controller_spec.rb 
new/velum-master/spec/controllers/internal_api/v1/pillars_controller_spec.rb
--- 
old/velum-master/spec/controllers/internal_api/v1/pillars_controller_spec.rb    
    2018-04-04 11:32:28.000000000 +0200
+++ 
new/velum-master/spec/controllers/internal_api/v1/pillars_controller_spec.rb    
    2018-04-09 20:30:07.000000000 +0200
@@ -153,6 +153,7 @@
     let(:resource_group) { "azureresourcegroup" }
     let(:subnet_id) { "azuresubnetname" }
     let(:network_id) { "azurenetworkname" }
+    let(:storage_account) { "azurestorageaccount" }
 
     let(:expected_response) do
       {
@@ -170,6 +171,7 @@
           profiles:  {
             cluster_node: {
               size:                   custom_instance_type,
+              storage_account:        storage_account,
               resource_group:         resource_group,
               network_resource_group: resource_group,
               network:                network_id,
@@ -224,6 +226,11 @@
         pillar: "cloud:profiles:cluster_node:resourcegroup",
         value:  resource_group
       )
+      create(
+        :pillar,
+        pillar: "cloud:profiles:cluster_node:storage_account",
+        value:  storage_account
+      )
     end
 
     it "has cloud configuration" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/spec/controllers/setup_controller_spec.rb 
new/velum-master/spec/controllers/setup_controller_spec.rb
--- old/velum-master/spec/controllers/setup_controller_spec.rb  2018-04-04 
11:32:28.000000000 +0200
+++ new/velum-master/spec/controllers/setup_controller_spec.rb  2018-04-09 
20:30:07.000000000 +0200
@@ -226,6 +226,7 @@
     let(:client_id) { SecureRandom.uuid }
     let(:secret) { SecureRandom.hex(16) }
     let(:resource_group) { "azureresourcegroup" }
+    let(:storage_account) { "azurestorageaccount" }
     let(:subnet_id) { "azuresubnetname" }
     let(:network_id) { "azurenetworkname" }
     let(:cloud_cluster_params) do
@@ -238,7 +239,8 @@
         instance_count:  instance_count,
         resource_group:  resource_group,
         network_id:      network_id,
-        subnet_id:       subnet_id
+        subnet_id:       subnet_id,
+        storage_account: storage_account
       }
     end
 
@@ -286,6 +288,10 @@
         expect(assigns(:cloud_cluster).resource_group).to eq(resource_group)
       end
 
+      it "assigns the Azure storage account" do
+        expect(assigns(:cloud_cluster).storage_account).to eq(storage_account)
+      end
+
       it "assigns the Azure network id" do
         expect(assigns(:cloud_cluster).network_id).to eq(network_id)
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/spec/features/add_unassigned_nodes_feature_spec.rb 
new/velum-master/spec/features/add_unassigned_nodes_feature_spec.rb
--- old/velum-master/spec/features/add_unassigned_nodes_feature_spec.rb 
2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/spec/features/add_unassigned_nodes_feature_spec.rb 
2018-04-09 20:30:07.000000000 +0200
@@ -59,14 +59,29 @@
     expect(page).to have_button(value: "Add nodes", disabled: true)
   end
 
-  it "A user cannot add odd number of master nodes" do
+  it "cannot add a number (even) of master nodes that breaks the odd 
constraint" do
     minion = Minion.create!(minion_id: SecureRandom.hex, fqdn: 
"minion2.k8s.local")
 
     # select only one master node
     find(".minion_#{minion.id} .master-btn").click
 
     click_button "Add nodes"
-    expect(page).to have_content("The number of masters to be added has to be 
an even number")
+    expect(page).to have_content("The number of masters to be added needs to 
maintain")
+    expect(page).to have_button(value: "Add nodes", disabled: true)
+  end
+
+  it "cannot add a number (odd) of master nodes that breaks the odd 
constraint" do
+    minion = Minion.create!(minion_id: SecureRandom.hex, fqdn: 
"minion2.k8s.local")
+    minion2 = Minion.create!(minion_id: SecureRandom.hex, fqdn: 
"minion3.k8s.local")
+    minion3 = Minion.create!(minion_id: SecureRandom.hex, fqdn: 
"minion4.k8s.local")
+
+    # select only one master node
+    find(".minion_#{minion.id} .master-btn").click
+    find(".minion_#{minion2.id} .master-btn").click
+    find(".minion_#{minion3.id} .master-btn").click
+
+    click_button "Add nodes"
+    expect(page).to have_content("The number of masters to be added needs to 
maintain")
     expect(page).to have_button(value: "Add nodes", disabled: true)
   end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/spec/features/bootstrap_settings_feature_spec.rb 
new/velum-master/spec/features/bootstrap_settings_feature_spec.rb
--- old/velum-master/spec/features/bootstrap_settings_feature_spec.rb   
2018-04-04 11:32:28.000000000 +0200
+++ new/velum-master/spec/features/bootstrap_settings_feature_spec.rb   
2018-04-09 20:30:07.000000000 +0200
@@ -50,40 +50,36 @@
   end
 
   context "CPI configuration", js: true do
-    it "shows panel settings" do
-      expect(page).to have_content("Cloud provider integration")
-    end
-
-    it "shows custom settings for openstack" do
-      find(".enable-cpi").click
-      expect(page).to have_css(".cloud-settings-panel-body.in")
-      expect(page).to have_content("Keystone API URL")
-    end
-
-    it "attaches openstack value when no cloud framework is set" do
-      expect(page).to have_css("input[value=openstack]")
+    context "when no cloud framework is set" do
+      it "hides panel settings" do
+        expect(page).not_to have_content("Cloud provider integration")
+      end
     end
 
     context "when cloud framework is set" do
-      it "attaches ec2 value when AWS" do
-        Pillar.create(pillar: "cloud:framework", value: "ec2")
-
+      before do
+        Pillar.create(pillar: "cloud:framework", value: "openstack")
         visit setup_path
-        expect(page).to have_css("input[value=ec2]")
       end
 
-      it "shows GCE option when gce" do
-        Pillar.create(pillar: "cloud:framework", value: "gce")
+      it "shows panel settings" do
+        expect(page).to have_content("Cloud provider integration")
+      end
 
-        visit setup_path
-        expect(page).to have_css("input[value=gce]")
+      it "shows custom settings for openstack" do
+        find(".enable-cpi").click
+        expect(page).to have_css(".cloud-settings-panel-body.in")
+        expect(page).to have_content("Keystone API URL")
       end
 
-      it "shows Azure option when azure" do
-        Pillar.create(pillar: "cloud:framework", value: "azure")
+      it "attaches cloud framework value" do
+        expect(page).to have_css("input[value=openstack]")
+
+        Pillar.find_by(pillar: "cloud:framework").destroy
+        Pillar.create(pillar: "cloud:framework", value: "ec2")
 
         visit setup_path
-        expect(page).to have_css("input[value=azure]")
+        expect(page).to have_css("input[value=ec2]")
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/velum-master/spec/features/node_removal_feature_spec.rb 
new/velum-master/spec/features/node_removal_feature_spec.rb
--- old/velum-master/spec/features/node_removal_feature_spec.rb 2018-04-04 
11:32:28.000000000 +0200
+++ new/velum-master/spec/features/node_removal_feature_spec.rb 2018-04-09 
20:30:07.000000000 +0200
@@ -22,7 +22,7 @@
     setup_stubbed_update_status!(stubbed: stubbed)
     setup_stubbed_pending_minions!(stubbed: [minions[3].minion_id])
 
-    allow(Velum::Salt).to receive(:removal_orchestration)
+    allow(Orchestration).to receive(:run).and_return(true)
 
     visit authenticated_root_path
   end
@@ -38,11 +38,19 @@
     expect(page).not_to have_link("Remove")
   end
 
-  context "with successful orchestration" do
-    before do
-      allow(Orchestration).to receive(:run).and_return(true)
-    end
+  it "does not show warning modal when removing worker and # masters is even" 
do
+    # removed one master to put cluster in unsupported configuration
+    minions[0].destroy
+
+    visit authenticated_root_path
+    worker_selector = ".remove-node-link[data-id='#{minions[3].minion_id}']"
 
+    find(worker_selector).click
+    expect(page).to have_css(worker_selector, text: "Pending removal")
+    expect(page).not_to have_content("Invalid cluster topology")
+  end
+
+  context "with successful orchestration" do
     it "changes 'Remove' link to 'Pending removal' on specific row" do
       worker_selector = ".remove-node-link[data-id='#{minions[3].minion_id}']"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/velum-master/spec/helpers/setup_helper_spec.rb 
new/velum-master/spec/helpers/setup_helper_spec.rb
--- old/velum-master/spec/helpers/setup_helper_spec.rb  2018-04-04 
11:32:28.000000000 +0200
+++ new/velum-master/spec/helpers/setup_helper_spec.rb  2018-04-09 
20:30:07.000000000 +0200
@@ -1,24 +1,26 @@
 require "rails_helper"
 
 RSpec.describe SetupHelper, type: :helper do
-  describe "#cloud_provider_value" do
-    it "returns openstack by default" do
-      expect(cloud_provider_value).to eq("openstack")
-    end
+  describe "#cloud_framework_value" do
+    it "returns whatever value cloud:framework is set" do
+      p = Pillar.create(pillar: "cloud:framework", value: "ec2")
+      expect(cloud_framework_value).to eq("ec2")
 
-    it "returns ec2 options when cloud:framework is aws" do
-      Pillar.create(pillar: "cloud:framework", value: "ec2")
-      expect(cloud_provider_value).to eq("ec2")
+      p.value = "gce"
+      p.save
+      expect(cloud_framework_value).to eq("gce")
     end
+  end
 
-    it "returns gce options when cloud:framework is gce" do
-      Pillar.create(pillar: "cloud:framework", value: "gce")
-      expect(cloud_provider_value).to eq("gce")
+  describe "#cloud_provider_options?" do
+    it "returns true if has advanced settings available (e.g. openstack)" do
+      Pillar.create(pillar: "cloud:framework", value: "openstack")
+      expect(cloud_provider_options?).to eq(true)
     end
 
-    it "returns azure options when cloud:framework is azure" do
-      Pillar.create(pillar: "cloud:framework", value: "azure")
-      expect(cloud_provider_value).to eq("azure")
+    it "returns false if no advanced settings available (e.g. gce)" do
+      Pillar.create(pillar: "cloud:framework", value: "gce")
+      expect(cloud_provider_options?).to eq(false)
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/velum-master/spec/models/cloud_cluster_spec.rb 
new/velum-master/spec/models/cloud_cluster_spec.rb
--- old/velum-master/spec/models/cloud_cluster_spec.rb  2018-04-04 
11:32:28.000000000 +0200
+++ new/velum-master/spec/models/cloud_cluster_spec.rb  2018-04-09 
20:30:07.000000000 +0200
@@ -12,6 +12,7 @@
   let(:subnet_id) { "subnet-9d4a7b6c" }
   let(:security_group_id) { "sg-903004f8" }
   let(:instance_count) { 5 }
+  let(:storage_account) { "azurestorageaccount" }
 
   it "can implicitly represent a custom instance type" do
     cluster = described_class.new(instance_type_custom: custom_instance_type)
@@ -144,7 +145,8 @@
         instance_type:   custom_instance_type,
         resource_group:  resource_group,
         network_id:      network_id,
-        subnet_id:       subnet_id
+        subnet_id:       subnet_id,
+        storage_account: storage_account
       )
     end
 
@@ -176,6 +178,13 @@
       expect(Pillar.value(pillar: :azure_secret)).to eq(secret)
     end
 
+    it "stores storage account as :cloud_storage_account Pillar and refreshes" 
do
+      ensure_pillar_refresh do
+        expect(cluster.save).to be(true)
+      end
+      expect(Pillar.value(pillar: :cloud_storage_account)).to 
eq(storage_account)
+    end
+
     it "stores instance type as :cloud_worker_type Pillar and refreshes" do
       ensure_pillar_refresh do
         expect(cluster.save).to be(true)


Reply via email to