Top 5 features for next release
by Mark McLoughlin
Hey,
Chatting to Justin yesterday, I suggested we come up with a list of the
top 5 features for the next release
The idea is that these would be the features we'd concentrate on
polishing off for the release and then promote heavily in the release
announcement with demos etc.
My attempt is below. What am I missing? Any thoughts on the idea?
Cheers,
Mark.
1) New UI design!
- Complete new theme
- Design & Deploy, Monitor and Administer tabs
- Pretty View and Filter View
- Breadcrumbs
- Monitor UI
- "Launch Deployable" and deployments UI
2) RHEV-M, VMWare vSphere and CondorCloud support:
- Available as provider types in conductor
- Image build/upload support
- Audrey config server IP used to get addresses of RHEV-M VMs
3) Deployable concept:
- Launch multiple instances using a deployable definition which
lists the images to use
- Stop all the instances in a deployment in one click
4) aeolus-image CLI:
- Build an image from a template
- Push it to multiple providers
- Import an image
- List images available for use in deployables
5) Reduced complexity:
- Template creation and image building UI removed
- condor_refreshd, the condor classad plugin, warehouse sync,
image factory connector and delayed job daemons all removed
12 years, 9 months
status of getting aeolus conductor into Fedora
by Mo Morsi
The following are the current outstanding BZs relating to getting the
aeolus conductor into Fedora. Note that there are other aeolus
components w/ their respective dependencies making their way into Fedora
after the conductor.
- #719067 - hmac reviewed, update needed
- #719975 - chunky_png reviewed, update needed
- #644809 - webrat approved, needs git request and to be pushed
- #713159 - rbvmomi approved, needs git request and to be pushed
- #706934 - rspec-rails, approved, git done, just needs to be pushed
- #668820 - rdoc submission updated, review needed
- #721057 - rubygem-sass submission updated, review needed
- #721059 - rubygem-dynamic_form submission updated, review needed
- #721063 - rubygem-factory_girl_rails updated, review needed
- #721066 - rubygem-image_factory_console updated, review needed
- #721069 - rubygem-aeolus-cli submission updated,review needed
- #721078 - aeolus-conductor review needed
Additionally a Rails 3 conductor patchset is en route, any assistance in
getting that reviewed and pushed into the codebase would be more than
appreciated.
https://fedorahosted.org/pipermail/aeolus-devel/2011-July/thread.html#2962
Finally, there are a few gems in Fedora including haml and the Rails
components themselves which will need additional tweaking as things get
stabilized with the codebase. Most likely this will be handled on a
case-by-case basis as things are discovered.
That's about it for now, any help getting this done before the F16
deadline would be more than appreciated!
-Mo
12 years, 9 months
Scrollbar and footer positioning fix
by Jirka Tomasek
This fixes BZ713720, Styling is done in custom.scss and can be pushed
into conductor. Changes will be later included in layout.scss
12 years, 9 months
[PATCH] aeolus-image specfile updates to conform to Fedora guidelines
by Mo Morsi
---
.../aeolus-image/rubygem-aeolus-image.spec | 38 ++++++++++++--------
1 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/services/image_factory/aeolus-image/rubygem-aeolus-image.spec b/services/image_factory/aeolus-image/rubygem-aeolus-image.spec
index aa55a2a..a5d3abe 100644
--- a/services/image_factory/aeolus-image/rubygem-aeolus-image.spec
+++ b/services/image_factory/aeolus-image/rubygem-aeolus-image.spec
@@ -1,30 +1,40 @@
-%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
-%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%define gemname aeolus-image
-%define geminstdir %{gemdir}/gems/%{gemname}-%{version}
-%define mandir /usr/man/man1
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global gemname aeolus-image
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global mandir /usr/man/man1
+%global rubyabi 1.8
Summary: Commandline interface for working with the Aeolus cloud suite
-Name: rubygem-%{gemname}
+Name: rubygem-aeolus-image
Version: 0.0.1
-Release: 1%{?dist}%{?extra_release}
+Release: 2%{?dist}%{?extra_release}
Group: Development/Languages
License: GPLv2+ or Ruby
URL: http://aeolusproject.org
+# The source for this packages was pulled from the upstream's git repo.
+# Use the following commands to generate the gem
+# git clone git://git.fedorahosted.org/aeolus/conductor.git
+# git checkout next
+# cd services/image_factory/aeolus-image
+# rake gem
+# grab image_factory_console-0.0.1.gem from the pkg subdir
Source0: %{gemname}-%{version}.gem
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Requires: ruby(abi) = %{rubyabi}
Requires: rubygems
Requires: rubygem(nokogiri) >= 1.4.0
Requires: rubygem(rest-client)
Requires: rubygem(image_factory_console) >= 0.4.0
+BuildRequires: ruby
BuildRequires: rubygems
+
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}
Obsoletes: rubygem-aeolus-cli
-Provides: rubygem(aeolus-cli)
+Provides: rubygem(aeolus-cli)
%description
QMF Console for Aeolus Image Factory
@@ -34,8 +44,6 @@ QMF Console for Aeolus Image Factory
%build
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{gemdir}
gem install --local --install-dir %{buildroot}%{gemdir} \
--force --rdoc %{SOURCE0}
@@ -48,11 +56,7 @@ rmdir %{buildroot}%{gemdir}/bin
mkdir -p %{buildroot}%{mandir}
mv %{buildroot}%{geminstdir}/man/* %{buildroot}%{mandir}
-%clean
-rm -rf %{buildroot}
-
%files
-%defattr(-, root, root, -)
%{_bindir}/aeolus-image
%{gemdir}/gems/%{gemname}-%{version}/
%doc %{gemdir}/doc/%{gemname}-%{version}
@@ -61,7 +65,11 @@ rm -rf %{buildroot}
%{mandir}
%changelog
+* Fri Jul 15 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-2
+- updated package to conform to fedora guidelines
+
* Mon Jul 04 2011 <mtaylor(a)redhat.com> - 0.0.1-1
- Added man files
+
* Wed Jun 15 2011 <jguiditt(a)redhat.com> - 0.0.1-1
- Initial package
--
1.7.6
12 years, 9 months
[PATCH aeolus] BZ#720406 Added validate xml against template schema check
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
.../image_factory/aeolus-image/examples/tdl.rng | 206 ++++++++++++++++++++
.../image_factory/aeolus-image/lib/base_command.rb | 6 +
.../aeolus-image/lib/build_command.rb | 10 +
.../aeolus-image/spec/base_command_spec.rb | 14 ++
.../aeolus-image/spec/build_command_spec.rb | 11 +
.../spec/fixtures/invalid_template.tdl | 18 ++
.../aeolus-image/spec/fixtures/valid_template.tdl | 18 ++
7 files changed, 283 insertions(+), 0 deletions(-)
create mode 100644 services/image_factory/aeolus-image/examples/tdl.rng
create mode 100644 services/image_factory/aeolus-image/spec/fixtures/invalid_template.tdl
create mode 100644 services/image_factory/aeolus-image/spec/fixtures/valid_template.tdl
diff --git a/services/image_factory/aeolus-image/examples/tdl.rng b/services/image_factory/aeolus-image/examples/tdl.rng
new file mode 100644
index 0000000..65fe19a
--- /dev/null
+++ b/services/image_factory/aeolus-image/examples/tdl.rng
@@ -0,0 +1,206 @@
+<?xml version="1.0"?>
+<!-- A Relax NG schema for the TDL (template description language) format -->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <start>
+ <ref name='template'/>
+ </start>
+
+ <define name='template'>
+ <element name='template'>
+ <interleave>
+ <element name='name'>
+ <text/>
+ </element>
+ <element name='os'>
+ <interleave>
+ <element name='name'>
+ <text/>
+ </element>
+ <element name='version'>
+ <text/>
+ </element>
+ <element name='arch'>
+ <choice>
+ <value>i386</value>
+ <value>x86_64</value>
+ </choice>
+ </element>
+ <element name='install'>
+ <choice>
+ <ref name='url'/>
+ <ref name='iso'/>
+ </choice>
+ </element>
+ <optional>
+ <element name='rootpw'>
+ <text/>
+ </element>
+ </optional>
+ <optional>
+ <element name='key'>
+ <text/>
+ </element>
+ </optional>
+ </interleave>
+ </element>
+ <optional>
+ <element name='description'>
+ <text/>
+ </element>
+ </optional>
+ <optional>
+ <element name='packages'>
+ <zeroOrMore>
+ <element name='package'>
+ <attribute name='name'>
+ <text/>
+ </attribute>
+ <interleave>
+ <optional>
+ <element name='repository'>
+ <text/>
+ </element>
+ </optional>
+ <optional>
+ <element name='file'>
+ <text/>
+ </element>
+ </optional>
+ <optional>
+ <element name='arguments'>
+ <text/>
+ </element>
+ </optional>
+ </interleave>
+ </element>
+ </zeroOrMore>
+ </element>
+ </optional>
+ <optional>
+ <element name='files'>
+ <zeroOrMore>
+ <element name='file'>
+ <attribute name='name'>
+ <text/>
+ </attribute>
+ <choice>
+ <ref name='rawtype'/>
+ <ref name='base64type'/>
+ </choice>
+ </element>
+ </zeroOrMore>
+ </element>
+ </optional>
+ <optional>
+ <element name='commands'>
+ <zeroOrMore>
+ <element name='command'>
+ <attribute name='name'>
+ <text/>
+ </attribute>
+ <choice>
+ <ref name='rawtype'/>
+ <ref name='base64type'/>
+ </choice>
+ </element>
+ </zeroOrMore>
+ </element>
+ </optional>
+ <optional>
+ <element name='repositories'>
+ <zeroOrMore>
+ <element name='repository'>
+ <attribute name='name'>
+ <text/>
+ </attribute>
+ <interleave>
+ <element name='url'>
+ <text/>
+ </element>
+ <optional>
+ <element name='signed'>
+ <ref name='bool'/>
+ </element>
+ </optional>
+ </interleave>
+ </element>
+ </zeroOrMore>
+ </element>
+ </optional>
+ </interleave>
+ </element>
+ </define>
+
+ <define name='url'>
+ <attribute name='type'>
+ <value>url</value>
+ </attribute>
+ <element name='url'>
+ <text/>
+ </element>
+ </define>
+
+ <define name='iso'>
+ <attribute name='type'>
+ <value>iso</value>
+ </attribute>
+ <interleave>
+ <element name='iso'>
+ <text/>
+ </element>
+ <optional>
+ <choice>
+ <element name='md5sum'>
+ <text/>
+ </element>
+ <element name='sha1sum'>
+ <text/>
+ </element>
+ <element name='sha256sum'>
+ <text/>
+ </element>
+ </choice>
+ </optional>
+ </interleave>
+ </define>
+
+ <define name='bool'>
+ <choice>
+ <data type="string">
+ <param name="pattern">[Tt][Rr][Uu][Ee]</param>
+ </data>
+ <data type="string">
+ <param name="pattern">[Ff][Aa][Ll][Ss][Ee]</param>
+ </data>
+ <data type="string">
+ <param name="pattern">[Yy][Ee][Ss]</param>
+ </data>
+ <data type="string">
+ <param name="pattern">[Nn][Oo]</param>
+ </data>
+ </choice>
+ </define>
+
+ <define name='rawtype'>
+ <optional>
+ <attribute name='type'>
+ <value>raw</value>
+ </attribute>
+ </optional>
+ <text/>
+ </define>
+
+ <define name='base64'>
+ <data type="string">
+ <param name="pattern">[a-zA-Z0-9+/]+={0,2}</param>
+ </data>
+ </define>
+
+ <define name='base64type'>
+ <attribute name='type'>
+ <value>base64</value>
+ </attribute>
+ <ref name='base64'/>
+ </define>
+
+</grammar>
diff --git a/services/image_factory/aeolus-image/lib/base_command.rb b/services/image_factory/aeolus-image/lib/base_command.rb
index 7e5f72e..f1adcad 100644
--- a/services/image_factory/aeolus-image/lib/base_command.rb
+++ b/services/image_factory/aeolus-image/lib/base_command.rb
@@ -65,6 +65,12 @@ module Aeolus
exit(code)
end
+ def validate_xml_document(schema_path, xml_string)
+ schema = Nokogiri::XML::RelaxNG(File.read(schema_path))
+ doc = Nokogiri::XML xml_string
+ schema.validate(doc)
+ end
+
private
def load_config
begin
diff --git a/services/image_factory/aeolus-image/lib/build_command.rb b/services/image_factory/aeolus-image/lib/build_command.rb
index fe7be5a..50a84f3 100644
--- a/services/image_factory/aeolus-image/lib/build_command.rb
+++ b/services/image_factory/aeolus-image/lib/build_command.rb
@@ -26,6 +26,16 @@ module Aeolus
quit(1)
end
+ # Validate XML against TDL Schema
+ errors = validate_xml_document("examples/tdl.rng", @options[:template_str])
+ if errors.length > 0
+ puts "ERROR: The given Template does not conform to the TDL Schema, see below for specific details:"
+ errors.each do |error|
+ puts "- " + error.message
+ end
+ quit(1)
+ end
+
#This is a temporary hack in case the agent doesn't show up on bus immediately
sleep(5)
@console.build(@options[:template_str], @options[:target], @options[:image], @options[:build]).each do |adaptor|
diff --git a/services/image_factory/aeolus-image/spec/base_command_spec.rb b/services/image_factory/aeolus-image/spec/base_command_spec.rb
index d8459db..31a0aa0 100644
--- a/services/image_factory/aeolus-image/spec/base_command_spec.rb
+++ b/services/image_factory/aeolus-image/spec/base_command_spec.rb
@@ -57,6 +57,20 @@ module Aeolus
File.delete(new_file)
end
end
+
+ describe "#validate_xml_document?" do
+ it "should return errors given non compliant xml" do
+ b = BaseCommand.new
+ errors = b.send(:validate_xml_document, "examples/tdl.rng", File.read("spec/fixtures/invalid_template.tdl"))
+ errors.length.should > 0
+ end
+
+ it "should return no errors" do
+ b = BaseCommand.new
+ errors = b.send(:validate_xml_document, "examples/tdl.rng", File.read("spec/fixtures/valid_template.tdl"))
+ errors.length.should == 0
+ end
+ end
end
end
end
\ No newline at end of file
diff --git a/services/image_factory/aeolus-image/spec/build_command_spec.rb b/services/image_factory/aeolus-image/spec/build_command_spec.rb
index 90e6929..adabb19 100644
--- a/services/image_factory/aeolus-image/spec/build_command_spec.rb
+++ b/services/image_factory/aeolus-image/spec/build_command_spec.rb
@@ -32,6 +32,17 @@ module Aeolus
end
$stdout.string.should include("This combination of parameters is not currently supported")
end
+ it "should exit with appropriate message when a non compliant template is given" do
+ @options[:template] = "spec/fixtures/invalid_template.tdl"
+ @options[:image] = '825c94d1-1353-48ca-87b9-36f02e069a8d'
+ b = BuildCommand.new(@options, @output)
+ begin
+ b.run
+ rescue SystemExit => e
+ e.status.should == 1
+ end
+ $stdout.string.should include("ERROR: The given Template does not conform to the TDL Schema")
+ end
end
describe "#combo_implemented?" do
diff --git a/services/image_factory/aeolus-image/spec/fixtures/invalid_template.tdl b/services/image_factory/aeolus-image/spec/fixtures/invalid_template.tdl
new file mode 100644
index 0000000..c6395d0
--- /dev/null
+++ b/services/image_factory/aeolus-image/spec/fixtures/invalid_template.tdl
@@ -0,0 +1,18 @@
+<bad_template>
+ <name>tmpl1</name>
+ <description>foo</description>
+ <os>
+ <name>Fedora</name>
+ <arch>x86_64</arch>
+ <version>14</version>
+ <install type="url">
+ <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86...</url>
+ </install>
+ </os>
+ <bad_repositories>
+ <repository name="custom">
+ <url>http://repos.fedorapeople.org/repos/aeolus/demo/webapp/</url>
+ <signed>false</signed>
+ </repository>
+ </bad_repositories>
+</bad_template>
\ No newline at end of file
diff --git a/services/image_factory/aeolus-image/spec/fixtures/valid_template.tdl b/services/image_factory/aeolus-image/spec/fixtures/valid_template.tdl
new file mode 100644
index 0000000..2f96604
--- /dev/null
+++ b/services/image_factory/aeolus-image/spec/fixtures/valid_template.tdl
@@ -0,0 +1,18 @@
+<template>
+ <name>tmpl1</name>
+ <description>foo</description>
+ <os>
+ <name>Fedora</name>
+ <arch>x86_64</arch>
+ <version>14</version>
+ <install type="url">
+ <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86...</url>
+ </install>
+ </os>
+ <repositories>
+ <repository name="custom">
+ <url>http://repos.fedorapeople.org/repos/aeolus/demo/webapp/</url>
+ <signed>false</signed>
+ </repository>
+ </repositories>
+</template>
\ No newline at end of file
--
1.7.4
12 years, 9 months
#1914 - Remove unimplemented admin settings
by Matt Wagner
Hi all,
This is a quick patch that removes all the sections in Admin -> Settings that are disabled or unimplemented. I've merely commented them out for now, because there's reason to believe we'll want to add much of this back. But for now, as we're wrapping up a sprint, we don't want to show these things. I also modified en.yml to show text more relevant to the pared-down UI, but left the old value as a comment since it's hopefully a temporary change.
Unfortunately things look quite spartan for now, since there was merely one item that actually worked.
-- Matt
12 years, 9 months
[PATCH conductor] Prevent launching deployables in disabled pools
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=720772
---
src/app/controllers/deployments_controller.rb | 5 +++++
src/app/models/deployment.rb | 5 +++++
src/config/locales/en.yml | 1 +
src/features/deployment.feature | 19 ++++++++++++++-----
src/features/step_definitions/pool_steps.rb | 10 ++++++----
src/features/support/paths.rb | 3 +++
src/spec/factories/pool.rb | 4 ++++
src/spec/models/deployment_spec.rb | 8 +++++++-
8 files changed, 45 insertions(+), 10 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index 84a68c2..1bdd12c 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -22,6 +22,11 @@ class DeploymentsController < ApplicationController
def launch_new
@pool = Pool.find(params[:pool_id]) or raise "Invalid pool"
require_privilege(Privilege::CREATE, Deployment, @pool)
+ unless @pool.enabled
+ flash[:warning] = t 'deployments.disabled_pool'
+ redirect_to pool_path(@pool) and return
+ end
+
@deployment = Deployment.new(:pool_id => @pool.id)
@suggested_deployables = SuggestedDeployable.list_for_user(current_user, Privilege::USE)
init_new_deployment_attrs
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index fe6e194..9a92f93 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -58,6 +58,7 @@ class Deployment < ActiveRecord::Base
validates_uniqueness_of :name, :scope => :pool_id
validates_length_of :name, :maximum => 1024
validates_presence_of :owner_id
+ validate :pool_must_be_enabled
before_destroy :destroyable?
@@ -73,6 +74,10 @@ class Deployment < ActiveRecord::Base
end
end
+ def pool_must_be_enabled
+ errors.add(:pool, "must be enabled") unless pool and pool.enabled
+ end
+
def object_list
super << pool
end
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 1564983..146df60 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -82,6 +82,7 @@ en:
deployment: Deployment
deployment_name: Deployment Name
confirm_delete: "Are you sure you want to delete this deployment?"
+ disabled_pool: "Cannot launch a Deployment in this Pool. The pool has been disabled."
updated:
one: "The deployment %{list} was successfully updated."
other: "The deployments %{list} were successfully updated."
diff --git a/src/features/deployment.feature b/src/features/deployment.feature
index 5845287..478e2b4 100644
--- a/src/features/deployment.feature
+++ b/src/features/deployment.feature
@@ -58,6 +58,15 @@ Feature: Manage Deployments
Then I should see "Created"
Then I should see "mynewdeployment"
+ Scenario: Launch a deployment in a disabled pool
+ Given a pool "Disabled" exists and is disabled
+ And there is "front_hwp1" conductor hardware profile
+ And there is "front_hwp2" conductor hardware profile
+ When I am viewing the pool "Disabled"
+ And I follow "New Deployment"
+ Then I should see "pool has been disabled"
+ And I should be on the page for the pool "Disabled"
+
Scenario: Stop deployments
Given there is a deployment named "testdeployment" belonging to "testdeployable" owned by "testuser"
When I go to the deployments page
@@ -105,19 +114,19 @@ Feature: Manage Deployments
And I should see "Jenkins"
Scenario: View all deployments in JSON format
- And there are 2 deployments
+ Given there are 2 deployments
And I accept JSON
When I go to the deployments page
Then I should see 2 deployments in JSON format
Scenario: View a deployment in JSON format
- And a deployment "mockdeployment" exists
+ Given a deployment "mockdeployment" exists
And I accept JSON
When I am viewing the deployment "mockdeployment"
Then I should see deployment "mockdeployment" in JSON format
Scenario: View a deployment via XHR
- And a deployment "mockdeployment" exists
+ Given a deployment "mockdeployment" exists
And the deployment "mockdeployment" has an instance named "myinstance"
And I request XHR
When I am viewing the deployment "mockdeployment"
@@ -125,12 +134,12 @@ Feature: Manage Deployments
And I should see "myinstance"
Scenario: Create a deployment and get JSON response
- And I accept JSON
+ Given I accept JSON
When I create a deployment
Then I should get back a deployment in JSON format
Scenario: Create a deployment and get XHR response
- And I request XHR
+ Given I request XHR
When I create a deployment
Then I should get back a partial
diff --git a/src/features/step_definitions/pool_steps.rb b/src/features/step_definitions/pool_steps.rb
index e9035b6..cb13a17 100644
--- a/src/features/step_definitions/pool_steps.rb
+++ b/src/features/step_definitions/pool_steps.rb
@@ -19,13 +19,15 @@ end
Given /^a pool "([^"]*)" exists$/ do |pool_name|
pool_family = PoolFamily.find_by_name('default') || Factory(:pool_family)
quota = Factory(:quota)
- Pool.create!(:name => pool_name, :pool_family => pool_family, :quota => quota)
+ Pool.create!(:name => pool_name, :pool_family => pool_family, :quota => quota, :enabled => true)
+end
+
+Given /^a pool "([^"]*)" exists and is disabled$/ do |pool_name|
+ Factory :disabled_pool, :name => pool_name
end
Given /^a pool "([^"]*)" exists with deployment "([^"]*)"$/ do |pool_name, deployment_name|
- pool_family = PoolFamily.find_by_name('default') || Factory(:pool_family)
- quota = Factory(:quota)
- pool = Pool.find_by_name(pool_name) || Pool.create!(:name => pool_name, :pool_family => pool_family, :quota => quota)
+ pool = Pool.find_by_name(pool_name) || Factory(:pool, :name => pool_name)
deployment = Deployment.new(:name => deployment_name, :pool => pool, :owner => User.first)
deployment.deployable_xml = DeployableXML.import_xml_from_url("http://localhost/deployables/deployable1.xml")
deployment.save!
diff --git a/src/features/support/paths.rb b/src/features/support/paths.rb
index 12a72d5..35f0cfc 100644
--- a/src/features/support/paths.rb
+++ b/src/features/support/paths.rb
@@ -56,6 +56,9 @@ module NavigationHelpers
when /the show pool page/
pool_path
+ when /the page for the pool "([^"]*)"/
+ pool_path(Pool.find_by_name($1))
+
when /the pool realms page/
pool_realms_path
diff --git a/src/spec/factories/pool.rb b/src/spec/factories/pool.rb
index 918335b..1867ad1 100644
--- a/src/spec/factories/pool.rb
+++ b/src/spec/factories/pool.rb
@@ -8,3 +8,7 @@ end
Factory.define :tpool, :parent => :pool do |p|
p.name 'tpool'
end
+
+Factory.define :disabled_pool, :parent => :pool do |p|
+ p.enabled false
+end
diff --git a/src/spec/models/deployment_spec.rb b/src/spec/models/deployment_spec.rb
index b7d9883..9482896 100644
--- a/src/spec/models/deployment_spec.rb
+++ b/src/spec/models/deployment_spec.rb
@@ -11,11 +11,17 @@ describe Deployment do
end
it "should require pool to be set" do
+ @deployment.should be_valid
+
@deployment.pool_id = nil
@deployment.should_not be_valid
+ end
- @deployment.pool_id = 1
+ it "should require a pool that is not disabled" do
@deployment.should be_valid
+
+ @deployment.pool.enabled = false
+ @deployment.should_not be_valid
end
# This is in flux, and currently inapplicable
--
1.7.4.4
12 years, 9 months