staypuft 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecedbdd2ea81a9ce7287d7cdbe5382f8ce86e5a3
4
- data.tar.gz: cb2332dab9ceda616c083f1a2196f13c3a7cf10f
3
+ metadata.gz: 17db35905779581497986043c56782829969ded1
4
+ data.tar.gz: 8110916cfe794b3531fd11532e4ff800882aafce
5
5
  SHA512:
6
- metadata.gz: 9418075d837ba35a8be9a79a02e9aa5e5e64a4ed0b8f8c89c7ded7e47f4a61dca4a5c0ced030e14c75fa1cb63758de6ea114f97c86e661647cdc881ca42e933e
7
- data.tar.gz: f5d1961cfb88f300bd0c932112125a755a7b769f3a0e7911ad0e648b0c5c692bc1cff71a7b80b6bc937df3a0de732481b86dcc51f37b26dfb17463cb754c2c32
6
+ metadata.gz: 29f22381981d26709e8c81bbd7505947a4951d48a5508690ef7261bf47afc2662cac7f838b76d140a3fa8980fb9cc605ca73c6204181bc1636e06f4e2777814c
7
+ data.tar.gz: ed56ecce9c8713e1a30199c379b96984894c6a15b95ed8d6e036fbf74078d6729d3752bd87164c14bea2f50577154df6bc924faac10011b49456bb04273a6bc8
@@ -1,141 +1,97 @@
1
- function find_network_interface_field(fieldset, field, html_input_type) {
2
- label = fieldset.find("label[for='" + field + "']");
3
- html_input = label.parent().find(html_input_type);
1
+ $(function() {
2
+ function find_network_interface_field(fieldset, field, html_input_type) {
3
+ label = fieldset.find("label[for='" + field + "']");
4
+ html_input = label.parent().find(html_input_type);
4
5
 
5
- return html_input;
6
- };
6
+ return html_input;
7
+ }
7
8
 
8
9
 
9
- $(document).ready(function() {
10
- update_fencing_form();
11
- // NOTE: setTimeout is required to make sure this code runs after all event
12
- // handlers are set, so they can be overridden.
13
- setTimeout(function() {
14
- override_ajax_submit();
15
- }, 1);
16
- });
17
-
18
- function override_ajax_submit() {
19
- // NOTE: method defined in app/assets/javascripts/host_edit.js but modified
20
- // so the URL points to staypuft/hosts controller.
21
- function submit_host(){
22
- var url = window.location.pathname.replace(/\/edit$|\/new$/,'');
23
- url = url.replace(/\/hosts/,'\/staypuft/hosts')
24
- if(/\/clone$/.test(window.location.pathname)){ url = foreman_url('/staypuft/hosts'); }
25
- $('#host_submit').attr('disabled', true);
26
- stop_pooling = false;
27
- $("body").css("cursor", "progress");
28
- clear_errors();
29
- animate_progress();
30
-
31
- $.ajax({
32
- type:'POST',
33
- url: url,
34
- data: $('form').serialize(),
35
- success: function(response){
36
- if(response.redirect){
37
- window.location.replace(response.redirect);
38
- }
39
- else{
40
- $("#host-progress").hide();
41
- $('#content').replaceWith($("#content", response));
42
- $(document.body).trigger('ContentLoad');
43
- if($("[data-history-url]").exists()){
44
- history.pushState({}, "Host show", $("[data-history-url]").data('history-url'));
45
- }
46
- }
47
- },
48
- error: function(response){
49
- $('#content').html(response.responseText);
50
- },
51
- complete: function(){
52
- stop_pooling = true;
53
- $("body").css("cursor", "auto");
54
- $('#host_submit').attr('disabled', false);
55
- }
10
+ function get_bmc_interface_form() {
11
+ return $('fieldset#interface').filter(function(index, fieldset){
12
+ type = find_network_interface_field($(fieldset), 'type', 'select');
13
+ return type.val() == 'Nic::BMC';
56
14
  });
57
- return false;
58
15
  }
59
16
 
60
- $(document).off('submit').on('submit',"[data-submit='progress_bar']", function() {
61
- submit_host();
62
- return false;
63
- });
64
- };
17
+ update_fencing_form();
18
+ $(document).on('change', 'fieldset#interface', function() { update_fencing_form(); });
19
+ function update_fencing_form() {
20
+ bmc_fieldset = get_bmc_interface_form();
21
+ if (bmc_fieldset.length == 0) {
22
+ disable_fencing_form();
23
+ return;
24
+ } else {
25
+ enable_fencing_form();
26
+ }
27
+
28
+ selected_provider = find_network_interface_field(bmc_fieldset, 'provider', 'select');
29
+
30
+ ip = find_network_interface_field(bmc_fieldset, 'ip', 'input').val();
31
+ $('#host_fencing_fence_ipmilan_address').val(ip);
32
+ username = find_network_interface_field(bmc_fieldset, 'username', 'input').val();
33
+ $('#host_fencing_fence_ipmilan_username').val(username);
34
+ password = find_network_interface_field(bmc_fieldset, 'password', 'input').val();
35
+ $('#host_fencing_fence_ipmilan_password').val(password);
36
+ }
65
37
 
38
+ $(document).on('click', 'fieldset#interface a.remove_nested_fields', function() { check_existence_of_bmc_interface(); });
39
+ function check_existence_of_bmc_interface() {
40
+ visible_bmc_forms = $.grep(get_bmc_interface_form(), function(fieldset) {
41
+ // NOTE: The second part of the condition is necessary because Foreman
42
+ // inserts the form to the DOM tree incorrectly after the second
43
+ // time
44
+ return $(fieldset).parent().is(':visible') && $(fieldset).find(':first').is(':visible');
45
+ });
66
46
 
67
- $(document).on('change', 'fieldset#interface', function() { update_fencing_form(); });
68
- function update_fencing_form() {
69
- bmc_fieldset = get_bmc_interface_form();
70
- if (bmc_fieldset.length == 0) {
71
- disable_fencing_form();
72
- return;
73
- } else {
74
- enable_fencing_form();
47
+ if(visible_bmc_forms.length == 0) {
48
+ disable_fencing_form();
49
+ }
75
50
  }
76
51
 
77
- selected_provider = find_network_interface_field(bmc_fieldset, 'provider', 'select');
78
-
79
- ip = find_network_interface_field(bmc_fieldset, 'ip', 'input').val();
80
- $('#host_fencing_attrs_fence_ipmilan_address').val(ip);
81
- username = find_network_interface_field(bmc_fieldset, 'username', 'input').val();
82
- $('#host_fencing_attrs_fence_ipmilan_username').val(username);
83
- password = find_network_interface_field(bmc_fieldset, 'password', 'input').val();
84
- $('#host_fencing_attrs_fence_ipmilan_password').val(password);
85
- };
86
-
87
- function disable_fencing_form() {
88
- $('#fencing_form').hide();
89
- $('#fencing_disabled_notice').show();
90
- };
91
-
92
- function enable_fencing_form() {
93
- $('#fencing_disabled_notice').hide();
94
- $('#fencing_form').show();
95
- };
96
-
97
-
98
- $(document).on('change', '#fencing', function() { update_bmc_interface_form(); });
99
- function update_bmc_interface_form() {
100
- bmc_fieldset = get_bmc_interface_form();
101
- selected_provider = find_network_interface_field(bmc_fieldset, 'provider', 'select');
102
-
103
- ip = $('#host_fencing_attrs_fence_ipmilan_address').val();
104
- find_network_interface_field(bmc_fieldset, 'ip', 'input').val(ip);
105
- username = $('#host_fencing_attrs_fence_ipmilan_username').val();
106
- find_network_interface_field(bmc_fieldset, 'username', 'input').val(username);
107
- password = $('#host_fencing_attrs_fence_ipmilan_password').val();
108
- find_network_interface_field(bmc_fieldset, 'password', 'input').val(password);
109
- };
110
-
111
- function get_bmc_interface_form() {
112
- return $('fieldset#interface').filter(function(index, fieldset){
113
- type = find_network_interface_field($(fieldset), 'type', 'select');
114
- return type.val() == 'Nic::BMC';
115
- });
116
- };
52
+ function disable_fencing_form() {
53
+ $('#fencing_form').hide();
54
+ $('#fencing_disabled_notice').show();
55
+ }
56
+
57
+ function enable_fencing_form() {
58
+ $('#fencing_disabled_notice').hide();
59
+ $('#fencing_form').show();
60
+ }
61
+
62
+
63
+ $(document).on('change', '#fencing', function() { update_bmc_interface_form(); });
64
+ function update_bmc_interface_form() {
65
+ bmc_fieldset = get_bmc_interface_form();
66
+ selected_provider = find_network_interface_field(bmc_fieldset, 'provider', 'select');
67
+
68
+ ip = $('#host_fencing_fence_ipmilan_address').val();
69
+ find_network_interface_field(bmc_fieldset, 'ip', 'input').val(ip);
70
+ username = $('#host_fencing_fence_ipmilan_username').val();
71
+ find_network_interface_field(bmc_fieldset, 'username', 'input').val(username);
72
+ password = $('#host_fencing_fence_ipmilan_password').val();
73
+ find_network_interface_field(bmc_fieldset, 'password', 'input').val(password);
74
+ }
117
75
 
118
76
 
119
- $(document).ready(function() {
120
77
  $('fieldset#interface').each(function(idx, fieldset) {
121
78
  update_subnet_types(fieldset);
122
79
  });
123
- });
124
-
125
- $(document).on('change', 'fieldset#interface select.interface_subnet', function(event) {
126
- fieldset = $(event.target).parents('fieldset#interface');
127
- update_subnet_types(fieldset);
128
- });
129
- function update_subnet_types(fieldset) {
130
- subnet_select = find_network_interface_field($(fieldset), 'subnet_id', 'select');
131
- subnet_types = subnet_select.data('types');
132
- help_message = subnet_types[subnet_select.val()];
133
-
134
- if (!help_message || help_message == '') {
135
- subnet_select.parent().next().empty();
136
- return;
80
+ $(document).on('change', 'fieldset#interface select.interface_subnet', function(event) {
81
+ fieldset = $(event.target).parents('fieldset#interface');
82
+ update_subnet_types(fieldset);
83
+ });
84
+ function update_subnet_types(fieldset) {
85
+ subnet_select = find_network_interface_field($(fieldset), 'subnet_id', 'select');
86
+ subnet_types = subnet_select.data('types');
87
+ help_message = subnet_types[subnet_select.val()];
88
+
89
+ if (!help_message || help_message == '') {
90
+ subnet_select.parent().next().empty();
91
+ return;
92
+ }
93
+
94
+ subnet_select.parent().next().empty().append(
95
+ '<div><i class="glyphicon glyphicon-info-sign" /> ' + help_message + '</div>');
137
96
  }
138
-
139
- subnet_select.parent().next().empty().append(
140
- '<div><i class="glyphicon glyphicon-info-sign" /> ' + help_message + '</div>');
141
- };
97
+ });
@@ -67,6 +67,10 @@ module Staypuft
67
67
  gateway_hash_for_host(host)[:interface]
68
68
  end
69
69
 
70
+ def gateway_interface_mac(host=@host)
71
+ gateway_hash_for_host(host)[:mac]
72
+ end
73
+
70
74
  def controllers
71
75
  @controllers ||= @deployment.controller_hostgroup.hosts.order(:id)
72
76
  end
@@ -101,7 +105,7 @@ module Staypuft
101
105
  class Jail < Safemode::Jail
102
106
  allow :ip_for_host, :interface_for_host, :network_address_for_host,
103
107
  :controller_ip, :controller_ips, :controller_fqdns, :get_vip,
104
- :subnet_for_host, :gateway_subnet, :gateway_interface
108
+ :subnet_for_host, :gateway_subnet, :gateway_interface, :gateway_interface_mac
105
109
  end
106
110
 
107
111
  private
@@ -277,19 +277,19 @@ module Staypuft
277
277
  cinder_rbd_secret_uuid = { :string => '<%= @host.deployment.cinder.rbd_secret_uuid %>' }
278
278
 
279
279
  cinder_backend_eqlx = { :string => '<%= @host.deployment.cinder.equallogic_backend? %>' }
280
- cinder_backend_eqlx_name = ['eqlx_backend']
280
+ cinder_backend_eqlx_name = { :array => '<%= @host.deployment.cinder.compute_eqlx_backend_names %>'}
281
281
  # TODO: confirm these params and add them to model where user input is needed
282
282
  # below dynamic calls are commented out since the model does not yet have san/chap entries
283
283
  cinder_san_ip = { :array => '<%= @host.deployment.cinder.compute_eqlx_san_ips %>' }
284
284
  cinder_san_login = { :array => '<%= @host.deployment.cinder.compute_eqlx_san_logins %>' }
285
285
  cinder_san_password = { :array => '<%= @host.deployment.cinder.compute_eqlx_san_passwords %>' }
286
286
  cinder_eqlx_group_name = { :array => '<%= @host.deployment.cinder.compute_eqlx_group_names %>' }
287
- cinder_eqlx_pool = { :array => '<%= @host.deployment.cinder.compute_eqlx_pools %>'}
287
+ cinder_eqlx_pool = { :array => '<%= @host.deployment.cinder.compute_eqlx_pools %>' }
288
288
 
289
- cinder_san_thin_provision = ['false']
290
- cinder_eqlx_use_chap = ['false']
291
- cinder_eqlx_chap_login = ['']
292
- cinder_eqlx_chap_password = ['']
289
+ cinder_san_thin_provision = { :array => '<%= @host.deployment.cinder.compute_eqlx_thin_provision %>' }
290
+ cinder_eqlx_use_chap = { :array => '<%= @host.deployment.cinder.compute_eqlx_use_chap %>' }
291
+ cinder_eqlx_chap_login = { :array => '<%= @host.deployment.cinder.compute_eqlx_chap_logins %>' }
292
+ cinder_eqlx_chap_password = { :array => '<%= @host.deployment.cinder.compute_eqlx_chap_passwords %>' }
293
293
 
294
294
  # Keystone
295
295
  keystonerc = 'true'
@@ -0,0 +1,28 @@
1
+ module Staypuft
2
+ module Concerns
3
+ module HostFencingExtensions
4
+ extend ActiveSupport::Concern
5
+
6
+ FENCING_TYPES = {
7
+ 'fence_ipmilan' => 'IPMI'
8
+ }
9
+
10
+ included do
11
+ define_method :fencing do
12
+ instance_variable_get(:@fencing_config) or
13
+ instance_variable_set(:@fencing_config, ::Staypuft::Host::Fencing.new(self))
14
+ end
15
+
16
+ define_method :fencing= do |value|
17
+ fencing.update(value)
18
+ end
19
+
20
+ validates_associated :fencing
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ class ::Host::Managed::Jail < Safemode::Jail
27
+ allow :bmc_nic
28
+ end
@@ -19,10 +19,6 @@ module Staypuft
19
19
  end
20
20
  end
21
21
 
22
- class ::Host::Managed::Jail < Safemode::Jail
23
- allow :bmc_nic
24
- end
25
-
26
22
  class ::Nic::Base::Jail < Safemode::Jail
27
23
  allow :fencing_enabled?, :attrs, :username, :password, :expose_lanplus?
28
24
  end
@@ -5,12 +5,17 @@ module Staypuft
5
5
  include ActiveModel::Validations
6
6
  extend ActiveModel::Naming
7
7
 
8
- attr_accessor :id, :san_ip, :san_login, :san_password, :pool, :group_name
8
+ attr_accessor :id, :san_ip, :san_login, :san_password, :pool, :group_name,
9
+ :thin_provision, :use_chap, :chap_login, :chap_password
9
10
  attr_reader :errors
10
11
 
11
12
  def initialize(attrs = {})
12
13
  @errors = ActiveModel::Errors.new(self)
13
14
  self.attributes = attrs
15
+ self.thin_provision = false
16
+ self.use_chap = false
17
+ self.chap_login = ''
18
+ self.chap_password = ''
14
19
  end
15
20
 
16
21
  def self.human_attribute_name(attr, options = {})
@@ -22,7 +27,9 @@ module Staypuft
22
27
  end
23
28
 
24
29
  def attributes
25
- { 'san_ip' => nil, 'san_login' => nil, 'san_password' => nil, 'pool' => nil, 'group_name' => nil }
30
+ { 'san_ip' => nil, 'san_login' => nil, 'san_password' => nil, 'pool' => nil,
31
+ 'group_name' => nil, 'thin_provision' => nil, 'use_chap' => nil,
32
+ 'chap_login' => nil, 'chap_password' => nil }
26
33
  end
27
34
 
28
35
  def attributes=(attrs)
@@ -61,7 +61,9 @@ module Staypuft
61
61
  allow :lvm_backend?, :nfs_backend?, :ceph_backend?, :equallogic_backend?,
62
62
  :multiple_backends?, :rbd_secret_uuid, :nfs_uri, :eqlxs, :eqlxs_attributes=,
63
63
  :compute_eqlx_san_ips, :compute_eqlx_san_logins, :compute_eqlx_san_passwords,
64
- :compute_eqlx_group_names, :compute_eqlx_pools
64
+ :compute_eqlx_group_names, :compute_eqlx_pools, :compute_eqlx_thin_provision,
65
+ :compute_eqlx_use_chap, :compute_eqlx_chap_logins, :compute_eqlx_chap_passwords,
66
+ :compute_eqlx_backend_names
65
67
  end
66
68
 
67
69
  def set_defaults
@@ -121,12 +123,22 @@ module Staypuft
121
123
  Ptable.find_by_name('LVM with cinder-volumes')
122
124
  end
123
125
 
124
- %w{san_ip san_login san_password group_name pool}.each do |name|
126
+ %w{san_ip san_login san_password group_name pool chap_login chap_password}.each do |name|
125
127
  define_method "compute_eqlx_#{name}s" do
126
128
  self.eqlxs.collect { |e| e.send name }
127
129
  end
128
130
  end
129
131
 
132
+ %w{thin_provision use_chap}.each do |name|
133
+ define_method "compute_eqlx_#{name}" do
134
+ self.eqlxs.collect { |e| e.send name }
135
+ end
136
+ end
137
+
138
+ def compute_eqlx_backend_names
139
+ self.eqlxs.collect.with_index { |e,i| "eqlx_backend#{i+1}" }
140
+ end
141
+
130
142
  private
131
143
 
132
144
  def set_lvm_ptable
@@ -0,0 +1,55 @@
1
+ module Staypuft
2
+ module Host
3
+ class Fencing
4
+ include ActiveModel::Validations
5
+
6
+ FENCING_ATTRS = {
7
+ 'general' => ['fencing_enabled',
8
+ 'fencing_type'],
9
+ 'fence_ipmilan' => ['fence_ipmilan_address',
10
+ 'fence_ipmilan_username',
11
+ 'fence_ipmilan_password',
12
+ 'fence_ipmilan_expose_lanplus',
13
+ 'fence_ipmilan_lanplus_options']
14
+ }
15
+
16
+ validates :fencing_type, :presence => true, :if => Proc.new { |f|
17
+ f.fencing_enabled == '1' &&
18
+ @host.interfaces.any?{ |nic| nic.type == 'Nic::BMC' && !nic.marked_for_destruction? }
19
+ }
20
+
21
+ def initialize(host)
22
+ @host = host
23
+ FENCING_ATTRS.each do |key, attrs|
24
+ attrs.each do |name|
25
+ instance_var_name = :"@#{name}"
26
+ value = host.bmc_nic.attrs[name] if host.bmc_nic && host.bmc_nic.attrs.has_key?(name)
27
+ self.class.send(:define_method, name) do
28
+ instance_variable_get(instance_var_name) or
29
+ instance_variable_set(instance_var_name, value)
30
+ end
31
+ end
32
+ end
33
+ end
34
+
35
+ def update(values)
36
+ values.each do |key, value|
37
+ instance_var_name = :"@#{key}"
38
+ instance_variable_set(instance_var_name, value)
39
+ end
40
+
41
+ bmc_nics = @host.interfaces.select{ |interface| interface.type == "Nic::BMC" }
42
+ return if bmc_nics.empty?
43
+
44
+ bmc_nic = bmc_nics[0]
45
+ bmc_nic.attrs.merge!(values)
46
+ bmc_nic.save
47
+ end
48
+
49
+ # compatibility with validates_associated
50
+ def marked_for_destruction?
51
+ false
52
+ end
53
+ end
54
+ end
55
+ end
@@ -1,23 +1,21 @@
1
1
  <div id="fencing_form">
2
- <%= f.fields_for :fencing do |fencing_fields| %>
3
- <%= fencing_fields.fields_for :attrs do |attrs_fields| %>
4
- <%= checkbox_f attrs_fields, :fencing_enabled,
2
+ <%= f.fields_for :fencing, @host.fencing do |fencing_fields| %>
3
+ <%= checkbox_f fencing_fields, :fencing_enabled,
5
4
  label: _("Enable Fencing") %>
6
- <%= select_f attrs_fields, :fencing_type, [_("IPMI")], :to_s, :to_s,
5
+ <%= select_f fencing_fields, :fencing_type, ::Host::Managed::FENCING_TYPES, :first, :last,
7
6
  { include_blank: true },
8
7
  { label: _("Type") } %>
9
- <%= text_f attrs_fields, :fence_ipmilan_address,
8
+ <%= text_f fencing_fields, :fence_ipmilan_address,
10
9
  label: _("IP Address") %>
11
- <%= text_f attrs_fields, :fence_ipmilan_username,
10
+ <%= text_f fencing_fields, :fence_ipmilan_username,
12
11
  label: _("Username")%>
13
- <%= password_f attrs_fields, :fence_ipmilan_password,
12
+ <%= password_f fencing_fields, :fence_ipmilan_password,
14
13
  label: _("Password"),
15
14
  placeholder: '********' %>
16
- <%= checkbox_f attrs_fields, :fence_ipmilan_expose_lanplus,
15
+ <%= checkbox_f fencing_fields, :fence_ipmilan_expose_lanplus,
17
16
  label: _("Expose Lanplus") %>
18
- <%= text_f attrs_fields, :fence_ipmilan_lanplus_options,
17
+ <%= text_f fencing_fields, :fence_ipmilan_lanplus_options,
19
18
  label: _("Lanplus Options") %>
20
- <% end %>
21
19
  <% end %>
22
20
  </div>
23
21
  <div id="fencing_disabled_notice" style="display: none;">
data/config/routes.rb CHANGED
@@ -22,10 +22,4 @@ Rails.application.routes.draw do
22
22
 
23
23
  resources :subnet_typings, :only => [:create, :destroy, :update]
24
24
  end
25
-
26
- constraints(:id => /[^\/]+/) do
27
- scope 'staypuft', module: 'staypuft' do
28
- resources :hosts, as: 'staypuft_hosts'
29
- end
30
- end
31
25
  end
@@ -27,6 +27,7 @@ module Staypuft
27
27
  end
28
28
 
29
29
  config.to_prepare do
30
+ # Model concerns
30
31
  ::Host::Base.send :include, Staypuft::Concerns::HostInterfaceManagement
31
32
  ::Host::Managed.send :include, Staypuft::Concerns::HostOrchestrationBuildHook
32
33
  ::Host::Managed.send :include, Staypuft::Concerns::HostOpenStackAffiliation
@@ -38,6 +39,7 @@ module Staypuft
38
39
  ::Hostgroup.send :include, Staypuft::Concerns::HostgroupExtensions
39
40
  ::Environment.send :include, Staypuft::Concerns::EnvironmentExtensions
40
41
  ::LookupKey.send :include, Staypuft::Concerns::LookupKeyExtensions
42
+ ::Host::Managed.send :include, Staypuft::Concerns::HostFencingExtensions
41
43
  ::Nic::Base.send :include, Staypuft::Concerns::NicFencingExtensions
42
44
 
43
45
  # preload all the Foreman's lib files but only in production
@@ -1,3 +1,3 @@
1
1
  module Staypuft
2
- VERSION = '0.3.7'
2
+ VERSION = '0.3.8'
3
3
  end
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.7
4
+ version: 0.3.8
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-19 00:00:00.000000000 Z
11
+ date: 2014-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman-tasks
@@ -96,7 +96,6 @@ files:
96
96
  - app/assets/stylesheets/staypuft/staypuft.css.scss
97
97
  - app/controllers/staypuft/application_controller.rb
98
98
  - app/controllers/staypuft/subnet_typings_controller.rb
99
- - app/controllers/staypuft/hosts_controller.rb
100
99
  - app/controllers/staypuft/interface_assignments_controller.rb
101
100
  - app/controllers/staypuft/steps_controller.rb
102
101
  - app/controllers/staypuft/deployments_controller.rb
@@ -116,6 +115,7 @@ files:
116
115
  - app/models/staypuft/deployment/passwords.rb
117
116
  - app/models/staypuft/service_class.rb
118
117
  - app/models/staypuft/subnet_type.rb
118
+ - app/models/staypuft/host/fencing.rb
119
119
  - app/models/staypuft/layout.rb
120
120
  - app/models/staypuft/concerns/vip_nic_scopes.rb
121
121
  - app/models/staypuft/concerns/hostgroup_extensions.rb
@@ -126,6 +126,7 @@ files:
126
126
  - app/models/staypuft/concerns/environment_extensions.rb
127
127
  - app/models/staypuft/concerns/host_interface_management.rb
128
128
  - app/models/staypuft/concerns/host_orchestration_build_hook.rb
129
+ - app/models/staypuft/concerns/host_fencing_extensions.rb
129
130
  - app/models/staypuft/concerns/lookup_key_extensions.rb
130
131
  - app/models/staypuft/concerns/host_open_stack_affiliation.rb
131
132
  - app/models/staypuft/role_service.rb
@@ -1,17 +0,0 @@
1
- module Staypuft
2
- class HostsController < ::HostsController
3
-
4
- before_filter :set_fencing_params, only: 'update'
5
-
6
- private
7
- def set_fencing_params
8
- fencing_params = params['host'].delete('fencing')
9
-
10
- if fencing_params['attrs']['fencing_enabled'] == '1'
11
- host_attrs = params['host']['interfaces_attributes'].values.find{|host_attrs| host_attrs['provider'] == 'IPMI'}
12
- host_attrs.merge!(fencing_params)
13
- end
14
- end
15
-
16
- end
17
- end