[PATCH] BZ 798549 added additional rescue cases when trying to import xml from url
by Tzu-Mainn Chen
---
src/app/controllers/deployables_controller.rb | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb
index 8a877fc..7d3d744 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -124,12 +124,12 @@ class DeployablesController < ApplicationController
end
if params.has_key? :url
- xml = import_xml_from_url(params[:url])
- unless xml.nil?
- #store xml_filename for url (i.e. url ends to: foo || foo.xml)
- @deployable.xml_filename = File.basename(URI.parse(params[:url]).path)
- @deployable.xml = xml
- end
+ xml = import_xml_from_url(params[:url])
+ unless xml.nil?
+ #store xml_filename for url (i.e. url ends to: foo || foo.xml)
+ @deployable.xml_filename = File.basename(URI.parse(params[:url]).path)
+ @deployable.xml = xml
+ end
elsif params[:create_from_image].present?
hw_profile = HardwareProfile.frontend.find(params[:hardware_profile])
require_privilege(Privilege::VIEW, hw_profile)
@@ -275,7 +275,7 @@ class DeployablesController < ApplicationController
if response.code == 200
response
end
- rescue RestClient::Exception, SocketError, URI::InvalidURIError
+ rescue RestClient::Exception, SocketError, URI::InvalidURIError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
if url.present?
flash[:error] = t('catalog_entries.flash.warning.not_valid_or_reachable', :url => url)
else
--
1.7.6.5
12 years, 1 month
[PATCH conductor] bug 802869: Add system-logos dep for favicon.png
by Scott Seago
https://bugzilla.redhat.com/show_bug.cgi?id=802869
---
aeolus-conductor.spec.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/aeolus-conductor.spec.in b/aeolus-conductor.spec.in
index 57c0df3..3364e78 100644
--- a/aeolus-conductor.spec.in
+++ b/aeolus-conductor.spec.in
@@ -40,6 +40,7 @@ Requires: rubygem(oauth)
Requires: rubygem(rake)
Requires: postgresql
Requires: postgresql-server
+Requires: system-logos
# to ensure the service is actually started
# and is accessible in the init script
--
1.7.6.4
12 years, 1 month
[PATCH conductor] BZ798510 Added message when no Provider Account is assigned to template's Environment
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/controllers/images_controller.rb | 3 ++-
src/app/views/images/show.html.haml | 13 ++++++++-----
src/config/locales/en.yml | 2 +-
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index a06a249..d3cb780 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -64,7 +64,8 @@ class ImagesController < ApplicationController
load_builds
load_target_images(@build)
@target_image_exists = @target_images_by_target.any?
- flash[:error] = t("images.flash.error.no_provider_accounts") if @account_groups.size == 0
+ @account_groups_listing = @account_groups.select{ |driver, group| group[:included] || @target_images_by_target[driver] || (@build and @builder.find_active_build((a)build.id, driver)) }
+ flash[:error] = t("images.flash.error.no_provider_accounts") if @account_groups_listing.blank?
respond_to do |format|
format.html
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index edfa8c6..d0fe21f 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -40,17 +40,17 @@
- build_text = '.rebuild'
- else
- build_text = '.build'
- - if @account_groups.size > 1
+ - if @account_groups_listing.size > 1
- build_text << '_all'
- = button_to t(build_text), rebuild_all_image_path((a)image.id), :class => 'button pill'
+ = button_to t(build_text), rebuild_all_image_path((a)image.id), :class => 'button pill' unless @account_groups_listing.blank?
#push-all-btn
- if @build && @build.id == @latest_build && @target_image_exists
= button_to t('.push_all'), push_all_image_path((a)image.id, :build_id => @build.id), :class => 'button pill'
.content
- %ul.image_builds
- - @account_groups.each do |driver, group|
- - if group[:included] || @target_images_by_target[driver] || (@build and @builder.find_active_build((a)build.id, driver))
+ - if @account_groups_listing.present?
+ - @account_groups_listing.each do |driver, group|
+ %ul.image_builds
- timg = @target_images_by_target[driver]
%li
%dl
@@ -121,6 +121,9 @@
- else
.clear
+ - else
+ .centered.align-center
+ %strong= t("images.flash.error.no_provider_accounts")
:javascript
$(document).ready(function(){
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 7dff372..e815210 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -804,7 +804,7 @@ en:
invalid_url: Could not load the provided URL
no_file: You must specify the template XML file
no_template: "The image doesn't have a template because it's been imported."
- no_provider_accounts: Images cannot be built, as no provider accounts are currently enabled.
+ no_provider_accounts: "Images cannot be built, as there are no enabled Provider Accounts associated to this Environment."
no_provider_accounts_for_import: Images cannot be imported, as no provider accounts are currently enabled for this environment.
new:
new_image: New Image
--
1.7.7.6
12 years, 1 month
[PATCH configure] BZ 802847 - cleanup hardware profiles and fix provider ordering effects
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=802847
Reverted the hwp1 memory change. Setting the memory to 7500 is incompatible with vsphere. vsphere provider hwp memory range is 512-2048.
Setting memory back to 512m for the default x86_64 profile. Once the conductor and deltacloud changes described in this patch is in.
https://fedorahosted.org/pipermail/aeolus-devel/2012-March/009611.html
We will be able to start using the small instances in ec2.
In the meantime for testing, there is a 512m i386 profile that will match to the small instance on ec2. This has been made available for all profiles and has been named small-i386.
hwp1 has also been renamed to small-x86_64.
---
recipes/aeolus/manifests/profiles/default.pp | 14 +++++++++++---
recipes/aeolus/manifests/profiles/ec2.pp | 11 ++++++-----
recipes/aeolus/manifests/profiles/mock.pp | 12 ++++++++++--
recipes/aeolus/manifests/profiles/rhevm.pp | 12 ++++++++++--
recipes/aeolus/manifests/profiles/vsphere.pp | 12 ++++++++++--
5 files changed, 47 insertions(+), 14 deletions(-)
diff --git a/recipes/aeolus/manifests/profiles/default.pp b/recipes/aeolus/manifests/profiles/default.pp
index 909f871..58bd35a 100644
--- a/recipes/aeolus/manifests/profiles/default.pp
+++ b/recipes/aeolus/manifests/profiles/default.pp
@@ -24,15 +24,23 @@ class aeolus::profiles::default {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
-
- aeolus::conductor::hwp{"hwp1":
+
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
+ cpu => "1",
+ storage => "",
+ architecture => "i386",
+ require => Aeolus::Conductor::Login["admin"] }
+
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1']}
+ require => [Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']]}
}
diff --git a/recipes/aeolus/manifests/profiles/ec2.pp b/recipes/aeolus/manifests/profiles/ec2.pp
index 0dc97f2..e348082 100644
--- a/recipes/aeolus/manifests/profiles/ec2.pp
+++ b/recipes/aeolus/manifests/profiles/ec2.pp
@@ -68,15 +68,15 @@ class aeolus::profiles::ec2 {
url => 'http://localhost:3002/api',
require => Aeolus::Conductor::Login["admin"] }
- aeolus::conductor::hwp{"hwp1":
- memory => "7500",
+ aeolus::conductor::hwp{"small-x86_64":
+ memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
- aeolus::conductor::hwp{"small":
- memory => "500",
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
cpu => "1",
storage => "",
architecture => "i386",
@@ -85,5 +85,6 @@ class aeolus::profiles::ec2 {
Aeolus::Conductor::Provider <| |> -> Aeolus::Conductor::Logout <| |>
aeolus::conductor::logout{"admin":
- require => [Aeolus::Conductor::Hwp['hwp1'], Aeolus::Conductor::Hwp['small']] }
+ require => [Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']] }
}
diff --git a/recipes/aeolus/manifests/profiles/mock.pp b/recipes/aeolus/manifests/profiles/mock.pp
index 1e34c3a..7d97c9c 100644
--- a/recipes/aeolus/manifests/profiles/mock.pp
+++ b/recipes/aeolus/manifests/profiles/mock.pp
@@ -37,15 +37,23 @@ class aeolus::profiles::mock {
password => 'mockpassword',
require => Aeolus::Conductor::Provider["mock"] }
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
+ cpu => "1",
+ storage => "",
+ architecture => "i386",
+ require => Aeolus::Conductor::Login["admin"] }
+
aeolus::conductor::logout{"admin":
require => [Aeolus::Conductor::Provider['mock'],
Aeolus::Conductor::Provider::Account['mock'],
- Aeolus::Conductor::Hwp['hwp1']] }
+ Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']] }
}
diff --git a/recipes/aeolus/manifests/profiles/rhevm.pp b/recipes/aeolus/manifests/profiles/rhevm.pp
index 5d56f80..eeb58c6 100644
--- a/recipes/aeolus/manifests/profiles/rhevm.pp
+++ b/recipes/aeolus/manifests/profiles/rhevm.pp
@@ -33,15 +33,23 @@ class aeolus::profiles::rhevm ($instances) {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
+ cpu => "1",
+ storage => "",
+ architecture => "i386",
+ require => Aeolus::Conductor::Login["admin"] }
+
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1']}
+ require => [Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']]}
Aeolus::Conductor::Provider<| |> -> Aeolus::Conductor::Logout["admin"]
# TODO: create a realm and mappings
diff --git a/recipes/aeolus/manifests/profiles/vsphere.pp b/recipes/aeolus/manifests/profiles/vsphere.pp
index 4d17c1c..7465135 100644
--- a/recipes/aeolus/manifests/profiles/vsphere.pp
+++ b/recipes/aeolus/manifests/profiles/vsphere.pp
@@ -33,15 +33,23 @@ class aeolus::profiles::vsphere ($instances) {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
+ cpu => "1",
+ storage => "",
+ architecture => "i386",
+ require => Aeolus::Conductor::Login["admin"] }
+
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1'] }
+ require => [Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']] }
Aeolus::Conductor::Provider<| |> -> Aeolus::Conductor::Logout["admin"]
}
--
1.7.7.6
12 years, 1 month
[PATCH conductor] BZ 802847 - fix hwp matching when there are multiple values for architecture
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=802847
When there multiple architectures defined in a provider hardware profile. The matching logic only uses the first listed value. This means it would only see i386 and not x86_64 when architecture is specified as ['i386', 'x86_64'].
We will begin to see multiple architectures defined for ec2 once this patch in deltacloud is released: https://git-wip-us.apache.org/repos/asf?p=deltacloud.git;a=commitdiff;h=f...
Fixed the matching logic to consider all options that may be listed in architecture.
Once both conductor and deltacloud changes are in. m1.small will be usable and matched when memory is specified as 512m and architecture is specified as x86_64.
---
src/app/models/hardware_profile.rb | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/app/models/hardware_profile.rb b/src/app/models/hardware_profile.rb
index 087d2ae..7960f26 100644
--- a/src/app/models/hardware_profile.rb
+++ b/src/app/models/hardware_profile.rb
@@ -213,7 +213,7 @@ class HardwareProfile < ActiveRecord::Base
match_hardware_profile_property(front_end_hwp.memory, back_end_hwp.memory) &&
match_hardware_profile_property(front_end_hwp.cpu, back_end_hwp.cpu) &&
match_hardware_profile_property(front_end_hwp.storage, back_end_hwp.storage) &&
- front_end_hwp.architecture.value == back_end_hwp.architecture.value
+ match_hardware_profile_property(front_end_hwp.architecture, back_end_hwp.architecture)
end
def self.match_hardware_profile_property(front_end_property, back_end_property)
@@ -230,10 +230,16 @@ class HardwareProfile < ActiveRecord::Base
match = BigDecimal.new(back_end_property.range_last.to_s) >= BigDecimal.new(front_end_property.value.to_s) ? true : false
when "enum"
create_array_from_property(back_end_property).each do |value|
- if front_end_property.value.nil? or BigDecimal.new(value) >= BigDecimal.new(front_end_property.value.to_s)
+ if front_end_property.value.nil?
+ match = true
+ elsif !is_numeric(front_end_property.value) || !is_numeric(value)
+ if front_end_property.value == value
match = true
end
+ elsif BigDecimal.new(value) >= BigDecimal.new(front_end_property.value.to_s)
+ match = true
end
+ end
end
return match
end
@@ -248,4 +254,8 @@ class HardwareProfile < ActiveRecord::Base
end
end
+ def self.is_numeric(value)
+ true if Float(value) rescue false
+ end
+
end
--
1.7.7.6
12 years, 1 month
[PATCH configure] BZ 802847 - cleanup hardware profiles and fix provider ordering effects
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=802847
Reverted the hwp1 memory change. Setting the memory to 7500 is incompatible with vsphere.
Setting memory back to 512m for the default x86_64 profile. Once the conductor and deltacloud changes described in this patch is in.
https://fedorahosted.org/pipermail/aeolus-devel/2012-March/009609.html
We will be able to start using the small instances in ec2.
In the meantime for testing, there is a 512m i386 profile that will match to the small instance on ec2. This has been made available for all profiles and has been named small-i386.
hwp1 has also been renamed to small-x86_64.
---
recipes/aeolus/manifests/profiles/default.pp | 14 +++++++++++---
recipes/aeolus/manifests/profiles/ec2.pp | 11 ++++++-----
recipes/aeolus/manifests/profiles/mock.pp | 12 ++++++++++--
recipes/aeolus/manifests/profiles/rhevm.pp | 12 ++++++++++--
recipes/aeolus/manifests/profiles/vsphere.pp | 12 ++++++++++--
5 files changed, 47 insertions(+), 14 deletions(-)
diff --git a/recipes/aeolus/manifests/profiles/default.pp b/recipes/aeolus/manifests/profiles/default.pp
index 909f871..58bd35a 100644
--- a/recipes/aeolus/manifests/profiles/default.pp
+++ b/recipes/aeolus/manifests/profiles/default.pp
@@ -24,15 +24,23 @@ class aeolus::profiles::default {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
-
- aeolus::conductor::hwp{"hwp1":
+
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
+ cpu => "1",
+ storage => "",
+ architecture => "i386",
+ require => Aeolus::Conductor::Login["admin"] }
+
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1']}
+ require => [Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']]}
}
diff --git a/recipes/aeolus/manifests/profiles/ec2.pp b/recipes/aeolus/manifests/profiles/ec2.pp
index 0dc97f2..e348082 100644
--- a/recipes/aeolus/manifests/profiles/ec2.pp
+++ b/recipes/aeolus/manifests/profiles/ec2.pp
@@ -68,15 +68,15 @@ class aeolus::profiles::ec2 {
url => 'http://localhost:3002/api',
require => Aeolus::Conductor::Login["admin"] }
- aeolus::conductor::hwp{"hwp1":
- memory => "7500",
+ aeolus::conductor::hwp{"small-x86_64":
+ memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
- aeolus::conductor::hwp{"small":
- memory => "500",
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
cpu => "1",
storage => "",
architecture => "i386",
@@ -85,5 +85,6 @@ class aeolus::profiles::ec2 {
Aeolus::Conductor::Provider <| |> -> Aeolus::Conductor::Logout <| |>
aeolus::conductor::logout{"admin":
- require => [Aeolus::Conductor::Hwp['hwp1'], Aeolus::Conductor::Hwp['small']] }
+ require => [Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']] }
}
diff --git a/recipes/aeolus/manifests/profiles/mock.pp b/recipes/aeolus/manifests/profiles/mock.pp
index 1e34c3a..7d97c9c 100644
--- a/recipes/aeolus/manifests/profiles/mock.pp
+++ b/recipes/aeolus/manifests/profiles/mock.pp
@@ -37,15 +37,23 @@ class aeolus::profiles::mock {
password => 'mockpassword',
require => Aeolus::Conductor::Provider["mock"] }
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
+ cpu => "1",
+ storage => "",
+ architecture => "i386",
+ require => Aeolus::Conductor::Login["admin"] }
+
aeolus::conductor::logout{"admin":
require => [Aeolus::Conductor::Provider['mock'],
Aeolus::Conductor::Provider::Account['mock'],
- Aeolus::Conductor::Hwp['hwp1']] }
+ Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']] }
}
diff --git a/recipes/aeolus/manifests/profiles/rhevm.pp b/recipes/aeolus/manifests/profiles/rhevm.pp
index 5d56f80..eeb58c6 100644
--- a/recipes/aeolus/manifests/profiles/rhevm.pp
+++ b/recipes/aeolus/manifests/profiles/rhevm.pp
@@ -33,15 +33,23 @@ class aeolus::profiles::rhevm ($instances) {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
+ cpu => "1",
+ storage => "",
+ architecture => "i386",
+ require => Aeolus::Conductor::Login["admin"] }
+
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1']}
+ require => [Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']]}
Aeolus::Conductor::Provider<| |> -> Aeolus::Conductor::Logout["admin"]
# TODO: create a realm and mappings
diff --git a/recipes/aeolus/manifests/profiles/vsphere.pp b/recipes/aeolus/manifests/profiles/vsphere.pp
index 4d17c1c..7465135 100644
--- a/recipes/aeolus/manifests/profiles/vsphere.pp
+++ b/recipes/aeolus/manifests/profiles/vsphere.pp
@@ -33,15 +33,23 @@ class aeolus::profiles::vsphere ($instances) {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
+ aeolus::conductor::hwp{"small-i386":
+ memory => "512",
+ cpu => "1",
+ storage => "",
+ architecture => "i386",
+ require => Aeolus::Conductor::Login["admin"] }
+
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1'] }
+ require => [Aeolus::Conductor::Hwp['small-x86_64'],
+ Aeolus::Conductor::Hwp['small-i386']] }
Aeolus::Conductor::Provider<| |> -> Aeolus::Conductor::Logout["admin"]
}
--
1.7.7.6
12 years, 1 month
[PATCH conductor] BZ 802847 - fix sorting of matched hwp results and hwp matching when there are multiple values for architecture
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=802847
The first element of the matched results was being returned. It should use the sorted results. This is why we are seeing xlarge as the matched hardware profile instead of large even though memory is specified as 512m which matches both.
When there multiple architectures defined in a provider hardware profile. The matching logic only uses the first listed value. This means it would only see i386 and not x86_64 when architecture is specified as ['i386', 'x86_64'].
We will begin to see multiple architectures defined for ec2 once this patch in deltacloud is released: https://git-wip-us.apache.org/repos/asf?p=deltacloud.git;a=commitdiff;h=f...
Fixed the matching logic to consider all options that may be listed in architecture.
Once both conductor and deltacloud changes are in. m1.small will be usable and matched when memory is specified as 512m and architecture is specified as x86_64.
---
src/app/models/hardware_profile.rb | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/app/models/hardware_profile.rb b/src/app/models/hardware_profile.rb
index 087d2ae..2a574fe 100644
--- a/src/app/models/hardware_profile.rb
+++ b/src/app/models/hardware_profile.rb
@@ -144,7 +144,8 @@ class HardwareProfile < ActiveRecord::Base
# of hw profile)
hardware_profiles.sort do |hw1, hw2|
BigDecimal.new(hw1.memory.sort_value(false).to_s) <=> BigDecimal.new(hw2.memory.sort_value(false).to_s)
- end.first
+ end
+ hardware_profiles.first
end
def self.generate_override_property_values(front_end_hwp, back_end_hwp)
@@ -213,7 +214,7 @@ class HardwareProfile < ActiveRecord::Base
match_hardware_profile_property(front_end_hwp.memory, back_end_hwp.memory) &&
match_hardware_profile_property(front_end_hwp.cpu, back_end_hwp.cpu) &&
match_hardware_profile_property(front_end_hwp.storage, back_end_hwp.storage) &&
- front_end_hwp.architecture.value == back_end_hwp.architecture.value
+ match_hardware_profile_property(front_end_hwp.architecture, back_end_hwp.architecture)
end
def self.match_hardware_profile_property(front_end_property, back_end_property)
@@ -230,10 +231,16 @@ class HardwareProfile < ActiveRecord::Base
match = BigDecimal.new(back_end_property.range_last.to_s) >= BigDecimal.new(front_end_property.value.to_s) ? true : false
when "enum"
create_array_from_property(back_end_property).each do |value|
- if front_end_property.value.nil? or BigDecimal.new(value) >= BigDecimal.new(front_end_property.value.to_s)
+ if front_end_property.value.nil?
+ match = true
+ elsif !is_numeric(front_end_property.value) || !is_numeric(value)
+ if front_end_property.value == value
match = true
end
+ elsif BigDecimal.new(value) >= BigDecimal.new(front_end_property.value.to_s)
+ match = true
end
+ end
end
return match
end
@@ -248,4 +255,8 @@ class HardwareProfile < ActiveRecord::Base
end
end
+ def self.is_numeric(value)
+ true if Float(value) rescue false
+ end
+
end
--
1.7.7.6
12 years, 1 month
[PATCH configure] BZ #802871: added man pages for configure executables
by Mo Morsi
---
Rakefile | 2 +-
contrib/aeolus-configure.spec.in | 6 ++++++
docs/man1/aeolus-check-services.1 | 18 ++++++++++++++++++
docs/man1/aeolus-cleanup.1 | 28 ++++++++++++++++++++++++++++
docs/man1/aeolus-configure.1 | 27 +++++++++++++++++++++++++++
docs/man1/aeolus-restart-services.1 | 18 ++++++++++++++++++
6 files changed, 98 insertions(+), 1 deletions(-)
mode change 100644 => 100755 bin/aeolus-cleanup
create mode 100644 docs/man1/aeolus-check-services.1
create mode 100644 docs/man1/aeolus-cleanup.1
create mode 100644 docs/man1/aeolus-configure.1
create mode 100644 docs/man1/aeolus-restart-services.1
diff --git a/Rakefile b/Rakefile
index 504fa53..f0bb9c5 100644
--- a/Rakefile
+++ b/Rakefile
@@ -34,7 +34,7 @@ PKG_VERSION = "2.6.0"
rpm_task =
Rake::RpmTask.new(RPM_SPEC, {:suffix => '.in', :pkg_version => PKG_VERSION}) do |rpm|
rpm.need_tar = true
- rpm.package_files.include("COPYING", "bin/*", "recipes/**/*", "conf/*")
+ rpm.package_files.include("COPYING", "bin/*", "recipes/**/*", "conf/*", "docs/**/*")
rpm.topdir = "#{RPMBUILD_DIR}"
end
diff --git a/bin/aeolus-cleanup b/bin/aeolus-cleanup
old mode 100644
new mode 100755
diff --git a/contrib/aeolus-configure.spec.in b/contrib/aeolus-configure.spec.in
index 9fae261..22ba7b6 100644
--- a/contrib/aeolus-configure.spec.in
+++ b/contrib/aeolus-configure.spec.in
@@ -36,6 +36,7 @@ Aeolus Configure Puppet Recipe
%build
%install
+%{__mkdir} -p %{buildroot}/%{_mandir}/man1
%{__mkdir} -p %{buildroot}/%{aeolushome}/modules/aeolus %{buildroot}/%{_sbindir}
%{__mkdir} -p %{buildroot}/%{_bindir}
%{__mkdir} -p %{buildroot}%{_sysconfdir}/aeolus-configure/nodes
@@ -52,6 +53,7 @@ Aeolus Configure Puppet Recipe
%{__cp} -R %{pbuild}/bin/aeolus-restart-services %{buildroot}/%{_sbindir}/
%{__cp} -R %{pbuild}/bin/aeolus-configure %{buildroot}/%{_sbindir}/
%{__cp} -R %{pbuild}/bin/aeolus-cleanup %{buildroot}/%{_sbindir}/
+%{__cp} %{pbuild}/docs/man1/* %{buildroot}/%{_mandir}/man1/
%files
%doc COPYING
@@ -61,9 +63,13 @@ Aeolus Configure Puppet Recipe
%attr(0600, root, root) %{_sysconfdir}/aeolus-configure/nodes/*
%attr(0755, root, root) %{_bindir}/aeolus-check-services
%attr(0755, root, root) %{_sbindir}/aeolus-restart-services
+%doc %{_mandir}/man1/*
%{aeolushome}
%changelog
+* Fri Mar 16 2012 Mo Morsi <mmorsi(a)redhat.com> - 2.5.0-3
+- include man pages
+
* Mon Jan 09 2012 Steve Linabery <slinaber(a)redhat.com> - 2.5.0-2
- f0043e8 Remove extra_release from spec.in
- c4d94bf Bump release
diff --git a/docs/man1/aeolus-check-services.1 b/docs/man1/aeolus-check-services.1
new file mode 100644
index 0000000..dc10192
--- /dev/null
+++ b/docs/man1/aeolus-check-services.1
@@ -0,0 +1,18 @@
+.\" Originally generated by help2man 1.40.4, modified since.
+.TH AEOLUS-CHECK-SERVICES "1" "March 2012" "aeolus-check-services " "User Commands"
+.SH NAME
+aeolus-check-services \- manual page for aeolus-check-services
+.SH SYNOPSIS
+.B aeolus-check-services
+[\fIOPTION\fR]
+.SH DESCRIPTION
+Show status of Aeolus services.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+display this help and exit
+.PP
+To restart aeolus services please use aeolus\-restart\-services.
+.SH "SEE ALSO"
+The full documentation for
+.B aeolus-check-services
+is maintained at http://www.aeolusproject.org.
diff --git a/docs/man1/aeolus-cleanup.1 b/docs/man1/aeolus-cleanup.1
new file mode 100644
index 0000000..165eef9
--- /dev/null
+++ b/docs/man1/aeolus-cleanup.1
@@ -0,0 +1,28 @@
+.\" Originally generated by help2man 1.40.4, modified since.
+.TH AEOLUS-CLEANUP "1" "March 2012" "aeolus-cleanup " "User Commands"
+.SH NAME
+aeolus-cleanup \- manual page for aeolus-cleanup
+.SH DESCRIPTION
+USAGE:
+aeolus\-cleanup [\-d|\-\-debug] [\-h|\-\-help] [\-v|\-\-verbose] [\-s|\-\-savedata] [\-p|\-\-profile]
+.PP
+.SS "OPTIONS:"
+.TP
+\fB\-h\fR | \fB\-\-help\fR
+Show this message.
+.TP
+\fB\-d\fR | \fB\-\-debug\fR
+Debug logging mode.
+.TP
+\fB\-v\fR | \fB\-\-verbose\fR
+Verbose logging mode.
+.TP
+\fB\-s\fR | \fB\-\-savedata\fR
+Do not delete existing data.
+.TP
+\fB\-p\fR | \fB\-\-profile\fR
+Name of profile to use. A comma separated list can be used to specify multiple profiles.
+.SH "SEE ALSO"
+The full documentation for
+.B aeolus-cleanup
+is maintained at http://www.aeolusproject.org.
diff --git a/docs/man1/aeolus-configure.1 b/docs/man1/aeolus-configure.1
new file mode 100644
index 0000000..66b1bfd
--- /dev/null
+++ b/docs/man1/aeolus-configure.1
@@ -0,0 +1,27 @@
+.\" Originally generated by help2man 1.40.4, modified since.
+.TH AEOLUS-CONFIGURE "1" "March 2012" "aeolus-configure " "User Commands"
+.SH NAME
+aeolus-configure \- manual page for aeolus-configure
+.SH DESCRIPTION
+USAGE:
+aeolus\-configure [\-d|\-\-debug] [\-h|\-\-help] [\-v|\-\-verbose] [\-p|\-\-profile]
+.PP
+.SS "OPTIONS:"
+.TP
+\fB\-h\fR | \fB\-\-help\fR
+Show this message.
+.TP
+\fB\-d\fR | \fB\-\-debug\fR
+Debug logging mode.
+.TP
+\fB\-v\fR | \fB\-\-verbose\fR
+Verbose logging mode.
+Note that you can only set one of the previous two options per run. If both are set,
+the last one passed in will be honored.
+.TP
+\fB\-p\fR | \fB\-\-profile\fR
+Name of profile to use. A comma separated list can be used to specify multiple profiles.
+.SH "SEE ALSO"
+The full documentation for
+.B aeolus-configure
+is maintained at http://www.aeolusproject.org.
diff --git a/docs/man1/aeolus-restart-services.1 b/docs/man1/aeolus-restart-services.1
new file mode 100644
index 0000000..e4d7d65
--- /dev/null
+++ b/docs/man1/aeolus-restart-services.1
@@ -0,0 +1,18 @@
+.\" Originally generated by help2man 1.40.4, modified since.
+.TH AEOLUS-RESTART-SERVICES "1" "March 2012" "aeolus-restart-services " "User Commands"
+.SH NAME
+aeolus-restart-services \- manual page for aeolus-restart-services
+.SH SYNOPSIS
+.B aeolus-restart-services
+[\fIOPTION\fR]
+.SH DESCRIPTION
+Restart Aeolus services.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+display this help and exit
+.PP
+To show status of aeolus services please use aeolus\-check\-services.
+.SH "SEE ALSO"
+The full documentation for
+.B aeolus-restart-services
+is maintained at http://www.aeolusproject.org.
--
1.7.6.5
12 years, 1 month