[PATCH conductor] Add realm selection to Deployment Overview
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
https://bugzilla.redhat.com/show_bug.cgi?id=753946
The selection dropdown is shown only when there are realms to be selected.
---
src/app/views/deployments/_overview.html.haml | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/app/views/deployments/_overview.html.haml b/src/app/views/deployments/_overview.html.haml
index bdc04e3..4c11e65 100644
--- a/src/app/views/deployments/_overview.html.haml
+++ b/src/app/views/deployments/_overview.html.haml
@@ -26,8 +26,11 @@
= link_to @deployable.xml_filename, catalog_deployable_definition_path((a)deployable.catalogs.first, @deployable)
⇒
- %h3= t('.image_ids')
+ - if @realms.any?
+ %h3= t('realms.index.realm')
+ = select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]}, :include_blank => true
+ %h3= t('.image_ids')
%ul
- @deployment.deployable_xml.assemblies.each do |assembly|
%li.image-id
--
1.7.6.4
12 years, 4 months
[PATCH aeolus-configure] Changes to build behavior in rpmtask.rb, Rakefile
by steve linabery
Source a .spec.in file and output .spec.
Determine whether to include extra_release based on setting of Release in .spec.in
Make Version a constant in Rakefile.
---
Rakefile | 4 +-
contrib/aeolus-configure.spec | 152 --------------------------------------
contrib/aeolus-configure.spec.in | 152 ++++++++++++++++++++++++++++++++++++++
rake/rpmtask.rb | 28 +++++--
4 files changed, 174 insertions(+), 162 deletions(-)
delete mode 100644 contrib/aeolus-configure.spec
create mode 100644 contrib/aeolus-configure.spec.in
diff --git a/Rakefile b/Rakefile
index ccf7601..852828c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -28,10 +28,12 @@ CLEAN.include('pkg', 'repo')
CLOBBER.include('aeolus')
PKG_NAME = "aeolus-configure"
RPM_SPEC = "contrib/aeolus-configure.spec"
+RPM_SPEC_IN = "contrib/aeolus-configure.spec.in"
+PKG_VERSION = "2.5.0"
# Build the rpm
rpm_task =
-Rake::RpmTask.new(RPM_SPEC) do |rpm|
+Rake::RpmTask.new(RPM_SPEC_IN,RPM_SPEC,PKG_VERSION) do |rpm|
rpm.need_tar = true
rpm.package_files.include("COPYING", "bin/*", "recipes/**/*", "conf/*")
rpm.topdir = "#{RPMBUILD_DIR}"
diff --git a/contrib/aeolus-configure.spec b/contrib/aeolus-configure.spec
deleted file mode 100644
index b063410..0000000
--- a/contrib/aeolus-configure.spec
+++ /dev/null
@@ -1,152 +0,0 @@
-%global aeolushome /usr/share/aeolus-configure
-%global pbuild %{_builddir}/%{name}-%{version}
-
-Summary: Aeolus Configure Puppet Recipe
-Name: aeolus-configure
-Version: 2.5.0
-Release: 0%{?extra_release}%{?dist}
-
-Group: Applications/Internet
-License: ASL 2.0
-URL: http://aeolusproject.org
-
-# to build source tarball
-# git clone git://git.fedorahosted.org/aeolus/configure.git
-# cd configure
-# rake pkg
-# cp pkg/aeolus-configure-2.0.1.tgz ~/rpmbuild/SOURCES
-Source0: %{name}-%{version}.tgz
-BuildArch: noarch
-Requires: puppet >= 2.6.6
-Requires: rubygem(uuidtools)
-BuildRequires: rubygem(rspec-core)
-# To send a request to iwhd rest interface to
-# create buckets, eventually replace w/ an
-# iwhd client
-Requires: curl
-Requires: rubygem(curb)
-Requires: rubygem(highline)
-
-%description
-Aeolus Configure Puppet Recipe
-
-%prep
-%setup -q
-
-%build
-
-%install
-%{__mkdir} -p %{buildroot}/%{aeolushome}/modules/aeolus %{buildroot}/%{_sbindir}
-%{__mkdir} -p %{buildroot}/%{_bindir}
-%{__mkdir} -p %{buildroot}%{_sysconfdir}/aeolus-configure/nodes
-%{__cp} -R %{pbuild}/conf/* %{buildroot}%{_sysconfdir}/aeolus-configure/nodes
-%{__mv} %{buildroot}%{_sysconfdir}/aeolus-configure/nodes/custom_template.tdl %{buildroot}%{_sysconfdir}/aeolus-configure/
-%{__cp} -R %{pbuild}/recipes/aeolus/* %{buildroot}/%{aeolushome}/modules/aeolus
-%{__cp} -R %{pbuild}/recipes/apache/ %{buildroot}/%{aeolushome}/modules/apache
-%{__cp} -R %{pbuild}/recipes/ntp/ %{buildroot}/%{aeolushome}/modules/ntp
-%{__cp} -R %{pbuild}/recipes/openssl/ %{buildroot}/%{aeolushome}/modules/openssl
-%{__cp} -R %{pbuild}/recipes/postgres/ %{buildroot}/%{aeolushome}/modules/postgres
-%{__cp} -R %{pbuild}/bin/aeolus-node %{buildroot}/%{aeolushome}/modules/aeolus/
-%{__cp} -R %{pbuild}/bin/aeolus-check-services %{buildroot}/%{_bindir}/
-%{__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}/
-
-%files
-%doc COPYING
-%attr(0755, root, root) %{_sbindir}/aeolus-configure
-%attr(0755, root, root) %{_sbindir}/aeolus-cleanup
-%config(noreplace) %{_sysconfdir}/aeolus-configure/*
-%attr(0755, root, root) %{_bindir}/aeolus-check-services
-%attr(0755, root, root) %{_sbindir}/aeolus-restart-services
-%{aeolushome}
-
-%changelog
-* Thu Dec 1 2011 Steve Linabery <slinaber(a)redhat.com> - 2.4.0-1
-- ffc966c Regenerate conductor secret_token.rb file each time configure is executed
-- 4dfb1c3 Bump the version of aeolus-cli to 0.2.0
-- d8e6c40 Fix the collision in the /conductor/images/ path
-- fc84050 Log the image warehouse cleanup output
-- 1337d60 Redmine #2807 - Add ability to flush out iwhd in aeolus-cleaup
-- de3c009 Bump version following release of 2.3.0-1 on 2.3.x branch
-- fa3f661 BZ753258 - aeolus-configure overwrites contents in /etc/imagefactory/imagefactory.conf every time its executed
-- 43ad235 Ensure logout is called after all provider adds in ec2 profile.
-- f365b00 BZ752975 - multiple executions of aeolus-cleanup/configure not working as expected
-- 2b67daf Fix for Redmine #2680
-- 32f555a Document how to specify multiple profiles in aeolus-configure -h.
-- 7a0e110 Clean up rsyslog config file
-- dc67269 BZ 753273 - rsyslog configuration causes messages log to grow rapidly.
-- 0087203 BZ 753250: - aeolus-configure fails No such file or directory
-- 0af7031 update aeolus check/restart services scripts for f16 (jlaska's fix for BZ #747762 rebased)
-
-* Thu Nov 17 2011 Steve Linabery <slinaber(a)redhat.com> - 2.4.0-0
-- Bump version following release of 2.3.0-1 from 2.3.x branch
-
-* Wed Sep 14 2011 Richard Su <rwsu(a)redhat.com> 2.0.2-4
-- single deltacloud-core
-- rhevm and vsphere configurations moved to their own profiles
-- wait 1 sec after deltacloud-core service startup before providers are added
-
-* Tue Aug 30 2011 Maros Zatko <mzatko(a)redhat.com> 2.0.2-3
-- Added script for restarting running services
-
-* Tue Aug 16 2011 Maros Zatko <mzatko(a)redhat.com> 2.0.2-2
-- Added script for listing running services
-
-* Wed Aug 03 2011 Mo Morsi <mmorsi(a)redhat.com> 2.0.2-1
-- update to include profiles, interactive installer
-
-* Wed Jul 20 2011 Mo Morsi <mmorsi(a)redhat.com> 2.0.1-2
-- updates to conform to Fedora package guidelines
-
-* Tue Jul 19 2011 Mike Orazi <morazi(a)redhat.com> 2.0.1-1
-- vSphere configuration
-- RHEV configuration
-- warehouse sync, solr, and factory connector services removed
-- bug fixes
-
-* Wed May 18 2011 Mike Orazi <morazi(a)redhat.com> 2.0.1-0
-- Move using external nodes so changes to behavior can happen in etc
-
-* Wed May 18 2011 Chris Lalancette <clalance(a)redhat.com> - 2.0.0-11
-- Bump the release version
-
-* Tue Mar 22 2011 Angus Thomas <athomas(a)redhat.com> 2.0.0-5
-- Removed iwhd init script and config file
-
-* Wed Feb 17 2011 Mohammed Morsi <mmorsi(a)redhat.com> 2.0.0-3
-- renamed deltacloud-configure to aeolus-configure
-
-* Tue Feb 15 2011 Mohammed Morsi <mmorsi(a)redhat.com> 2.0.0-3
-- various fixes to recipe
-
-* Thu Jan 14 2011 Mohammed Morsi <mmorsi(a)redhat.com> 2.0.0-2
-- include openssl module
-
-
-* Mon Jan 10 2011 Mike Orazi <morazi(a)redhat.com> 2.0.0-1
-- Make this a drop in replacement for the old deltacloud-configure scripts
-
-* Wed Dec 22 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.4-1
-- Revamp deltacloud recipe to make it more puppetized,
- use general purpose firewall, postgres, ntp modules,
- and to fix many various things
-
-* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.3-1
-- Renamed package from deltacloud appliance
-- to deltacloud recipe
-
-* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-3
-- Include curl-devel for typhoeus gem
-
-* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-2
-- Updated to pull in latest git changes
-
-* Fri Sep 17 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-1
-- Updated packages pulled in to latest versions
-- Various fixes
-- Added initial image warehouse bits
-
-* Thu Sep 02 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.1-1
-- Initial package
-
diff --git a/contrib/aeolus-configure.spec.in b/contrib/aeolus-configure.spec.in
new file mode 100644
index 0000000..5ca4753
--- /dev/null
+++ b/contrib/aeolus-configure.spec.in
@@ -0,0 +1,152 @@
+%global aeolushome /usr/share/aeolus-configure
+%global pbuild %{_builddir}/%{name}-%{version}
+
+Summary: Aeolus Configure Puppet Recipe
+Name: aeolus-configure
+Version: @VERSION@
+Release: 0%{?extra_release}%{?dist}
+
+Group: Applications/Internet
+License: ASL 2.0
+URL: http://aeolusproject.org
+
+# to build source tarball
+# git clone git://git.fedorahosted.org/aeolus/configure.git
+# cd configure
+# rake pkg
+# cp pkg/aeolus-configure-2.0.1.tgz ~/rpmbuild/SOURCES
+Source0: %{name}-%{version}.tgz
+BuildArch: noarch
+Requires: puppet >= 2.6.6
+Requires: rubygem(uuidtools)
+BuildRequires: rubygem(rspec-core)
+# To send a request to iwhd rest interface to
+# create buckets, eventually replace w/ an
+# iwhd client
+Requires: curl
+Requires: rubygem(curb)
+Requires: rubygem(highline)
+
+%description
+Aeolus Configure Puppet Recipe
+
+%prep
+%setup -q
+
+%build
+
+%install
+%{__mkdir} -p %{buildroot}/%{aeolushome}/modules/aeolus %{buildroot}/%{_sbindir}
+%{__mkdir} -p %{buildroot}/%{_bindir}
+%{__mkdir} -p %{buildroot}%{_sysconfdir}/aeolus-configure/nodes
+%{__cp} -R %{pbuild}/conf/* %{buildroot}%{_sysconfdir}/aeolus-configure/nodes
+%{__mv} %{buildroot}%{_sysconfdir}/aeolus-configure/nodes/custom_template.tdl %{buildroot}%{_sysconfdir}/aeolus-configure/
+%{__cp} -R %{pbuild}/recipes/aeolus/* %{buildroot}/%{aeolushome}/modules/aeolus
+%{__cp} -R %{pbuild}/recipes/apache/ %{buildroot}/%{aeolushome}/modules/apache
+%{__cp} -R %{pbuild}/recipes/ntp/ %{buildroot}/%{aeolushome}/modules/ntp
+%{__cp} -R %{pbuild}/recipes/openssl/ %{buildroot}/%{aeolushome}/modules/openssl
+%{__cp} -R %{pbuild}/recipes/postgres/ %{buildroot}/%{aeolushome}/modules/postgres
+%{__cp} -R %{pbuild}/bin/aeolus-node %{buildroot}/%{aeolushome}/modules/aeolus/
+%{__cp} -R %{pbuild}/bin/aeolus-check-services %{buildroot}/%{_bindir}/
+%{__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}/
+
+%files
+%doc COPYING
+%attr(0755, root, root) %{_sbindir}/aeolus-configure
+%attr(0755, root, root) %{_sbindir}/aeolus-cleanup
+%config(noreplace) %{_sysconfdir}/aeolus-configure/*
+%attr(0755, root, root) %{_bindir}/aeolus-check-services
+%attr(0755, root, root) %{_sbindir}/aeolus-restart-services
+%{aeolushome}
+
+%changelog
+* Thu Dec 1 2011 Steve Linabery <slinaber(a)redhat.com> - 2.4.0-1
+- ffc966c Regenerate conductor secret_token.rb file each time configure is executed
+- 4dfb1c3 Bump the version of aeolus-cli to 0.2.0
+- d8e6c40 Fix the collision in the /conductor/images/ path
+- fc84050 Log the image warehouse cleanup output
+- 1337d60 Redmine #2807 - Add ability to flush out iwhd in aeolus-cleaup
+- de3c009 Bump version following release of 2.3.0-1 on 2.3.x branch
+- fa3f661 BZ753258 - aeolus-configure overwrites contents in /etc/imagefactory/imagefactory.conf every time its executed
+- 43ad235 Ensure logout is called after all provider adds in ec2 profile.
+- f365b00 BZ752975 - multiple executions of aeolus-cleanup/configure not working as expected
+- 2b67daf Fix for Redmine #2680
+- 32f555a Document how to specify multiple profiles in aeolus-configure -h.
+- 7a0e110 Clean up rsyslog config file
+- dc67269 BZ 753273 - rsyslog configuration causes messages log to grow rapidly.
+- 0087203 BZ 753250: - aeolus-configure fails No such file or directory
+- 0af7031 update aeolus check/restart services scripts for f16 (jlaska's fix for BZ #747762 rebased)
+
+* Thu Nov 17 2011 Steve Linabery <slinaber(a)redhat.com> - 2.4.0-0
+- Bump version following release of 2.3.0-1 from 2.3.x branch
+
+* Wed Sep 14 2011 Richard Su <rwsu(a)redhat.com> 2.0.2-4
+- single deltacloud-core
+- rhevm and vsphere configurations moved to their own profiles
+- wait 1 sec after deltacloud-core service startup before providers are added
+
+* Tue Aug 30 2011 Maros Zatko <mzatko(a)redhat.com> 2.0.2-3
+- Added script for restarting running services
+
+* Tue Aug 16 2011 Maros Zatko <mzatko(a)redhat.com> 2.0.2-2
+- Added script for listing running services
+
+* Wed Aug 03 2011 Mo Morsi <mmorsi(a)redhat.com> 2.0.2-1
+- update to include profiles, interactive installer
+
+* Wed Jul 20 2011 Mo Morsi <mmorsi(a)redhat.com> 2.0.1-2
+- updates to conform to Fedora package guidelines
+
+* Tue Jul 19 2011 Mike Orazi <morazi(a)redhat.com> 2.0.1-1
+- vSphere configuration
+- RHEV configuration
+- warehouse sync, solr, and factory connector services removed
+- bug fixes
+
+* Wed May 18 2011 Mike Orazi <morazi(a)redhat.com> 2.0.1-0
+- Move using external nodes so changes to behavior can happen in etc
+
+* Wed May 18 2011 Chris Lalancette <clalance(a)redhat.com> - 2.0.0-11
+- Bump the release version
+
+* Tue Mar 22 2011 Angus Thomas <athomas(a)redhat.com> 2.0.0-5
+- Removed iwhd init script and config file
+
+* Wed Feb 17 2011 Mohammed Morsi <mmorsi(a)redhat.com> 2.0.0-3
+- renamed deltacloud-configure to aeolus-configure
+
+* Tue Feb 15 2011 Mohammed Morsi <mmorsi(a)redhat.com> 2.0.0-3
+- various fixes to recipe
+
+* Thu Jan 14 2011 Mohammed Morsi <mmorsi(a)redhat.com> 2.0.0-2
+- include openssl module
+
+
+* Mon Jan 10 2011 Mike Orazi <morazi(a)redhat.com> 2.0.0-1
+- Make this a drop in replacement for the old deltacloud-configure scripts
+
+* Wed Dec 22 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.4-1
+- Revamp deltacloud recipe to make it more puppetized,
+ use general purpose firewall, postgres, ntp modules,
+ and to fix many various things
+
+* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.3-1
+- Renamed package from deltacloud appliance
+- to deltacloud recipe
+
+* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-3
+- Include curl-devel for typhoeus gem
+
+* Wed Sep 29 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-2
+- Updated to pull in latest git changes
+
+* Fri Sep 17 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.2-1
+- Updated packages pulled in to latest versions
+- Various fixes
+- Added initial image warehouse bits
+
+* Thu Sep 02 2010 Mohammed Morsi <mmorsi(a)redhat.com> 0.0.1-1
+- Initial package
+
diff --git a/rake/rpmtask.rb b/rake/rpmtask.rb
index 0839131..5aa36d9 100644
--- a/rake/rpmtask.rb
+++ b/rake/rpmtask.rb
@@ -26,24 +26,38 @@ module Rake
# Create a package based upon a RPM spec.
# RPM packages, can be produced by this task.
class RpmTask < PackageTask
- # RPM spec containing the metadata for this package
+ # input RPM spec containing the metadata for this package
+ attr_accessor :rpm_spec_in
+
+ # filename for output RPM spec
attr_accessor :rpm_spec
+ # package version
+ attr_accessor :pkg_version
+
# RPM build dir
attr_accessor :topdir
# Include extra_release information in the rpm
attr_accessor :include_extra_release
- def initialize(rpm_spec)
- init(rpm_spec)
+ def initialize(rpm_spec_in,rpm_spec,pkg_version)
+ init(rpm_spec_in,rpm_spec,pkg_version)
yield self if block_given?
define if block_given?
end
- def init(rpm_spec)
- @include_extra_release = true
+ def init(rpm_spec_in,rpm_spec,pkg_version)
+ @rpm_spec_in = rpm_spec_in
@rpm_spec = rpm_spec
+ @pkg_version = pkg_version
+
+ @include_extra_release = eval `grep -q '^[[:space:]]*Release:[[:space:]]*0' #{@rpm_spec_in} && echo true || echo false`
+
+ git_head = `git log -1 --pretty=format:%h`
+ extra_release = @include_extra_release ? ("." + Time.now.strftime("%Y%m%d%H%M%S").gsub(/\s/, '') + "git" + "#{git_head}") : ''
+
+ `sed -e "s|@VERSION@|#{@pkg_version}|;s|^\\(Release:[^%]*\\)|\\1#{extra_release}|" #{@rpm_spec_in} > #{@rpm_spec}`
# parse this out of the rpmbuild macros,
# not ideal but better than hardcoding this
@@ -85,14 +99,10 @@ module Rake
# FIXME properly determine :package build artifact(s) to copy to sources dir
file rpm_file, [:include_extra_release] => [:package, "#{@topdir}/SOURCES", "#{@topdir}/SPECS"] do |t,args|
- @include_extra_release = args.include_extra_release != "false"
- git_head = `git log -1 --pretty=format:%h`
- extra_release = "." + Time.now.strftime("%Y%m%d%H%M%S").gsub(/\s/, '') + "git" + "#{git_head}"
cp "#{package_dir}/#{@name}-#{(a)version}.tgz", "#{@topdir}/SOURCES/"
cp @rpm_spec, "#{@topdir}/SPECS"
sh "#{@rpmbuild_cmd} " +
"--define '_topdir #{@topdir}' " +
- "--define 'extra_release #{@include_extra_release ? extra_release : ''}' " +
"-ba #{@rpm_spec}"
end
end
--
1.7.6.4
12 years, 4 months
[PATCH] BZ #766661 - provide mechanism to log aeolus-configure web requests, responses, and errors
by Mo Morsi
---
.../aeolus/lib/puppet/provider/web_request/curl.rb | 38 ++++++++++++++++++++
recipes/aeolus/lib/puppet/type/web_request.rb | 9 +++++
recipes/aeolus/manifests/conductor.pp | 2 +
3 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/recipes/aeolus/lib/puppet/provider/web_request/curl.rb b/recipes/aeolus/lib/puppet/provider/web_request/curl.rb
index a857b36..15bef89 100644
--- a/recipes/aeolus/lib/puppet/provider/web_request/curl.rb
+++ b/recipes/aeolus/lib/puppet/provider/web_request/curl.rb
@@ -150,6 +150,7 @@ Puppet::Type.type(:web_request).provide :curl do
# Helper to process/parse web parameters
def process_params(request_method, params, uri)
begin
+ error = nil
cookies = nil
if params[:store_cookies_at]
FileUtils.touch(params[:store_cookies_at]) if !File.exist?(params[:store_cookies_at])
@@ -169,17 +170,27 @@ Puppet::Type.type(:web_request).provide :curl do
:follow => params[:follow],
:username => params[:username],
:password => params[:password])
+
+ result_body = result.body_str.to_s
+
verify_result(result,
:returns => params[:returns],
:does_not_return => params[:does_not_return],
:contains => params[:contains],
:does_not_contain => params[:does_not_contain] )
+
result.close
rescue Exception => e
+ error = e
raise Puppet::Error, "An exception was raised when invoking web request: #{e}"
ensure
+ unless result.nil?
+ log_response(:result => result_body,
+ :method => request_method, :uri => uri,
+ :puppet_params => params, :error => error)
+ end
FileUtils.rm_f(cookies) if params[:remove_cookies]
end
end
@@ -235,4 +246,31 @@ Puppet::Type.type(:web_request).provide :curl do
raise Puppet::Error, "Not expecting #{verify[:does_not_contain]} in the result"
end
end
+
+ def log_response(params)
+ method = params[:method]
+ uri = params[:uri]
+ result = params[:result]
+ error = params[:error]
+ puppet_params = params[:puppet_params]
+
+ if puppet_params[:log_to]
+ return if puppet_params[:only_log_errors] == :true && error.nil?
+ logfile = puppet_params[:log_to].strip
+ exists = File.exists?(logfile)
+ isfile = File.file?(logfile) || (!exists && (logfile[-1].chr != '/'))
+ if !isfile
+ FileUtils.mkdir_p(logfile) if !exists
+ logfile += puppet_params[:name]
+ end
+
+ f = File.open(logfile, 'a')
+ f.write("=====BEGIN=====\n")
+ f.write(Time.now.strftime("%Y-%m-%d"))
+ f.write(" #{method} request to #{uri}\n")
+ f.write(result.to_s)
+ f.write("\n=====END=====\n\n")
+ f.close
+ end
+ end
end
diff --git a/recipes/aeolus/lib/puppet/type/web_request.rb b/recipes/aeolus/lib/puppet/type/web_request.rb
index d20229e..225e3cf 100644
--- a/recipes/aeolus/lib/puppet/type/web_request.rb
+++ b/recipes/aeolus/lib/puppet/type/web_request.rb
@@ -126,6 +126,15 @@ Puppet::Type.newtype(:web_request) do
munge do |value| Puppet::Type::Web_request.munge_array_params(value) end
end
+ newparam(:log_to) do
+ desc "Log requests/responses to the specified file or directory"
+ end
+
+ newparam(:only_log_errors) do
+ desc "Boolean indicating if we should only log responses which did not pass validations"
+ newvalues(:true, :false)
+ end
+
newparam(:if) do
desc "Invoke request only if the specified request returns true"
end
diff --git a/recipes/aeolus/manifests/conductor.pp b/recipes/aeolus/manifests/conductor.pp
index e2d6b4f..ef95c93 100644
--- a/recipes/aeolus/manifests/conductor.pp
+++ b/recipes/aeolus/manifests/conductor.pp
@@ -230,6 +230,8 @@ define aeolus::conductor::provider($deltacloud_driver="",$url="", $deltacloud_pr
follow => true,
contains => "//html/body//li[text() = 'Provider added.']",
use_cookies_at => '/tmp/aeolus-admin',
+ log_to => '/tmp/configure-provider-request.log',
+ only_log_errors => true,
unless => { 'get' => 'https://localhost/conductor/providers',
'contains' => "//html/body//a[text() = '$name']" },
require => [Service['aeolus-conductor'], Exec['grant_site_admin_privs'], Exec['deltacloud-core-startup-wait']]
--
1.7.6.4
12 years, 4 months
[PATCH conductor] Fixing autoupdate on deployments#show
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
src/public/javascripts/backbone/routers.js | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/public/javascripts/backbone/routers.js b/src/public/javascripts/backbone/routers.js
index cb55730..a766b83 100644
--- a/src/public/javascripts/backbone/routers.js
+++ b/src/public/javascripts/backbone/routers.js
@@ -74,8 +74,6 @@ Conductor.Routers.Deployments = Backbone.Router.extend({
var view = new Conductor.Views.DeploymentsShow({ model: deployment,
collection: deployment.instances });
- if(view.currentTab() !== 'instances') return;
-
deployment.bind('change', function() { view.render() });
deployment.instances.fetch({success: function(instances) {
--
1.7.6.4
12 years, 4 months
[PATCH configure] BZ 746702 - Check node config files are in correct format before executing puppet - v3
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=746702
aeolus-configure and aeolus-cleanup calls aeolus-node-check to verify node config
files are correctly formatted. If there is a formatting problem, the file name
and the line number causing the issue are displayed.
---
bin/aeolus-cleanup | 7 +++-
bin/aeolus-configure | 4 ++
bin/aeolus-node-check | 41 ++++++++++++++++++++
contrib/aeolus-configure.spec | 1 +
spec/fixtures/nodes/good-node-file | 8 ++++
.../no-colon-between-parameter-name-and-value | 5 ++
.../nodes/no-space-between-dash-and-class-name | 2 +
.../no-space-between-parameter-name-and-value | 3 +
.../fixtures/nodes/one-space-before-parameter-name | 3 +
.../nodes/three-spaces-before-parameter-name | 3 +
spec/node-check_spec.rb | 38 ++++++++++++++++++
11 files changed, 114 insertions(+), 1 deletions(-)
create mode 100755 bin/aeolus-node-check
create mode 100644 spec/fixtures/nodes/good-node-file
create mode 100644 spec/fixtures/nodes/no-colon-between-parameter-name-and-value
create mode 100644 spec/fixtures/nodes/no-space-between-dash-and-class-name
create mode 100644 spec/fixtures/nodes/no-space-between-parameter-name-and-value
create mode 100644 spec/fixtures/nodes/one-space-before-parameter-name
create mode 100644 spec/fixtures/nodes/three-spaces-before-parameter-name
create mode 100644 spec/node-check_spec.rb
diff --git a/bin/aeolus-cleanup b/bin/aeolus-cleanup
index 7d15559..b70fb97 100644
--- a/bin/aeolus-cleanup
+++ b/bin/aeolus-cleanup
@@ -60,6 +60,11 @@ export FACTER_AEOLUS_SAVE_DATA=$SAVE_DATA
NODE_ARRAY=(`echo $PUPPET_NODE | tr "," "\n"`)
for x in "${NODE_ARRAY[@]}"
do
+ /usr/share/aeolus-configure/modules/aeolus/aeolus-node-check /etc/aeolus-configure/nodes/${x}_cleanup
+ if [ $? != 0 ]; then
+ exit 1
+ fi
+
puppet /usr/share/aeolus-configure/modules/aeolus/aeolus.pp \
--modulepath=/usr/share/aeolus-configure/modules/ \
--external_nodes "/bin/sh /usr/share/aeolus-configure/modules/aeolus/aeolus-node ${x}_cleanup" --node_terminus exec \
@@ -70,4 +75,4 @@ do
if [ $? != 0 -a $? != 2 ] ; then
exit 1
fi
-done
\ No newline at end of file
+done
diff --git a/bin/aeolus-configure b/bin/aeolus-configure
index 503851d..1fa1f9f 100755
--- a/bin/aeolus-configure
+++ b/bin/aeolus-configure
@@ -72,6 +72,10 @@ export FACTER_RAILS_TOKEN=`</dev/urandom tr -dc a-f0-9 | head -c128`
NODE_ARRAY=(`echo $PUPPET_NODE | tr "," "\n"`)
for x in "${NODE_ARRAY[@]}"
do
+ /usr/share/aeolus-configure/modules/aeolus/aeolus-node-check /etc/aeolus-configure/nodes/${x}_configure
+ if [ $? != 0 ]; then
+ exit 1
+ fi
puppet /usr/share/aeolus-configure/modules/aeolus/aeolus.pp \
--modulepath=/usr/share/aeolus-configure/modules/ \
--external_nodes "/bin/sh /usr/share/aeolus-configure/modules/aeolus/aeolus-node ${x}_configure" --node_terminus exec \
diff --git a/bin/aeolus-node-check b/bin/aeolus-node-check
new file mode 100755
index 0000000..139ecd7
--- /dev/null
+++ b/bin/aeolus-node-check
@@ -0,0 +1,41 @@
+#!/usr/bin/ruby
+
+# Copyright 2011 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+require "yaml"
+
+filename = ARGV[0]
+
+if File.exist?(filename) == false
+ puts "File not found: #{filename}"
+ exit 1
+else
+ begin
+ YAML::parse_file(filename)
+ rescue => e
+ puts "Error found in #{filename}"
+ if e.to_s.index("line")
+ line_number = e.to_s.split("line")[1].split(",")[0].strip.to_i + 1
+ puts "Incorrect format found on or before line #{line_number}"
+ else
+ puts e
+ end
+ puts "parameters must be in the form [space][space][parameter name][colon][space][parameter value]"
+ puts "classes must be in the form [dash][space][class name]"
+ exit 1
+ end
+end
+
+exit 0
diff --git a/contrib/aeolus-configure.spec b/contrib/aeolus-configure.spec
index b063410..03fc5ba 100644
--- a/contrib/aeolus-configure.spec
+++ b/contrib/aeolus-configure.spec
@@ -47,6 +47,7 @@ Aeolus Configure Puppet Recipe
%{__cp} -R %{pbuild}/recipes/openssl/ %{buildroot}/%{aeolushome}/modules/openssl
%{__cp} -R %{pbuild}/recipes/postgres/ %{buildroot}/%{aeolushome}/modules/postgres
%{__cp} -R %{pbuild}/bin/aeolus-node %{buildroot}/%{aeolushome}/modules/aeolus/
+%{__cp} -R %{pbuild}/bin/aeolus-node-check %{buildroot}/%{aeolushome}/modules/aeolus/
%{__cp} -R %{pbuild}/bin/aeolus-check-services %{buildroot}/%{_bindir}/
%{__cp} -R %{pbuild}/bin/aeolus-restart-services %{buildroot}/%{_sbindir}/
%{__cp} -R %{pbuild}/bin/aeolus-configure %{buildroot}/%{_sbindir}/
diff --git a/spec/fixtures/nodes/good-node-file b/spec/fixtures/nodes/good-node-file
new file mode 100644
index 0000000..af4f2c1
--- /dev/null
+++ b/spec/fixtures/nodes/good-node-file
@@ -0,0 +1,8 @@
+#
+
+#
+---
+parameters:
+ enable_https: true
+classes:
+- aeolus::conductor
\ No newline at end of file
diff --git a/spec/fixtures/nodes/no-colon-between-parameter-name-and-value b/spec/fixtures/nodes/no-colon-between-parameter-name-and-value
new file mode 100644
index 0000000..fb1dc12
--- /dev/null
+++ b/spec/fixtures/nodes/no-colon-between-parameter-name-and-value
@@ -0,0 +1,5 @@
+---
+parameters:
+ enable_https: true
+ enable_security false
+ package_provider: rpm
diff --git a/spec/fixtures/nodes/no-space-between-dash-and-class-name b/spec/fixtures/nodes/no-space-between-dash-and-class-name
new file mode 100644
index 0000000..d4f0888
--- /dev/null
+++ b/spec/fixtures/nodes/no-space-between-dash-and-class-name
@@ -0,0 +1,2 @@
+classes:
+-aeolus::conductor
\ No newline at end of file
diff --git a/spec/fixtures/nodes/no-space-between-parameter-name-and-value b/spec/fixtures/nodes/no-space-between-parameter-name-and-value
new file mode 100644
index 0000000..0d47524
--- /dev/null
+++ b/spec/fixtures/nodes/no-space-between-parameter-name-and-value
@@ -0,0 +1,3 @@
+parameters:
+ enable_https: true
+ rhevm_nfs_server:server.com
\ No newline at end of file
diff --git a/spec/fixtures/nodes/one-space-before-parameter-name b/spec/fixtures/nodes/one-space-before-parameter-name
new file mode 100644
index 0000000..7edca1b
--- /dev/null
+++ b/spec/fixtures/nodes/one-space-before-parameter-name
@@ -0,0 +1,3 @@
+parameters:
+ enable_https: true
+ rhevm_nfs_server: server.com
\ No newline at end of file
diff --git a/spec/fixtures/nodes/three-spaces-before-parameter-name b/spec/fixtures/nodes/three-spaces-before-parameter-name
new file mode 100644
index 0000000..fcb458c
--- /dev/null
+++ b/spec/fixtures/nodes/three-spaces-before-parameter-name
@@ -0,0 +1,3 @@
+parameters:
+ enable_https: true
+ rhevm_nfs_server: server.com
diff --git a/spec/node-check_spec.rb b/spec/node-check_spec.rb
new file mode 100644
index 0000000..e4a687c
--- /dev/null
+++ b/spec/node-check_spec.rb
@@ -0,0 +1,38 @@
+# Copyright 2011 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+def run_and_check_status (node, expected_exit_status)
+ `./bin/aeolus-node-check ./spec/fixtures/nodes/#{node}`
+ $?.exitstatus.should be(expected_exit_status), "#{node}"
+end
+
+
+describe "aeolus-node-check" do
+ it "error message display" do
+ output=`./bin/aeolus-node-check ./spec/fixtures/nodes/no-colon-between-parameter-name-and-value`
+ output.should == "Error found in ./spec/fixtures/nodes/no-colon-between-parameter-name-and-value\nIncorrect format found on or before line 5\nparameters must be in the form [space][space][parameter name][colon][space][parameter value]\nclasses must be in the form [dash][space][class name]\n"
+ end
+
+ it "should raise an error with these files" do
+ run_and_check_status("no-colon-between-parameter-name-and-value", 1)
+ run_and_check_status("no-space-between-dash-and-class-name", 1)
+ run_and_check_status("no-space-between-parameter-name-and-value", 1)
+ run_and_check_status("one-space-before-parameter-name", 1)
+ run_and_check_status("three-spaces-before-parameter-name", 1)
+ end
+
+ it "should run successful without error" do
+ run_and_check_status("good-node-file", 0)
+ end
+end
--
1.7.6.4
12 years, 4 months
(no subject)
by Tzu-Mainn Chen
Adds a basic glossary to the getting started guide, ideally reducing potential confusion for a new/evaluating user.
12 years, 4 months
explanation of the three patches I sent to list just now.
by steve linabery
Hello aeolus,
I just sent three patches to aeolus-devel with subject: Changes to build behavior in rpmtask.rb, Rakefile
The reason we need these patches is that the previous behaviour of 'rake rpms' for aeolus-configure, aeolus-cli, and aeolus-image-rubygem was to include the timestamp+githash in the generated rpm (and srpm) *name*, but to leave the extra_release info *out* of the specfile that was included in the generated rpm and srpm.
This becomes an issue when using a build system that tags the source commits based on the content of the specfile in the commit.
I also made it so that the extra_release is included/generated when Release == 0, but excluded when Release != 0. This is more in keeping with how the Makefile for conductor works, i.e. any time Release == 0 is considered a development snapshot build, and the timestamp/githash are then included.
To test (and feel free to test it for me, hint hint!), just do 'rake rpms' with Release set to 0 and 1 and observe the resulting rpms.
Thanks,
Steve|eggs
12 years, 4 months
[PATCH configure] BZ 746702 - Check node config files are in correct format before executing puppet - v2
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=746702
aeolus-configure and aeolus-cleanup calls aeolus-node-check to verify node config
files are correctly formatted. If there is a formatting problem, the file name
and the line number causing the issue are displayed.
---
bin/aeolus-cleanup | 7 +++-
bin/aeolus-configure | 4 ++
bin/aeolus-node-check | 41 ++++++++++++++++++++
contrib/aeolus-configure.spec | 1 +
spec/fixtures/nodes/good-node-file | 8 ++++
.../no-colon-between-parameter-name-and-value | 5 ++
.../nodes/no-space-between-dash-and-class-name | 2 +
.../no-space-between-parameter-name-and-value | 3 +
.../fixtures/nodes/one-space-before-parameter-name | 3 +
.../nodes/three-spaces-before-parameter-name | 3 +
spec/node-check_spec.rb | 38 ++++++++++++++++++
11 files changed, 114 insertions(+), 1 deletions(-)
create mode 100755 bin/aeolus-node-check
create mode 100644 spec/fixtures/nodes/good-node-file
create mode 100644 spec/fixtures/nodes/no-colon-between-parameter-name-and-value
create mode 100644 spec/fixtures/nodes/no-space-between-dash-and-class-name
create mode 100644 spec/fixtures/nodes/no-space-between-parameter-name-and-value
create mode 100644 spec/fixtures/nodes/one-space-before-parameter-name
create mode 100644 spec/fixtures/nodes/three-spaces-before-parameter-name
create mode 100644 spec/node-check_spec.rb
diff --git a/bin/aeolus-cleanup b/bin/aeolus-cleanup
index 7d15559..dc447f5 100644
--- a/bin/aeolus-cleanup
+++ b/bin/aeolus-cleanup
@@ -57,6 +57,11 @@ export FACTER_AEOLUS_ENABLE_HTTPS=true
export FACTER_AEOLUS_ENABLE_SECURITY=false
export FACTER_AEOLUS_SAVE_DATA=$SAVE_DATA
+/usr/share/aeolus-configure/modules/aeolus/aeolus-node-check /etc/aeolus-configure/nodes/$PUPPET_NODE
+if [ $? != 0 ]; then
+ exit 1
+fi
+
NODE_ARRAY=(`echo $PUPPET_NODE | tr "," "\n"`)
for x in "${NODE_ARRAY[@]}"
do
@@ -70,4 +75,4 @@ do
if [ $? != 0 -a $? != 2 ] ; then
exit 1
fi
-done
\ No newline at end of file
+done
diff --git a/bin/aeolus-configure b/bin/aeolus-configure
index 503851d..151584a 100755
--- a/bin/aeolus-configure
+++ b/bin/aeolus-configure
@@ -72,6 +72,10 @@ export FACTER_RAILS_TOKEN=`</dev/urandom tr -dc a-f0-9 | head -c128`
NODE_ARRAY=(`echo $PUPPET_NODE | tr "," "\n"`)
for x in "${NODE_ARRAY[@]}"
do
+ /usr/share/aeolus-configure/modules/aeolus/aeolus-node-check /etc/aeolus-configure/nodes/$x
+ if [ $? != 0 ]; then
+ exit 1
+ fi
puppet /usr/share/aeolus-configure/modules/aeolus/aeolus.pp \
--modulepath=/usr/share/aeolus-configure/modules/ \
--external_nodes "/bin/sh /usr/share/aeolus-configure/modules/aeolus/aeolus-node ${x}_configure" --node_terminus exec \
diff --git a/bin/aeolus-node-check b/bin/aeolus-node-check
new file mode 100755
index 0000000..139ecd7
--- /dev/null
+++ b/bin/aeolus-node-check
@@ -0,0 +1,41 @@
+#!/usr/bin/ruby
+
+# Copyright 2011 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+require "yaml"
+
+filename = ARGV[0]
+
+if File.exist?(filename) == false
+ puts "File not found: #{filename}"
+ exit 1
+else
+ begin
+ YAML::parse_file(filename)
+ rescue => e
+ puts "Error found in #{filename}"
+ if e.to_s.index("line")
+ line_number = e.to_s.split("line")[1].split(",")[0].strip.to_i + 1
+ puts "Incorrect format found on or before line #{line_number}"
+ else
+ puts e
+ end
+ puts "parameters must be in the form [space][space][parameter name][colon][space][parameter value]"
+ puts "classes must be in the form [dash][space][class name]"
+ exit 1
+ end
+end
+
+exit 0
diff --git a/contrib/aeolus-configure.spec b/contrib/aeolus-configure.spec
index b063410..03fc5ba 100644
--- a/contrib/aeolus-configure.spec
+++ b/contrib/aeolus-configure.spec
@@ -47,6 +47,7 @@ Aeolus Configure Puppet Recipe
%{__cp} -R %{pbuild}/recipes/openssl/ %{buildroot}/%{aeolushome}/modules/openssl
%{__cp} -R %{pbuild}/recipes/postgres/ %{buildroot}/%{aeolushome}/modules/postgres
%{__cp} -R %{pbuild}/bin/aeolus-node %{buildroot}/%{aeolushome}/modules/aeolus/
+%{__cp} -R %{pbuild}/bin/aeolus-node-check %{buildroot}/%{aeolushome}/modules/aeolus/
%{__cp} -R %{pbuild}/bin/aeolus-check-services %{buildroot}/%{_bindir}/
%{__cp} -R %{pbuild}/bin/aeolus-restart-services %{buildroot}/%{_sbindir}/
%{__cp} -R %{pbuild}/bin/aeolus-configure %{buildroot}/%{_sbindir}/
diff --git a/spec/fixtures/nodes/good-node-file b/spec/fixtures/nodes/good-node-file
new file mode 100644
index 0000000..af4f2c1
--- /dev/null
+++ b/spec/fixtures/nodes/good-node-file
@@ -0,0 +1,8 @@
+#
+
+#
+---
+parameters:
+ enable_https: true
+classes:
+- aeolus::conductor
\ No newline at end of file
diff --git a/spec/fixtures/nodes/no-colon-between-parameter-name-and-value b/spec/fixtures/nodes/no-colon-between-parameter-name-and-value
new file mode 100644
index 0000000..fb1dc12
--- /dev/null
+++ b/spec/fixtures/nodes/no-colon-between-parameter-name-and-value
@@ -0,0 +1,5 @@
+---
+parameters:
+ enable_https: true
+ enable_security false
+ package_provider: rpm
diff --git a/spec/fixtures/nodes/no-space-between-dash-and-class-name b/spec/fixtures/nodes/no-space-between-dash-and-class-name
new file mode 100644
index 0000000..d4f0888
--- /dev/null
+++ b/spec/fixtures/nodes/no-space-between-dash-and-class-name
@@ -0,0 +1,2 @@
+classes:
+-aeolus::conductor
\ No newline at end of file
diff --git a/spec/fixtures/nodes/no-space-between-parameter-name-and-value b/spec/fixtures/nodes/no-space-between-parameter-name-and-value
new file mode 100644
index 0000000..0d47524
--- /dev/null
+++ b/spec/fixtures/nodes/no-space-between-parameter-name-and-value
@@ -0,0 +1,3 @@
+parameters:
+ enable_https: true
+ rhevm_nfs_server:server.com
\ No newline at end of file
diff --git a/spec/fixtures/nodes/one-space-before-parameter-name b/spec/fixtures/nodes/one-space-before-parameter-name
new file mode 100644
index 0000000..7edca1b
--- /dev/null
+++ b/spec/fixtures/nodes/one-space-before-parameter-name
@@ -0,0 +1,3 @@
+parameters:
+ enable_https: true
+ rhevm_nfs_server: server.com
\ No newline at end of file
diff --git a/spec/fixtures/nodes/three-spaces-before-parameter-name b/spec/fixtures/nodes/three-spaces-before-parameter-name
new file mode 100644
index 0000000..fcb458c
--- /dev/null
+++ b/spec/fixtures/nodes/three-spaces-before-parameter-name
@@ -0,0 +1,3 @@
+parameters:
+ enable_https: true
+ rhevm_nfs_server: server.com
diff --git a/spec/node-check_spec.rb b/spec/node-check_spec.rb
new file mode 100644
index 0000000..e4a687c
--- /dev/null
+++ b/spec/node-check_spec.rb
@@ -0,0 +1,38 @@
+# Copyright 2011 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+def run_and_check_status (node, expected_exit_status)
+ `./bin/aeolus-node-check ./spec/fixtures/nodes/#{node}`
+ $?.exitstatus.should be(expected_exit_status), "#{node}"
+end
+
+
+describe "aeolus-node-check" do
+ it "error message display" do
+ output=`./bin/aeolus-node-check ./spec/fixtures/nodes/no-colon-between-parameter-name-and-value`
+ output.should == "Error found in ./spec/fixtures/nodes/no-colon-between-parameter-name-and-value\nIncorrect format found on or before line 5\nparameters must be in the form [space][space][parameter name][colon][space][parameter value]\nclasses must be in the form [dash][space][class name]\n"
+ end
+
+ it "should raise an error with these files" do
+ run_and_check_status("no-colon-between-parameter-name-and-value", 1)
+ run_and_check_status("no-space-between-dash-and-class-name", 1)
+ run_and_check_status("no-space-between-parameter-name-and-value", 1)
+ run_and_check_status("one-space-before-parameter-name", 1)
+ run_and_check_status("three-spaces-before-parameter-name", 1)
+ end
+
+ it "should run successful without error" do
+ run_and_check_status("good-node-file", 0)
+ end
+end
--
1.7.6.4
12 years, 4 months