[ANNOUNCE] Merged "gelato" into "master"
by Jirka Tomasek
Hi all,
I merged the "gelato" branch into "master". Gelato branch introduces
converge-ui git submodule into src/vendor/converge-ui. This repository
includes common UI parts for Conductor and Katello. To make the
submodule work for the first time, it's necessary to run
git submodule init
followed by
git submodule update
which will clone the converge-ui repo into src/vendor/converge-ui (note
that you have to run these commands from the top level of the working tree).
more info is described here: https://github.com/Katello/converge-ui-example
If you get something like LoadError (Missing helper file
helpers/layout_helper.rb), It means that you don't have submodule
present and the simlinks leading to it don't work. (Run the commands
described above)
Jirka
11 years, 11 months
[PATCH conductor] Fix typo in UpdateStateForExistingDeployments migration
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
...081132_update_state_for_existing_deployments.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/db/migrate/20120507081132_update_state_for_existing_deployments.rb b/src/db/migrate/20120507081132_update_state_for_existing_deployments.rb
index be472a4..8cac732 100644
--- a/src/db/migrate/20120507081132_update_state_for_existing_deployments.rb
+++ b/src/db/migrate/20120507081132_update_state_for_existing_deployments.rb
@@ -21,7 +21,7 @@ class UpdateStateForExistingDeployments < ActiveRecord::Migration
Instance::STATE_STOPPED].include?(i.state) }
Deployment::STATE_SHUTTING_DOWN
else
- Deployemnt::STATE_INCOMPLETE
+ Deployment::STATE_INCOMPLETE
end
end
end
--
1.7.6.5
11 years, 11 months
[PATCH conductor] Redmine 3153 - Remove unnecessary partials rev1
by Jirka Tomasek
This patch implements Redmine task #3153, cleans or fixes partials for catalogs,
config_servers, deployables, deployments, harware_profiles, instances and layouts.
It also fixes filters in provider_account, catalog details pages and fixes
permissions partial. Partials cleanup for the rest of the views will follow next
sprint.
11 years, 11 months
[PATCH] BZ 809722 - missing template for json response
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
If a deployable referenced images which didn't exist, deployables 'show' action
didn't respond properly to json requests. This patch:
- fixes 'show' action to always respond to json requests
- updates html_error_page method to set error flash message only for 'now', error page
doesn't do redirect
- removes flash setting in handle_general_error method - this method calls html_error_page
which sets flash message anyway
Auto-updating of deploaybles show page is still not ideal - status is not updated if a deploayble
has missing images and then this images are added/fixed - this is out of scope of this BZ.
---
src/app/controllers/application_controller.rb | 3 +-
src/app/controllers/deployables_controller.rb | 28 ++++++++++++------------
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index a1bd60f..803362c 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -69,7 +69,6 @@ class ApplicationController < ActionController::Base
end
def handle_general_error(error)
- flash[:error] = error.message
handle_error(:error => error, :status => :internal_server_error,
:title => t('application_controller.internal_server_error'))
end
@@ -92,7 +91,7 @@ class ApplicationController < ActionController::Base
render :partial => 'layouts/popup-error', :status => status,
:locals => {:title => title, :errmsg => msg}
else
- flash[:error] = msg
+ flash.now[:error] = msg
render :template => 'layouts/error', :layout => 'application',
:locals => {:title => title, :errmsg => ''}
end
diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb
index 8967e79..d3dab36 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -79,20 +79,20 @@ class DeployablesController < ApplicationController
@images_details, images, @missing_images, @deployable_errors = @deployable.get_image_details
flash.now[:error] = @deployable_errors unless @deployable_errors.empty?
- return unless @missing_images.empty?
-
- @build_results = {}
- @pushed_count = 0
- ProviderAccount.includes(:provider, :pool_families).where('providers.enabled' => true, 'pool_families.id' => @deployable.catalogs.first.pool_family.id).each do |account|
- type = account.provider.provider_type.deltacloud_driver
- @build_results[type] ||= []
- status = @deployable.build_status(images, account)
- @pushed_count += 1 if (status == :pushed)
- @build_results[type] << {
- :account => account.label,
- :provider => account.provider.name,
- :status => status,
- }
+ if @missing_images.empty?
+ @build_results = {}
+ @pushed_count = 0
+ ProviderAccount.includes(:provider, :pool_families).where('providers.enabled' => true, 'pool_families.id' => @deployable.catalogs.first.pool_family.id).each do |account|
+ type = account.provider.provider_type.deltacloud_driver
+ @build_results[type] ||= []
+ status = @deployable.build_status(images, account)
+ @pushed_count += 1 if (status == :pushed)
+ @build_results[type] << {
+ :account => account.label,
+ :provider => account.provider.name,
+ :status => status,
+ }
+ end
end
respond_to do |format|
--
1.7.7.6
11 years, 11 months
aeolus security - round 1 (rev 2)
by Mo Morsi
This is the original security patchset (minus the
patches already ack'd and pushed) rebased and updated
to incorporate Jan's feedback.
11 years, 11 months
[PATCH aeolus-image-rubygem] OAuth only binds to Factory requests
by Matt Wagner
Previously, enabling OAuth for Image Factory would cause _all_
requests flowing through ActiveResource to have OAuth headers
added.
---
lib/aeolus_image/active_resource_oauth_client.rb | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lib/aeolus_image/active_resource_oauth_client.rb b/lib/aeolus_image/active_resource_oauth_client.rb
index e9b87d8..258ede9 100644
--- a/lib/aeolus_image/active_resource_oauth_client.rb
+++ b/lib/aeolus_image/active_resource_oauth_client.rb
@@ -26,7 +26,7 @@ module ActiveResourceOAuthClient
def request_with_oauth(method, path, *arguments)
@oauth_config = Aeolus::Image::Factory::Base.config || {}
# Take care to fall back to the standard request method if we don't have full OAuth credentials
- unless Aeolus::Image::Factory::Base.use_oauth?
+ unless use_oauth_for_url?("#{site.scheme}://#{site.host}:#{site.port}#{path}")
return request_without_oauth(method, path, *arguments)
end
result = ActiveSupport::Notifications.instrument("request.active_resource") do |payload|
@@ -56,6 +56,12 @@ module ActiveResourceOAuthClient
raise SSLError.new(e.message)
end
+ # Currently, only Factory calls should use OAuth -- extend as needed
+ def use_oauth_for_url?(url)
+ Aeolus::Image::Factory::Base.use_oauth? and
+ url.include?(Aeolus::Image::Factory::Base.config[:site])
+ end
+
alias_method_chain :request, :oauth
end
--
1.7.7.6
11 years, 11 months
[PATCH] BZ797298: man: fix minor typo in aeolus(1) man page
by Maros Zatko
From: Maros Zatko <mzatko(a)redhat.com>
---
man/aeolus.1 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/man/aeolus.1 b/man/aeolus.1
index d785a19..7ce6067 100644
--- a/man/aeolus.1
+++ b/man/aeolus.1
@@ -25,7 +25,7 @@ aeolus reads its configuration from ~/.aeolus-cli
.P
.I ~/.aeolus-cli
.RS
-This contains the URL and credentials for you amdin user in
+This contains the URL and credentials for your amdin user in
.B aeolus-conductor.
If setup differs from default one, those should be changed accordingly. Conductor URL should be as follows
.I https://<host_where_conductor_runs>/conductor/api
--
1.7.7.6
11 years, 11 months