staypuft 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/staypuft/interface_assignments_controller.rb +10 -4
- data/app/lib/staypuft/network_query.rb +1 -1
- data/app/models/staypuft/deployment/cinder_service.rb +3 -3
- data/app/views/staypuft/steps/_cinder.html.erb +2 -1
- data/lib/staypuft/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18a9a8aa4dbeac91c1b58bd703873461aa53198a
|
4
|
+
data.tar.gz: 8a8311dcb6ff38ffa3fa6f3286538059b362be15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ccd0d9a1e917e1820912ef93553713841fd9d98cad32416ee10782f76de0fab095aa39669b2d209a26155e19a52a25a5781173484177dd6d229f41e27305754
|
7
|
+
data.tar.gz: 76ec7bc0494fecbf09bd96ca9ca24648d6d17c6f47dc8aa8210697e1eddedf2ddffc789c818e5c6328b450ce4801c77103a65f85121071723fed463b26216841
|
@@ -3,7 +3,9 @@ module Staypuft
|
|
3
3
|
layout false
|
4
4
|
def index
|
5
5
|
@deployment = Deployment.find(params[:deployment_id])
|
6
|
-
|
6
|
+
host_ids = params[:host_ids]
|
7
|
+
host_ids = host_ids.split(',') unless host_ids.is_a? Array
|
8
|
+
@hosts = Host::Managed.where(:id => host_ids).includes(:interfaces)
|
7
9
|
@subnets = @deployment.subnets.uniq
|
8
10
|
@host = @hosts.first
|
9
11
|
@interfaces = @host ? @host.interfaces.where("type <> 'Nic::BMC'").non_vip.order(:identifier).physical : []
|
@@ -23,7 +25,9 @@ module Staypuft
|
|
23
25
|
def create
|
24
26
|
@errors = {}
|
25
27
|
@deployment = Deployment.find(params[:deployment_id])
|
26
|
-
|
28
|
+
host_ids = params[:host_ids]
|
29
|
+
host_ids = host_ids.split(',') unless host_ids.is_a? Array
|
30
|
+
@hosts = Host::Managed.where(:id => host_ids)
|
27
31
|
@hosts.each do |host|
|
28
32
|
@interface = host.interfaces.find_by_identifier(params[:interface]) || host
|
29
33
|
@subnet = Subnet.find(params[:subnet_id])
|
@@ -37,7 +41,9 @@ module Staypuft
|
|
37
41
|
def destroy
|
38
42
|
@errors = {}
|
39
43
|
@deployment = Deployment.find(params[:deployment_id])
|
40
|
-
|
44
|
+
host_ids = params[:host_ids]
|
45
|
+
host_ids = host_ids.split(',') unless host_ids.is_a? Array
|
46
|
+
@hosts = Host::Managed.where(:id => host_ids)
|
41
47
|
@hosts.each do |host|
|
42
48
|
@interface = host.interfaces.find_by_identifier(params[:interface]) || host
|
43
49
|
@subnet = Subnet.find(params[:subnet_id])
|
@@ -71,7 +77,7 @@ module Staypuft
|
|
71
77
|
end
|
72
78
|
|
73
79
|
def get_interfaces_to_compare(host)
|
74
|
-
host.interfaces.where("type <> 'Nic::BMC'").order(:identifier)
|
80
|
+
host.interfaces.non_vip.where("type <> 'Nic::BMC'").order(:identifier)
|
75
81
|
end
|
76
82
|
end
|
77
83
|
end
|
@@ -58,7 +58,7 @@ module Staypuft
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def controller_ip(subnet_type_name)
|
61
|
-
ip_for_host(controllers.tap { |v| v.size == 1 or raise }.first, subnet_type_name)
|
61
|
+
ip_for_host(controllers.tap { |v| v.size == 1 or raise('only one controller is allowed') }.first, subnet_type_name)
|
62
62
|
end
|
63
63
|
|
64
64
|
def controller_fqdns
|
@@ -148,14 +148,14 @@ module Staypuft
|
|
148
148
|
if self.deployment.ha?
|
149
149
|
params.delete :backend_lvm
|
150
150
|
end
|
151
|
-
unless params.detect(lambda { false }) { |field| field }
|
152
|
-
errors
|
151
|
+
unless params.detect(lambda { false }) { |field| self.send(field) == "true" }
|
152
|
+
errors.add :base, _("At least one storage backend must be selected")
|
153
153
|
end
|
154
154
|
end
|
155
155
|
|
156
156
|
def equallogic_backends
|
157
157
|
unless self.eqlxs.all? { |item| item.valid? }
|
158
|
-
errors
|
158
|
+
errors.add :base, _("Please fix the problems in selected backends")
|
159
159
|
end
|
160
160
|
end
|
161
161
|
end
|
@@ -2,7 +2,8 @@
|
|
2
2
|
<h5><%= _(Staypuft::Deployment::CinderService::DriverBackend::HUMAN) %></h5>
|
3
3
|
<div class="col-md-12 clearfix cinderPicker" id="cinderPicker">
|
4
4
|
<%= f.fields_for :cinder, @deployment.cinder do |p| %>
|
5
|
-
|
5
|
+
<%= base_errors_for @deployment.cinder %>
|
6
|
+
<div class="form-group <%= @deployment.cinder.errors.empty? ? "" : 'has-error' %> hide"></div>
|
6
7
|
<%= check_box_f_non_inline(p, :backend_nfs,
|
7
8
|
:checked_value => 'true',
|
8
9
|
:unchecked_value => 'false',
|
data/lib/staypuft/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: staypuft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Staypuft team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks
|