Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #21 from galthaus/pull-req-master-ab0a7d9fef

Merge rails3anddb into development [7/29]
  • Loading branch information...
commit 547f4fe60023718157eda3a7505119776955a8f7 2 parents 77854d8 + ab0a7d9
@galthaus galthaus authored
View
2  chef/data_bags/crowbar/bc-template-ipmi.json
@@ -18,7 +18,7 @@
},
"elements": {},
"element_order": [
- [ "ipmi-configure" ]
+ [ "ipmi-discover", "ipmi-configure" ]
],
"config": {
"environment": "ipmi-base-config",
View
15 crowbar.yml
@@ -23,24 +23,11 @@ barclamp:
- crowbar
crowbar:
- layout: 1
+ layout: 2
order: 16
run_order: 16
chef_order: 16
-locale_additions:
- en:
- barclamp:
- ipmi:
- edit_attributes:
- attributes: Attributes
- debug: Enable Barclamp Debug
- bmc_enable: Enable BMC
- bmc_user: BMC User
- bmc_password: BMC Password
- edit_deployment:
- deployment: Deployment
-
debs:
pkgs:
- ipmitool
View
3  crowbar_framework/app/controllers/ipmi_controller.rb
@@ -14,7 +14,4 @@
#
class IpmiController < BarclampController
- def initialize
- @service_object = IpmiService.new logger
- end
end
View
28 crowbar_framework/app/models/ipmi_service.rb
@@ -1,4 +1,4 @@
-# Copyright 2011, Dell
+# Copyright 2012, Dell
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,18 +15,6 @@
class IpmiService < ServiceObject
- def initialize(thelogger)
- @bc_name = "ipmi"
- @logger = thelogger
- end
-
- def create_proposal
- @logger.debug("IPMI create_proposal: entering")
- base = super
- @logger.debug("IPMI create_proposal: exiting")
- base
- end
-
def transition(inst, name, state)
@logger.debug("IPMI transition: make sure that network role is on all nodes: #{name} for #{state}")
@@ -35,11 +23,9 @@ def transition(inst, name, state)
#
if state == "discovering"
@logger.debug("IPMI transition: discovering state for #{name} for #{state}")
- db = ProposalObject.find_proposal "ipmi", inst
- role = RoleObject.find_role_by_name "ipmi-config-#{inst}"
- result = add_role_to_instance_and_node("ipmi", inst, name, db, role, "ipmi-discover")
+ result = add_role_to_instance_and_node(name, inst, "ipmi-discover")
@logger.debug("ipmi transition: leaving from installed state for #{name} for #{state}")
- a = [200, NodeObject.find_node_by_name(name).to_hash ] if result
+ a = [200, "" ] if result
a = [400, "Failed to add role to node"] unless result
return a
end
@@ -49,17 +35,15 @@ def transition(inst, name, state)
#
if state == "discovered"
@logger.debug("IPMI transition: installed state for #{name} for #{state}")
- db = ProposalObject.find_proposal "ipmi", inst
- role = RoleObject.find_role_by_name "ipmi-config-#{inst}"
- result = add_role_to_instance_and_node("ipmi", inst, name, db, role, "ipmi-configure")
+ result = add_role_to_instance_and_node(name, inst, "ipmi-configure")
@logger.debug("ipmi transition: leaving from installed state for #{name} for #{state}")
- a = [200, NodeObject.find_node_by_name(name).to_hash ] if result
+ a = [200, "" ] if result
a = [400, "Failed to add role to node"] unless result
return a
end
@logger.debug("ipmi transition: leaving for #{name} for #{state}")
- [200, NodeObject.find_node_by_name(name).to_hash ]
+ [200, ""]
end
end
View
25 crowbar_framework/config/locales/ipmi/en.yml
@@ -0,0 +1,25 @@
+# Copyright 2012, Dell
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+en:
+ barclamp:
+ ipmi:
+ edit_attributes:
+ attributes: Attributes
+ debug: Enable Barclamp Debug
+ bmc_enable: Enable BMC
+ bmc_user: BMC User
+ bmc_password: BMC Password
+ edit_deployment:
+ deployment: Deployment
View
24 crowbar_framework/db/migrate/20120801015033_barclamp_import_ipmi.rb
@@ -0,0 +1,24 @@
+# Copyright 2012, Dell
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+class BarclampImportIpmi < ActiveRecord::Migration
+ def up
+ Barclamp.import_1x 'ipmi'
+ end
+
+ def down
+ Barclamp.delete(Barclamp.find_by_name 'ipmi')
+ end
+
+end
View
5 crowbar_framework/doc/default/ipmi/barclamp-info.md
@@ -0,0 +1,5 @@
+### IPMI Barclamp
+
+This barclamp configures the IP Management Interfaces (aka BMC) used for remote console and power management.
+
+
View
10 crowbar_framework/doc/default/ipmi/licenses.md
@@ -0,0 +1,10 @@
+### IPMI Barclamp Licenses
+
+This file contains information (if updated by the barclamp authors!) about the licenses that apply to your installation.
+
+The following dependencies are required:
+
+* ?
+
+
+
View
11 crowbar_framework/doc/ipmi.yml
@@ -0,0 +1,11 @@
+# theses are the default meta_data values
+license: Apache 2
+copyright: 2012 by Dell, Inc
+date: July 25, 2012
+
+crowbar+book-barclamps:
+ ipmi+barclamp-info
+
+crowbar+book-licenses:
+ crowbar+licenses-crowbar-meta:
+ ipmi+licenses
Please sign in to comment.
Something went wrong with that request. Please try again.