Skip to content

Loading…

Merge rails3anddb into development [15/29] #38

Merged
merged 20 commits into from

2 participants

@galthaus

crowbar.yml | 19 +-------
.../app/controllers/keystone_controller.rb | 3 -
crowbar_framework/app/models/keystone_service.rb | 48 +++++++++-----------
crowbar_framework/config/locales/keystone/en.yml | 29 ++++++++++++
.../20120802030000_barclamp_import_keystone.rb | 24 ++++++++++
.../doc/default/keystone/barclamp-info.md | 5 ++
crowbar_framework/doc/default/keystone/licenses.md | 10 ++++
crowbar_framework/doc/keystone.yml | 11 +++++
8 files changed, 102 insertions(+), 47 deletions(-)

galthaus and others added some commits
@galthaus galthaus Move translations into custom files 6f3ca0a
@galthaus galthaus Merge pull request #28 from galthaus/pull-req-release-rails3anddb-mas…
…ter-6f3ca0ac87

More locale and nav changes [3/18]
897fb90
Rob @Zehicle Hirschfeld layout 2 and doc stubs 749af55
cloudedge make sure changes are retained 2b3754d
@galthaus galthaus Merge pull request #29 from cloudedge/pull-req-release-rails3anddb-ma…
…ster-2b3754d7e5

Move the crowbar.yml layout to v2 [4/27]
dfc6957
@galthaus galthaus Add migration for importing the barclamp 71fc18e
@galthaus galthaus Merge pull request #32 from galthaus/pull-req-release-rails3anddb-mas…
…ter-71fc18e34f

migration pull requests [4/29]
1fe6662
@dpaterson dpaterson Fixed problem with layout rendering due to initialize method not call…
…ing super. Re-factored to use before_filter method to load @service_object and deleted initialize method.
e0fa107
@galthaus galthaus Merge pull request #33 from dpaterson/pull-req-release-rails3anddb-ma…
…ster-e0fa10770b

re-factor out intialize method in controllers [3/22]
9668e35
@galthaus galthaus Fix barclamp initialization and unix file format issues 7ffd9b2
@galthaus galthaus Merge pull request #34 from galthaus/pull-req-release-rails3anddb-mas…
…ter-7ffd9b2b49

Tweak Daves fix for object initialization and fix some linux file format issues [4/29]
ac6a6be
cloudedge keystone needs to be after mysql and before rest of OpenStack 6c57089
cloudedge keystone needs to be after mysql and before rest of OpenStack 0ffed1f
Rob Hirschfeld Merge pull request #35 from cloudedge/pull-req-release-rails3anddb-ma…
…ster-0ffed1f5b4

Fix missed ordering [1/4]
ef319f6
@galthaus galthaus Remove unneeded code from the barclamp controllers 9aeb0dd
@galthaus galthaus Move allow_multiple_proposals to config.yml 56c199b
@galthaus galthaus Merge pull request #36 from galthaus/pull-req-release-rails3anddb-mas…
…ter-56c199bec1

More updates puma support controller cleanup [3/27]
1252374
@galthaus galthaus Convert routines over to new database methods 8098a5e
@galthaus galthaus Normalize the hash storage pass to include the barclamp name 8bec60e
Rob Hirschfeld Merge pull request #37 from galthaus/pull-req-release-rails3anddb-mas…
…ter-8bec60e0fb

Switch over to new objects compute nodes almost work rename needs some help [4/29]
285d186
@galthaus galthaus merged commit b84156f into crowbar:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 25, 2012
  1. @galthaus
  2. @galthaus

    Merge pull request #28 from galthaus/pull-req-release-rails3anddb-mas…

    galthaus committed
    …ter-6f3ca0ac87
    
    More locale and nav changes [3/18]
Commits on Jul 26, 2012
  1. layout 2 and doc stubs

    Rob @Zehicle Hirschfeld committed
  2. make sure changes are retained

    cloudedge committed
  3. @galthaus

    Merge pull request #29 from cloudedge/pull-req-release-rails3anddb-ma…

    galthaus committed
    …ster-2b3754d7e5
    
    Move the crowbar.yml layout to v2 [4/27]
Commits on Aug 1, 2012
  1. @galthaus
  2. @galthaus

    Merge pull request #32 from galthaus/pull-req-release-rails3anddb-mas…

    galthaus committed
    …ter-71fc18e34f
    
    migration pull requests [4/29]
Commits on Aug 2, 2012
  1. @dpaterson

    Fixed problem with layout rendering due to initialize method not call…

    dpaterson committed
    …ing super. Re-factored to use before_filter method to load @service_object and deleted initialize method.
  2. @galthaus

    Merge pull request #33 from dpaterson/pull-req-release-rails3anddb-ma…

    galthaus committed
    …ster-e0fa10770b
    
    re-factor out intialize method in controllers [3/22]
Commits on Aug 3, 2012
  1. @galthaus
  2. @galthaus

    Merge pull request #34 from galthaus/pull-req-release-rails3anddb-mas…

    galthaus committed
    …ter-7ffd9b2b49
    
    Tweak Daves fix for object initialization and fix some linux file format issues [4/29]
Commits on Aug 5, 2012
  1. Merge pull request #35 from cloudedge/pull-req-release-rails3anddb-ma…

    Rob Hirschfeld committed
    …ster-0ffed1f5b4
    
    Fix missed ordering [1/4]
Commits on Aug 7, 2012
  1. @galthaus
  2. @galthaus
