[PATCH conductor] modified realm.feature to use element ids
by Tomas Hrcka
---
src/app/views/realms/_mapping.haml | 4 ++--
src/app/views/realms/show.haml | 4 ++--
src/features/realm.feature | 28 ++++++++++++++--------------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/app/views/realms/_mapping.haml b/src/app/views/realms/_mapping.haml
index dfdbdbb..1a57359 100644
--- a/src/app/views/realms/_mapping.haml
+++ b/src/app/views/realms/_mapping.haml
@@ -1,6 +1,6 @@
- form_tag multi_destroy_realm_mappings_path(:frontend_realm_id => @realm.id) do
- = link_to "Add mapping to realm", new_realm_mapping_path(:frontend_realm_id => @realm.id, :realm_or_provider_type => 'Realm'), :class => "button"
- = link_to "Add mapping to provider", new_realm_mapping_path(:frontend_realm_id => @realm.id, :realm_or_provider_type => 'Provider'), :class => "button"
+ = link_to "Add mapping to realm", new_realm_mapping_path(:frontend_realm_id => @realm.id, :realm_or_provider_type => 'Realm'), :class => "button", :id => 'mapping_to_realm_button'
+ = link_to "Add mapping to provider", new_realm_mapping_path(:frontend_realm_id => @realm.id, :realm_or_provider_type => 'Provider'), :class => "button", :id => 'mapping_to_provider_button'
= submit_tag "Delete", :id => 'delete_button', :class => 'button danger'
diff --git a/src/app/views/realms/show.haml b/src/app/views/realms/show.haml
index e98f814..2368ee0 100644
--- a/src/app/views/realms/show.haml
+++ b/src/app/views/realms/show.haml
@@ -4,8 +4,8 @@
#obj_actions.button-container
= link_to 'New Realm', new_realm_url, :class => 'button primary', :id => 'new_realm_button'
.button-group
- = link_to 'Edit', edit_realm_path(@realm), :class => 'button pill'
- = button_to 'Delete', realm_path(@realm), :method => :delete, :confirm => "Are you sure you want to delete?", :class => 'button pill danger'
+ = link_to 'Edit', edit_realm_path(@realm), :class => 'button pill', :id => 'edit_realm_button'
+ = button_to 'Delete', realm_path(@realm), :method => :delete, :confirm => "Are you sure you want to delete?", :class => 'button pill danger', :id => 'delete_realm_button'
.corner
%section.content-section.realm
diff --git a/src/features/realm.feature b/src/features/realm.feature
index a4936af..70ddc90 100644
--- a/src/features/realm.feature
+++ b/src/features/realm.feature
@@ -11,19 +11,19 @@ Feature: Manage Realms
Scenario: Create new frontend realm
Given I am on the realms page
- When I follow "New Realm"
+ When I follow "new_realm_button"
Then I should see "Create a new Realm"
- When I fill in "frontend_realm[name]" with "testrealm2"
+ When I fill in "frontend_realm_name" with "testrealm2"
And I press "Save"
Then I should see "Realm was added."
Scenario: Validate unique frontend realm name
Given I am on the realms page
And there is a realm "testrealm1"
- When I follow "New Realm"
+ When I follow "new_realm_button"
Then I should see "Create a new Realm"
- When I fill in "frontend_realm[name]" with "testrealm1"
- And I press "Save"
+ When I fill in "frontend_realm_name" with "testrealm1"
+ And I press "frontend_realm_submit"
Then I should see "Name has already been taken"
Scenario: Add realm mapping
@@ -31,9 +31,9 @@ Feature: Manage Realms
And there is a realm "testrealm1"
And a provider "provider1" exists
When I follow "testrealm1"
- And I follow "Add mapping to provider"
+ And I follow "mapping_to_provider_button"
Then I should see "Create a new Realm Mapping"
- When I press "Save"
+ When I press "realm_backend_target_submit"
Then I should see "Realm mapping was added."
Scenario: Add a realm mapping w/o selecting backend target
@@ -41,19 +41,19 @@ Feature: Manage Realms
And there is a realm "testrealm1"
And there is no provider
When I follow "testrealm1"
- And I follow "Add mapping to provider"
+ And I follow "mapping_to_provider_button"
Then I should see "Create a new Realm Mapping"
- When I press "Save"
+ And I press "realm_backend_target_submit"
Then I should see "Realm or provider can't be blank"
Scenario: Change the name
Given I am on the realms page
And there is a realm "testrealm1"
When I follow "testrealm1"
- And I follow "Edit"
+ And I follow "edit_realm_button"
Then I should see "Properties"
- When I fill in "frontend_realm[name]" with "testrealm2"
- And I press "Save"
+ When I fill in "frontend_realm_name" with "testrealm2"
+ And I press "frontend_realm_submit"
Then I should see "Realm updated successfully!"
Scenario: Show realm detials
@@ -68,14 +68,14 @@ Feature: Manage Realms
And there are 2 realms
When I check "testrealm2" realm
And I check "testrealm1" realm
- And I press "Delete"
+ And I press "delete_button"
Then there should be only 0 realms
And I should be on the realms page
And I should see "These Realms were deleted: testrealm1, testrealm2"
Scenario: Delete realm without selecting one
Given I am on the realms page
- When I press "Delete"
+ When I press "delete_button"
Then I should be on the realms page
And I should see "You must select at least one realm to delete."
--
1.7.4.4
12 years, 9 months
[PATCH conductor] Changed error message on provider account creation
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
.../controllers/provider_accounts_controller.rb | 2 +-
src/features/provider_account.feature | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/app/controllers/provider_accounts_controller.rb b/src/app/controllers/provider_accounts_controller.rb
index 63523b4..59616a0 100644
--- a/src/app/controllers/provider_accounts_controller.rb
+++ b/src/app/controllers/provider_accounts_controller.rb
@@ -74,7 +74,7 @@ class ProviderAccountsController < ApplicationController
flash[:notice] = t('provider_accounts.index.account_added', :list => @provider_account.name, :count => 1)
redirect_to provider_account_path(@provider_account)
else
- flash[:error] = "Credentials are invalid!"
+ flash[:error] = "Cannot add the provider account."
render :action => 'new' and return
end
rescue Exception => e
diff --git a/src/features/provider_account.feature b/src/features/provider_account.feature
index e4d8d0b..778d3ea 100644
--- a/src/features/provider_account.feature
+++ b/src/features/provider_account.feature
@@ -59,7 +59,8 @@ Feature: Manage Provider Accounts
And I fill in "provider_account[credentials_hash][password]" with "wrongpassword"
And I fill in "quota[maximum_running_instances]" with "13"
And I press "Save"
- Then I should see "Credentials are invalid!"
+ Then I should see "Cannot add the provider account."
+ Then I should see "Login Credenials are Invalid for this Provider"
Scenario: Delete a provider account
Given there is a provider named "testprovider"
--
1.7.4.4
12 years, 9 months
[PATCH aeolus-image] BZ#723934 Check bucket exists in iwhd
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
lib/list_command.rb | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/lib/list_command.rb b/lib/list_command.rb
index 52f112b..ac0bc17 100644
--- a/lib/list_command.rb
+++ b/lib/list_command.rb
@@ -6,6 +6,7 @@ module Aeolus
end
def images
+ check_bucket_exists("images")
images = [["IMAGE ID", "LASTEST PUSHED BUILD", "NAME", "TARGET", "OS", "OS VERSION", "ARCH", "DESCRIPTION"]]
doc = Nokogiri::XML iwhd['/target_images'].get
# Check for any invalid data in iwhd
@@ -34,6 +35,7 @@ module Aeolus
end
def builds
+ check_bucket_exists("builds")
doc = Nokogiri::XML iwhd['/builds'].get
doc.xpath("/objects/object/key").each do |build|
if iwhd['/builds/' + build.text + "/image"].get == @options[:id]
@@ -44,6 +46,7 @@ module Aeolus
end
def targetimages
+ check_bucket_exists("target-images")
doc = Nokogiri::XML iwhd['/target_images'].get
doc.xpath("/objects/object/key").each do |target_image|
begin
@@ -136,6 +139,14 @@ module Aeolus
""
end
end
+
+ def check_bucket_exists(bucket)
+ begin
+ iwhd["/" + bucket].get
+ rescue
+ quit(0)
+ end
+ end
end
end
end
--
1.7.4
12 years, 9 months
[PATCH aeolus-image] Update Doc to show listing completed builds
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
man/aeolus-image-build.1 | 2 +-
man/aeolus-image-list.1 | 7 ++-----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/man/aeolus-image-build.1 b/man/aeolus-image-build.1
index ba238e1..9a381ee 100644
--- a/man/aeolus-image-build.1
+++ b/man/aeolus-image-build.1
@@ -4,7 +4,7 @@ aeolus-image build \- command for building aeolus images
.SH SYNOPSIS
.B aeolus-image build [\-h|--help] [\-u|--username] [\-w|--password] [\-I|--image [image-id]] [\-e|--template [path-to-template]] [\-t|--targets [targets]] [\-d|--daemon]
.SH DESCRIPTION
-aeolus-image build command allows users to build new images based on a given TDL template file for a set of specified targets such e.g. EC2, RHEVM etc...
+aeolus-image build command allows users to build new images based on a given TDL template file for a set of specified targets such e.g. EC2, RHEVM etc... See list man list target-images for information on how to list the completed builds.
.SH OPTIONS
.TP
\-u, --user <username>
diff --git a/man/aeolus-image-list.1 b/man/aeolus-image-list.1
index f6ab0d3..1368ed6 100644
--- a/man/aeolus-image-list.1
+++ b/man/aeolus-image-list.1
@@ -28,13 +28,10 @@ Get usage information for this command and associated commmands
Retrieve a list of images
.TP
\-b, --builds <image id>
-Retrieve the builds of an image
+Retrieve a list of builds of for a particular image
.TP
\-t, --targetimages <build id>
-Retrieve the target images from a build
-.TP
-\-P, --providerimages
-Retrieve the provider images from a target image
+Retrieve a list of completed target-images builds for a particular build id
.TP
\-g, --targets
Retrieve a list of available targets
--
1.7.4
12 years, 9 months
[PATCH aeolus-image] Update Doc to show listing completed builds
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
man/aeolus-image-build.1 | 2 +-
man/aeolus-image-list.1 | 7 ++-----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/man/aeolus-image-build.1 b/man/aeolus-image-build.1
index ba238e1..9a381ee 100644
--- a/man/aeolus-image-build.1
+++ b/man/aeolus-image-build.1
@@ -4,7 +4,7 @@ aeolus-image build \- command for building aeolus images
.SH SYNOPSIS
.B aeolus-image build [\-h|--help] [\-u|--username] [\-w|--password] [\-I|--image [image-id]] [\-e|--template [path-to-template]] [\-t|--targets [targets]] [\-d|--daemon]
.SH DESCRIPTION
-aeolus-image build command allows users to build new images based on a given TDL template file for a set of specified targets such e.g. EC2, RHEVM etc...
+aeolus-image build command allows users to build new images based on a given TDL template file for a set of specified targets such e.g. EC2, RHEVM etc... See list man list target-images for information on how to list the completed builds.
.SH OPTIONS
.TP
\-u, --user <username>
diff --git a/man/aeolus-image-list.1 b/man/aeolus-image-list.1
index f6ab0d3..1368ed6 100644
--- a/man/aeolus-image-list.1
+++ b/man/aeolus-image-list.1
@@ -28,13 +28,10 @@ Get usage information for this command and associated commmands
Retrieve a list of images
.TP
\-b, --builds <image id>
-Retrieve the builds of an image
+Retrieve a list of builds of for a particular image
.TP
\-t, --targetimages <build id>
-Retrieve the target images from a build
-.TP
-\-P, --providerimages
-Retrieve the provider images from a target image
+Retrieve a list of completed target-images builds for a particular build id
.TP
\-g, --targets
Retrieve a list of available targets
--
1.7.4
12 years, 9 months
[PATCH] BZ#723934 Check bucket exists in iwhd
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
lib/list_command.rb | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/lib/list_command.rb b/lib/list_command.rb
index 52f112b..ac0bc17 100644
--- a/lib/list_command.rb
+++ b/lib/list_command.rb
@@ -6,6 +6,7 @@ module Aeolus
end
def images
+ check_bucket_exists("images")
images = [["IMAGE ID", "LASTEST PUSHED BUILD", "NAME", "TARGET", "OS", "OS VERSION", "ARCH", "DESCRIPTION"]]
doc = Nokogiri::XML iwhd['/target_images'].get
# Check for any invalid data in iwhd
@@ -34,6 +35,7 @@ module Aeolus
end
def builds
+ check_bucket_exists("builds")
doc = Nokogiri::XML iwhd['/builds'].get
doc.xpath("/objects/object/key").each do |build|
if iwhd['/builds/' + build.text + "/image"].get == @options[:id]
@@ -44,6 +46,7 @@ module Aeolus
end
def targetimages
+ check_bucket_exists("target-images")
doc = Nokogiri::XML iwhd['/target_images'].get
doc.xpath("/objects/object/key").each do |target_image|
begin
@@ -136,6 +139,14 @@ module Aeolus
""
end
end
+
+ def check_bucket_exists(bucket)
+ begin
+ iwhd["/" + bucket].get
+ rescue
+ quit(0)
+ end
+ end
end
end
end
--
1.7.4
12 years, 9 months
Conductor branch maintenance
by Chris Lalancette
All,
Just a heads up that I just finished some branch maintenance on the
conductor repository, to make things absolutely clear.
1) On the next branch, I removed all of the code and added a readme file
telling people that the next branch is dead and that they should develop
against master instead.
2) I've done the same thing on the 0.3.0_RC1 branch. Since this is intended
to be a long term maintenance branch, calling it 0.3.0_RC1 didn't make much
sense. I've left the 0.3.0_RC1 tag, but deprecated the branch.
3) I've added the 0.3.x branch, which is intended for long term maintenance of
the 0.3.x series of conductor.
If you are a developer working on new features, you should work against the
master branch. If you are a developer working on a bugfix, you should work
against the master branch, and then cherry-pick your fixes onto the 0.3.x
branch as appropriate. If any of this is unclear, please talk to me, morazi,
or markmc about our branching strategy.
--
Chris Lalancette
12 years, 9 months