Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: SUSE-Cloud/barclamp-glance
...
head fork: SUSE-Cloud/barclamp-glance
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
13 crowbar_framework/app/models/glance_service.rb
@@ -26,9 +26,7 @@ def self.allow_multiple_proposals?
def proposal_dependencies(role)
answer = []
- if role.default_attributes["glance"]["database"] == "database"
- answer << { "barclamp" => "database", "inst" => role.default_attributes["glance"]["sql_instance"] }
- end
+ answer << { "barclamp" => "database", "inst" => role.default_attributes["glance"]["sql_instance"] }
if role.default_attributes["glance"]["use_keystone"]
answer << { "barclamp" => "keystone", "inst" => role.default_attributes["glance"]["keystone_instance"] }
end
@@ -67,7 +65,11 @@ def create_proposal
@logger.info("Glance create_proposal: no database found")
end
- base["attributes"]["glance"]["database"] == "sqlite" if base["attributes"]["glance"]["database"] == ""
+ # SQLite setups are not supported
+ # base["attributes"]["glance"]["database"] == "sqlite" if base["attributes"]["glance"]["database"] == ""
+ if base["attributes"]["glance"]["sql_engine"] == ""
+ raise(I18n.t('model.service.dependency_missing', :name => @bc_name, :dependson => "database"))
+ end
base["attributes"]["glance"]["keystone_instance"] = ""
begin
@@ -87,6 +89,9 @@ def create_proposal
@logger.info("Glance create_proposal: no keystone found")
base["attributes"]["glance"]["use_keystone"] = false
end
+ if ! base["attributes"]["glance"]["use_keystone"]
+ raise(I18n.t('model.service.dependency_missing', :name => @bc_name, :dependson => "keystone"))
+ end
base["attributes"]["glance"]["service_password"] = '%012d' % rand(1e12)
@logger.debug("Glance create_proposal: exiting")
View
4 crowbar_framework/app/views/barclamp/glance/_edit_attributes.html.haml
@@ -186,11 +186,11 @@
%div.container
%p
%label{ :for => :database }= t('.database')
- = select_tag :database, options_for_select([['PostgreSQL/MySQL','database'], ['SQLite', 'sqlite']], @proposal.raw_data['attributes'][@proposal.barclamp]["database"]), :onchange => "update_value('database', 'database', 'string')"
+ = select_tag :database, options_for_select([['PostgreSQL/MySQL','database']], @proposal.raw_data['attributes'][@proposal.barclamp]["database"]), :onchange => "update_value('database', 'database', 'string')"
%p
%label{ :for => :sql_idle_timeout }= t('.sql_idle_timeout')
%input#sql_idle_timeout{:type => "text", :name => "sql_idle_timeout", :'data-default' => @proposal.raw_data['attributes'][@proposal.barclamp]["sql_idle_timeout"], :onchange => "update_value('sql_idle_timeout','sql_idle_timeout', 'integer')"}
- %p
+ -#%p
%label{ :for => :sqlite_connection }= t('.sqlite_connection')
%input#sqlite_connection{:type => "text", :name => "sqlite_connection", :'data-default' => @proposal.raw_data['attributes'][@proposal.barclamp]["sqlite_connection"], :onchange => "update_value('sqlite_connection','sqlite_connection', 'string')"}
%p

No commit comments for this range

Something went wrong with that request. Please try again.