[PATCH aeolus-cli] Fix build status reporting
by Richard Su
The command should be calling TargetImage and not ProviderImage to check build status.
---
lib/aeolus_cli/command/status_command.rb | 2 +-
spec/command/status_command_spec.rb | 4 +-
.../command/status_command/targetimage.yml | 24 +++++++++++++------
3 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/lib/aeolus_cli/command/status_command.rb b/lib/aeolus_cli/command/status_command.rb
index a3f5a6a..d37e9a2 100644
--- a/lib/aeolus_cli/command/status_command.rb
+++ b/lib/aeolus_cli/command/status_command.rb
@@ -25,7 +25,7 @@ module Aeolus
def run
begin
if @options[:targetimage]
- ti = Aeolus::CLI::ProviderImage.find(@options[:targetimage])
+ ti = Aeolus::CLI::TargetImage.find(@options[:targetimage])
puts "Build Status: " + ti.status
elsif @options[:providerimage]
pi = Aeolus::CLI::ProviderImage.find(@options[:providerimage])
diff --git a/spec/command/status_command_spec.rb b/spec/command/status_command_spec.rb
index ab4f119..4888c53 100644
--- a/spec/command/status_command_spec.rb
+++ b/spec/command/status_command_spec.rb
@@ -19,7 +19,7 @@ module Aeolus
describe StatusCommand do
it "should return status for target image" do
VCR.use_cassette('command/status_command/targetimage') do
- @options[:targetimage] = ['1a0b179b-eb8a-4ce5-96e5-2b01ef2089cb']
+ @options[:targetimage] = ['3a105ed3-20e6-410a-815d-f0ac756f2473']
s = StatusCommand.new(@options, @output)
begin
@@ -27,7 +27,7 @@ module Aeolus
rescue SystemExit => e
e.status.should == 0
end
- $stdout.string.should include("Build Status: FAILED")
+ $stdout.string.should include("Build Status: COMPLETE")
end
end
diff --git a/spec/vcr/cassettes/command/status_command/targetimage.yml b/spec/vcr/cassettes/command/status_command/targetimage.yml
index 3e77a6d..db64b7b 100644
--- a/spec/vcr/cassettes/command/status_command/targetimage.yml
+++ b/spec/vcr/cassettes/command/status_command/targetimage.yml
@@ -2,9 +2,11 @@
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
- uri: https://admin:password@localhost:443/conductor/api/provider_images/1a0b17...
+ uri: https://admin:password@localhost:443/conductor/api/target_images/3a105ed3...
body:
headers:
+ accept-language:
+ - en
accept:
- application/xml
response: !ruby/struct:VCR::Response
@@ -15,24 +17,30 @@
x-ua-compatible:
- IE=Edge,chrome=1
etag:
- - "\"a61cb9f4c82824a7fe5c8107f167cff1\""
+ - "\"8eabd74801c9981f6c3df69dc81c19fb\""
content-type:
- application/xml; charset=utf-8
server:
- thin 1.2.11 codename Bat-Shit Crazy
date:
- - Tue, 22 Nov 2011 23:45:27 GMT
+ - Tue, 06 Dec 2011 19:21:21 GMT
x-runtime:
- - "0.049840"
+ - "0.305330"
set-cookie:
- - _session_id=BAh7CCIPc2Vzc2lvbl9pZCIlNjBhMDU4NTY2MWI2MGRjMWNlNjI2ZmY4YTFkYjQ2ODAiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--ecfe1e213920f3ba82c9b9c191118ee60d03f44c; path=/; HttpOnly
+ - _session_id=BAh7CCIPc2Vzc2lvbl9pZCIlOWE0MzExMDUzY2MzZmU1N2ZiYmRkMDM0NTBjOTNkNGMiGXdhcmRlbi51c2VyLnVzZXIua2V5aQYiEGJyZWFkY3J1bWJzWwA%3D--90ff8cc38ed80b72c16d94834a139008c6928e07; path=/; HttpOnly
cache-control:
- max-age=0, private, must-revalidate
transfer-encoding:
- chunked
body: |+
- <provider_image href='https://localhost/conductor/api/provider_images/1a0b179b-eb8a-4ce5-96e5-2...' id='1a0b179b-eb8a-4ce5-96e5-2b01ef2089cb'>
- <status>FAILED</status>
- </provider_image>
+ <target_image href='https://localhost/conductor/api/target_images/3a105ed3-20e6-410a-815d-f0a...' id='3a105ed3-20e6-410a-815d-f0ac756f2473'>
+ <object_type>target_image</object_type>
+ <template>48bade4b-5b27-4b48-a9ed-a6d75ccfe02f</template>
+ <build href='https://localhost/conductor/api/builds/8b870f9a-ac32-4e21-98fb-76b4cc24e5f1' id='8b870f9a-ac32-4e21-98fb-76b4cc24e5f1'></build>
+ <status>COMPLETE</status>
+ <provider_images>
+ <provider_image href='https://localhost/conductor/api/provider_images/21ba2191-be4e-44b7-8d1d-6...' id='21ba2191-be4e-44b7-8d1d-61f7f50b89c8'></provider_image>
+ </provider_images>
+ </target_image>
http_version: "1.1"
--
1.7.6.4
12 years, 5 months
Ubuntu customization support in Oz
by Chris Lalancette
Hey Steve,
So I finally found a bit of time to go through your patches.
They looked very similar to the ones I had initially come up with, but
you ended up finding a good way around the two issues that I initially
had[1].
I did a bit of cleanup on the patches. First, I made the
comments of the setup/teardown consistent with what the code was
actually doing. Second, I fixed up the imports on Ubuntu.py (your
patch had an unnecessary import guestfs, and was missing an import
libvirt). Finally, I merged the code that I had for doing icicle
generation with your code, so in theory that should now work.
I've now pushed your patches. I have not had time to test them
yet, so if you get a chance please do so and let me know. Thanks for
getting this done, it was in the "half-completed" state for a long
time and it is good to finally commit it.
Thanks,
Chris Lalancette
12 years, 5 months
[PATCH] Fixed list of catalog entries on deployables show page
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/app/controllers/deployables_controller.rb | 2 +-
src/app/views/deployables/show.html.haml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb
index 0072533..f5a894d 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -54,7 +54,7 @@ class DeployablesController < ApplicationController
require_privilege(Privilege::VIEW, @deployable)
save_breadcrumb(catalog_deployable_path(@catalog, @deployable), @deployable.name)
@providers = Provider.all
- @catalogs_options = Catalog.all.map {|c| [c.name, c.id] unless c == @catalog}.compact
+ @catalogs_options = Catalog.list_for_user(current_user, Privilege::VIEW).select {|c| !(a)deployable.catalogs.include?(c)}
add_permissions_inline(@deployable)
@image_details = @deployable.get_image_details
@image_details.each do |assembly|
diff --git a/src/app/views/deployables/show.html.haml b/src/app/views/deployables/show.html.haml
index 9917a82..06964b2 100644
--- a/src/app/views/deployables/show.html.haml
+++ b/src/app/views/deployables/show.html.haml
@@ -85,7 +85,7 @@
.section-controls
= form_for(:catalog_entry, :url => catalog_entries_path) do |f|
= f.label :catalog_id, t('catalog_entries.show.choose_catalog')
- = f.select :catalog_id, options_for_select(@catalogs_options)
+ = f.select :catalog_id, options_for_select((a)catalogs_options.map {|c| [c.name, c.id]})
= f.hidden_field(:deployable_id, :value => @deployable.id)
= f.submit t('catalog_entries.show.add_catalog'), :id => :add_catalog, :class => 'button pill'
.content
--
1.7.7.3
12 years, 5 months
Deployable detail styles
by Jirka Tomasek
Redmine #2857. This patch implements deployable details styling. The
missing icons will be added in another patch.
12 years, 5 months
Do not Push Merge Commits
by Martyn Taylor
Gents,
I've noticed a few people are pushing merge commits to remote repos.
Can we make sure we don't do this, it makes the commit tree very messy.
Instead you can rebase your commits onto master and then push; much
cleaner :)
Thanks
Martyn
12 years, 5 months
[PATCH conductor] pool families list fix
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/pool_families/_list.html.haml | 83 +++++++++++++--------------
1 files changed, 41 insertions(+), 42 deletions(-)
diff --git a/src/app/views/pool_families/_list.html.haml b/src/app/views/pool_families/_list.html.haml
index 8c3e322..1cf70ec 100644
--- a/src/app/views/pool_families/_list.html.haml
+++ b/src/app/views/pool_families/_list.html.haml
@@ -1,44 +1,43 @@
-%section.admin-content-section.pool_families
- %header
- %h2.pools= t("pool_families.pool_families")
- .section-controls
- #obj_actions
- = link_to t("pool_families.index.new_pool_family"), new_pool_family_path, :class => 'button pill', :id => 'new_pool_family_button'
+%header
+ %h2.pools= t("pool_families.pool_families")
+ .section-controls
+ #obj_actions
+ = link_to t("pool_families.index.new_pool_family"), new_pool_family_path, :class => 'button pill', :id => 'new_pool_family_button'
- .content
- - @pool_families.each do |pool_family|
- %table.pool_families
- %caption
- .caption_content
- %header
- %h2
- = link_to pool_family.name, pool_family
- .section-controls
- #obj_actions
- = link_to t(:edit), edit_pool_family_path(pool_family), :class => 'rounded-link'
- = link_to t("pools.new_pool"), new_pool_path, :class => 'rounded-link'
- = link_to t("images.new.new_image"), new_image_path( :environment => pool_family.id), :class => 'rounded-link'
- - unless pool_family.pools.blank?
+.content
+ - @pool_families.each do |pool_family|
+ %table.pool_families
+ %caption
+ .caption_content
+ %header
+ %h2
+ = link_to pool_family.name, pool_family
+ .section-controls
+ #obj_actions
+ = link_to t(:edit), edit_pool_family_path(pool_family), :class => 'rounded-link'
+ = link_to t("pools.new_pool"), new_pool_path, :class => 'rounded-link'
+ = link_to t("images.new.new_image"), new_image_path( :environment => pool_family.id), :class => 'rounded-link'
+ - unless pool_family.pools.blank?
+ %tr
+ %th= t("pool_families.index.pool_name")
+ %th= t("pool_families.index.deployments")
+ %th= t("pool_families.index.total_instancies")
+ %th= t("pool_families.index.pending_instances")
+ %th= t("pool_families.index.failed_instances")
+ %th= t("pool_families.index.quota_used")
+ %th= t("pool_families.index.active_instances")
+ %th= t("pool_families.index.available_instances")
+ %th= t("pool_families.index.catalog")
+ %th
+ - pool_family.pools.each do |pool|
%tr
- %th= t("pool_families.index.pool_name")
- %th= t("pool_families.index.deployments")
- %th= t("pool_families.index.total_instancies")
- %th= t("pool_families.index.pending_instances")
- %th= t("pool_families.index.failed_instances")
- %th= t("pool_families.index.quota_used")
- %th= t("pool_families.index.active_instances")
- %th= t("pool_families.index.available_instances")
- %th= t("pool_families.index.catalog")
- %th
- - pool_family.pools.each do |pool|
- %tr
- %td= link_to pool.name, pool
- %td= pool.deployments.count
- %td= pool.statistics[:total_instances]
- %td= pool.statistics[:instances_pending]
- %td= pool.statistics[:instances_failed]
- %td= pool.statistics[:quota_percent]
- %td= pool.statistics[:used_quota]
- %td= pool.statistics[:available_quota].nil? ? raw('∞') : pool.statistics[:available_quota]
- %td= link_to pool.catalogs.first.name, catalog_path(pool.catalogs.first) if pool.catalogs.any?
- %td= link_to t(:edit), edit_pool_path(pool), :class => 'rounded-link'
+ %td= link_to pool.name, pool
+ %td= pool.deployments.count
+ %td= pool.statistics[:total_instances]
+ %td= pool.statistics[:instances_pending]
+ %td= pool.statistics[:instances_failed]
+ %td= pool.statistics[:quota_percent]
+ %td= pool.statistics[:used_quota]
+ %td= pool.statistics[:available_quota].nil? ? raw('∞') : pool.statistics[:available_quota]
+ %td= link_to pool.catalogs.first.name, catalog_path(pool.catalogs.first) if pool.catalogs.any?
+ %td= link_to t(:edit), edit_pool_path(pool), :class => 'rounded-link'
--
1.7.7.3
12 years, 5 months
[PATCH] BZ#759149 System templates with repo names that have spaces fail to push to cloud provider
by Chris Alfonso
When a repository has a client certificate associated with it and the repo name has a space in it,
the scp file copy fails. I've converted the spaces to underscores for the file and directory structure.
---
oz/RedHat.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/oz/RedHat.py b/oz/RedHat.py
index a2fd845..48a4483 100644
--- a/oz/RedHat.py
+++ b/oz/RedHat.py
@@ -962,7 +962,7 @@ class RedHatCDYumGuest(RedHatCDGuest):
# Create the local copies of any needed SSL files
def _create_certfiles(repo, cert, fileext, propname):
certdict[propname] = {}
- filename = "%s-%s" % (repo.name, fileext)
+ filename = "%s-%s" % (repo.name.replace(" ", "_"), fileext)
localname = os.path.join(self.icicle_tmp, filename)
certdict[propname]["localname"] = localname
f = open(localname, 'w')
@@ -1013,7 +1013,7 @@ class RedHatCDYumGuest(RedHatCDGuest):
if not host and not guest:
raise oz.OzException.OzException("Could not reach repository %s from the host or the guest, aborting" % (repo.url))
- filename = repo.name + ".repo"
+ filename = repo.name.replace(" ", "_") + ".repo"
localname = os.path.join(self.icicle_tmp, filename)
f = open(localname, 'w')
f.write("[%s]\n" % repo.name)
--
1.7.6.4
12 years, 5 months
[PATCH] Added rake task to verify the status of licenses in the project
by Francesco Vollero
Signed-off-by: Francesco Vollero <fvollero(a)redhat.com>
---
src/lib/tasks/apache_license.rake | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
create mode 100644 src/lib/tasks/apache_license.rake
diff --git a/src/lib/tasks/apache_license.rake b/src/lib/tasks/apache_license.rake
new file mode 100644
index 0000000..4e444bd
--- /dev/null
+++ b/src/lib/tasks/apache_license.rake
@@ -0,0 +1,16 @@
+namespace :license do
+ desc 'Verify that every file contains apache license'
+
+ task :verify do |t|
+
+ puts "Files that contain GPL License: %d" %
+ (%x[find ./ -type f -iname *.rb -exec grep -qE "http://www.gnu.org/copyleft/gpl.html" {} \\; -print |wc -l])
+ puts "Files that does not have GPL nor ASL: %d" %
+ (%x[find ./ -type f -iname *.rb \\! -exec grep -qE "Copyright|copyleft" {} \\; -print|wc -l])
+
+ puts "Files that contain Apache license: %d" %
+ (%x[find ./ -type f -iname *.rb -exec grep -qE "Apache License" {} \\; -print|wc -l])
+ end
+
+ #namespace end
+end
--
1.7.4.4
12 years, 5 months