Commits on Aug 8, 2012
  1. @galthaus

    Merge pull request #36 from galthaus/pull-req-release-rails3anddb-mas…

    galthaus committed
    …ter-56c199bec1
    
    More updates puma support controller cleanup [3/27]
Commits on Aug 13, 2012
  1. @galthaus
  2. @galthaus
Commits on Aug 14, 2012
  1. Merge pull request #37 from galthaus/pull-req-release-rails3anddb-mas…

    Rob Hirschfeld committed
    …ter-8bec60e0fb
    
    Switch over to new objects compute nodes almost work rename needs some help [4/29]
View
19 crowbar.yml
@@ -19,33 +19,18 @@ barclamp:
name: keystone
display: OpenStack Keystone
version: 0
+ allow_multiple_proposals: true
requires:
- mysql
member:
- openstack
crowbar:
- layout: 1
+ layout: 2
order: 75
run_order: 75
chef_order: 75
-locale_additions:
- en:
- barclamp:
- keystone:
- edit_deployment:
- deployment: Deployment
- edit_attributes:
- attributes: Attributes
- sql_engine: SQL Engine
- mysql_instance: MySQL Instance
- default-tenant: Default Tenant
- admin-username: Administrator Username
- admin-password: Administrator Password
- default-username: Regular User Username
- default-password: Regular User Password
-
debs:
ubuntu-10.10:
repos:
View
3 crowbar_framework/app/controllers/keystone_controller.rb
@@ -14,8 +14,5 @@
#
class KeystoneController < BarclampController
- def initialize
- @service_object = KeystoneService.new logger
- end
end
View
48 crowbar_framework/app/models/keystone_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,19 +15,11 @@
class KeystoneService < ServiceObject
- def initialize(thelogger)
- @bc_name = "keystone"
- @logger = thelogger
- end
-
- def self.allow_multiple_proposals?
- true
- end
-
- def proposal_dependencies(role)
+ def proposal_dependencies(prop_config)
answer = []
- if role.default_attributes["keystone"]["sql_engine"] == "mysql"
- answer << { "barclamp" => "mysql", "inst" => role.default_attributes["keystone"]["mysql_instance"] }
+ hash = prop_config.config_hash
+ if hash["keystone"]["sql_engine"] == "mysql"
+ answer << { "barclamp" => "mysql", "inst" => hash["mysql_instance"] }
end
answer
end
@@ -35,32 +27,34 @@ def proposal_dependencies(role)
def create_proposal
base = super
- nodes = NodeObject.all
- nodes.delete_if { |n| n.nil? or n.admin? }
+ nodes = Node.all
+ nodes.delete_if { |n| n.nil? or n.is_admin? }
+ if nodes.size >= 1
+ add_role_to_instance_and_node(n[0].name, base.name, "keystone-server")
+ end
- base["attributes"]["keystone"]["mysql_instance"] = ""
+ hash = base.config_hash
+ hash["keystone"]["mysql_instance"] = ""
begin
- mysqlService = MysqlService.new(@logger)
+ mysql = Barclamp.find_by_name("mysql")
# Look for active roles
- mysqls = mysqlService.list_active[1]
+ mysqls = mysql.active_proposals
if mysqls.empty?
# No actives, look for proposals
- mysqls = mysqlService.proposals[1]
+ mysqls = mysql.proposals
end
unless mysqls.empty?
- base["attributes"]["keystone"]["mysql_instance"] = mysqls[0]
+ hash["keystone"]["mysql_instance"] = mysqls[0].name
end
- base["attributes"]["keystone"]["sql_engine"] = "mysql"
+ hash["keystone"]["sql_engine"] = "mysql"
rescue
@logger.info("Keystone create_proposal: no mysql found")
- base["attributes"]["keystone"]["sql_engine"] = "mysql"
+ hash["keystone"]["sql_engine"] = "mysql"
end
-
- base["deployment"]["keystone"]["elements"] = {
- "keystone-server" => [ nodes.first[:fqdn] ]
- } unless nodes.nil? or nodes.length ==0
- base[:attributes][:keystone][:service][:token] = '%012d' % rand(1e12)
+ hash["keystone"][:service][:token] = '%012d' % rand(1e12)
+
+ base.config_hash = hash
base
end
View
29 crowbar_framework/config/locales/keystone/en.yml
@@ -0,0 +1,29 @@
+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:
+ keystone:
+ edit_deployment:
+ deployment: Deployment
+ edit_attributes:
+ attributes: Attributes
+ sql_engine: SQL Engine
+ mysql_instance: MySQL Instance
+ default-tenant: Default Tenant
+ admin-username: Administrator Username
+ admin-password: Administrator Password
+ default-username: Regular User Username
+ default-password: Regular User Password
+
View
24 crowbar_framework/db/migrate/20120802030000_barclamp_import_keystone.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 BarclampImportKeystone < ActiveRecord::Migration
+ def up
+ Barclamp.import_1x 'keystone'
+ end
+
+ def down
+ Barclamp.delete(Barclamp.find_by_name 'keystone')
+ end
+
+end
View
5 crowbar_framework/doc/default/keystone/barclamp-info.md
@@ -0,0 +1,5 @@
+### Keystone Barclamp
+
+This barclamp does...
+
+
View
10 crowbar_framework/doc/default/keystone/licenses.md
@@ -0,0 +1,10 @@
+### Keystone 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/keystone.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:
+ keystone+barclamp-info
+
+crowbar+book-licenses:
+ openstack+licenses-openstack-meta:
+ keystone+licenses
Something went wrong with that request. Please try again.