Mailing list convention proposal
by Petr Blaho
Hi,
yesterday I spent a huge amount of time to find out why there are some failing rspec tests for conductor - spec/controllers/api/images_controller_spec.rb
I found that there is a bug https://bugzilla.redhat.com/show_bug.cgi?id=796783 with multipatch as a solution - part for conductor and part for aeolus-image-rubygem
And these tests were failing with aeolus-image-rubygem installed by yum.
To make them work I had to build rubygem-aeolus-image rpm from source and install it.
So I think it would be good if developers working on this type of patches should send an email with message that rubygem from source is needed after they pushed their patches to repo.
These type of emails should have something like [ANNOUNCEMENT conductor] or [ANN conductor] so development community can filter these emails and notice them.
What do you think?
--
With regards
Petr Blaho
12 years, 1 month
[PATCH conductor] BZ797713 added missing translation in edit deployable page
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/deployables/edit.html.haml | 4 ++--
src/config/locales/en.yml | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/app/views/deployables/edit.html.haml b/src/app/views/deployables/edit.html.haml
index 783e910..6458602 100644
--- a/src/app/views/deployables/edit.html.haml
+++ b/src/app/views/deployables/edit.html.haml
@@ -2,9 +2,9 @@
%header.admin-page-header
%h1{:class => controller.controller_name}= @deployable.name
#obj_actions.button-container
- = link_to 'New Deployable', new_polymorphic_path([@catalog, @deployable]), :class => 'button primary', :id => 'new_deployable_button'
+ = link_to t('catalog_entries.new_catalog_entry'), new_polymorphic_path([@catalog, @deployable]), :class => 'button primary', :id => 'new_deployable_button'
.button-group
- = link_to 'Cancel Editing', polymorphic_path([@catalog, Deployable]), :class => 'button pill danger', :id => 'new_deployable_button'
+ = link_to t('catalog_entries.edit.cancel_editing'), polymorphic_path([@catalog, Deployable]), :class => 'button pill danger', :id => 'new_deployable_button'
%section.admin-content-section.user
%header
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 126130c..ed94a0f 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -670,6 +670,7 @@ en:
start: Start
edit:
editing_catalog_entry: Editing Deployable
+ cancel_editing: Cancel Editing
list:
catalog_entries_list: Deployables List
flash:
--
1.7.7.6
12 years, 1 month
[PATCH conductor] BZ794536 Timeout session after 15 minutes of inactivity
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/config/initializers/session_store.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/config/initializers/session_store.rb b/src/config/initializers/session_store.rb
index 8ff62fa..5fd69a1 100644
--- a/src/config/initializers/session_store.rb
+++ b/src/config/initializers/session_store.rb
@@ -28,4 +28,4 @@ Conductor::Application.config.session = {
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create")
-Conductor::Application.config.session_store :active_record_store
+Conductor::Application.config.session_store :active_record_store, :expire_after => 15.minutes
--
1.7.7.6
12 years, 1 month
[PATCH conductor] Fix broken Pools cucumber test
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
The failing test was introduced in d7120f4bfd90e7207b77f06a674ea5d6d8b00977
---
src/features/pool.feature | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/features/pool.feature b/src/features/pool.feature
index 14a9e7a..f2cbf6b 100644
--- a/src/features/pool.feature
+++ b/src/features/pool.feature
@@ -173,12 +173,12 @@ Feature: Manage Pools
And I follow "details_instances"
And I should see "mock1"
And I should see "mock2"
- And I should not see "mock3"
- When I select "" from "instances_preset_filter"
+ And I should see "mock3"
+ When I select "Non-stopped Instances" from "instances_preset_filter"
And I press "apply_instances_preset_filter"
And I should see "mock1"
And I should see "mock2"
- And I should see "mock3"
+ And I should not see "mock3"
Scenario: Select Catalog Images on pool detail page
Given a pool "mockpool" exists
--
1.7.6.5
12 years, 1 month
[PATCH conductor] BZ-788547 Unhandled exception or status code , when launching with space in deployments name for RHEV
by Tomas Hrcka
https://bugzilla.redhat.com/show_bug.cgi?id=788547
added before save hook to replace spaces with "-" in Deployment.
---
src/app/models/deployment.rb | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index a0bdcd9..ec66fdb 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -67,11 +67,10 @@ class Deployment < ActiveRecord::Base
validates_length_of :name, :maximum => 50
validates_presence_of :owner_id
validate :pool_must_be_enabled
-
before_destroy :destroyable?
before_create :inject_launch_parameters
before_create :generate_uuid
-
+ before_save :replace_special_characters_in_name
USER_MUTABLE_ATTRS = ['name']
STATE_MIXED = "mixed"
@@ -593,4 +592,8 @@ class Deployment < ActiveRecord::Base
def generate_uuid
self[:uuid] = UUIDTools::UUID.timestamp_create.to_s
end
+
+ def replace_special_characters_in_name
+ name.gsub!(/[^a-zA-Z0-9]+/, '-')
+ end
end
--
1.7.1
12 years, 1 month
[PATCH conductor] BZ789853 added rescue connection timeout
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/controllers/images_controller.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index 0c6b350..8c42074 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -213,7 +213,7 @@ class ImagesController < ApplicationController
url = params[:image_url]
begin
xml_source = RestClient.get(url, :accept => :xml)
- rescue RestClient::Exception, SocketError, URI::InvalidURIError, Errno::ECONNREFUSED
+ rescue RestClient::Exception, SocketError, URI::InvalidURIError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
flash.now[:error] = t('images.flash.error.invalid_url')
render :new and return
end
--
1.7.7.6
12 years, 1 month
Failing cucumber test on pool feature
by Jason Guiditta
Anyone have any idea on this? Wes hit is on a hudson build today< I
just took a quick look, but am not familiar enough with that area to
ferret it out quickly. If nobody has any ideas, I'll look into it
more tomorrow. Test: http://fpaste.org/mxwg/
-j
12 years, 1 month
[PATCH conductor] BZ795239 Typo in en.yml locale file
by Tomas Hrcka
https://bugzilla.redhat.com/show_bug.cgi?id=795239
---
src/config/locales/en.yml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 0def99b..438459a 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -919,7 +919,7 @@ en:
not_deleted_perms:
one: "Insufficient permissions to delete deployable %{not_deleted}!"
other: "Insufficient permissions to delete %{count} deployables %{not_deleted}!"
- not_selected: "No deployable was not selected!"
+ not_selected: "Deployable was not selected!"
no_catalog_exists: "No catalog exists! Please create one."
no_hwp_exists: "No hardware profile exists! Please create one."
missing_image: "%{assembly}: Image (UUID: %{uuid}) doesn't exist"
--
1.7.1
12 years, 1 month
[PATCH conductor] BZ 795743 - Detect architecture for imported images
by Matt Wagner
When importing an image, detect its architecture and stash that as an
:architecture attribute on the Image itself. When creating a deployable,
look for the attribute and restrict HWPs to those matching.
This depends on a matching patch to aeolus-image-rubygem.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=795743
---
src/app/controllers/deployables_controller.rb | 6 +++++-
src/app/models/hardware_profile.rb | 1 +
src/lib/image.rb | 3 ++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb
index e37bc4a..3fdea3f 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -37,7 +37,11 @@ class DeployablesController < ApplicationController
require_privilege(Privilege::CREATE, Deployable)
if params[:create_from_image]
@image = Aeolus::Image::Warehouse::Image.find(params[:create_from_image])
- @hw_profiles = HardwareProfile.frontend.list_for_user(current_user, Privilege::VIEW)
+ if @image.respond_to?(:architecture)
+ @hw_profiles = HardwareProfile.frontend.for_architecture((a)image.architecture).list_for_user(current_user, Privilege::VIEW)
+ else
+ @hw_profiles = HardwareProfile.frontend.list_for_user(current_user, Privilege::VIEW)
+ end
@deployable.name = @image.name
@selected_catalogs = params[:catalog_id].to_a
load_catalogs
diff --git a/src/app/models/hardware_profile.rb b/src/app/models/hardware_profile.rb
index 087d2ae..a75e4de 100644
--- a/src/app/models/hardware_profile.rb
+++ b/src/app/models/hardware_profile.rb
@@ -43,6 +43,7 @@ class HardwareProfile < ActiveRecord::Base
has_many :permissions, :as => :permission_object, :dependent => :destroy
has_many :instances
scope :frontend, :conditions => { :provider_id => nil }
+ scope :for_architecture, lambda {|arch| includes(:architecture).where('hardware_profile_properties.value' => arch)}
has_many :provider_instances, :class_name => "Instance",
:foreign_key => "provider_hardware_profile_id"
diff --git a/src/lib/image.rb b/src/lib/image.rb
index 9911703..cfdbc78 100644
--- a/src/lib/image.rb
+++ b/src/lib/image.rb
@@ -25,9 +25,10 @@ class Image
raise Aeolus::Conductor::Base::ImageNotFound unless img.present?
# We have the image name in the cloud provider, so we might as well use it
xml ||= "<image><name>#{img.name}</name></image>" if img.name.present?
+ arch = img.architecture
provider = provider_account.provider
account_id = provider_account.credentials_hash['username']
- image = Aeolus::Image.import(provider.name, provider.provider_type.deltacloud_driver, image_id, account_id, environment.name, xml)
+ image = Aeolus::Image.import(provider.name, provider.provider_type.deltacloud_driver, image_id, account_id, environment.name, xml, arch)
image
end
end
--
1.7.6.5
12 years, 1 month
[PATCH conductor] BZ 796052 - Image Import tab added to Environments page
by Matt Wagner
The "Import Image" button, once scoped to environments, ended up
in an obscure location that no one could find. It now receives the
same billing as the "New Image" button.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=796052
(and is relevant to #796355)
---
src/app/views/pool_families/_list.html.haml | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/app/views/pool_families/_list.html.haml b/src/app/views/pool_families/_list.html.haml
index 0e89af0..2d50e0d 100644
--- a/src/app/views/pool_families/_list.html.haml
+++ b/src/app/views/pool_families/_list.html.haml
@@ -17,6 +17,7 @@
.section-controls
#obj_actions
= link_to t("pools.new_pool"), new_pool_path(:pool_family_id => pool_family.id), :class => 'pool_family_button'
+ = link_to t("images.import.import_image"), new_image_path(:environment => pool_family.id, :tab => 'import'), :class => 'new_image_button'
= link_to t("images.new.new_image"), new_image_path( :environment => pool_family.id), :class => 'new_image_button'
- unless pool_family.pools.blank?
%tr
--
1.7.6.5
12 years, 1 month