Added Ability to Delete Provider
by Martyn Taylor
This patch adds ability for deleting providers.
As discussed with sseago, this patch leaves any images removes all associated objects, but leaves any built images in limbo state.
Currently the provider can only be deleted, provided its associated cloud accounts contain no instances. Since removing instances is not yet implemented, deleting provider is only managable when no associated instances have been started.
This patch will need to be readressed once multiple providers are supported, in order to address the issues with limbo images.
13 years, 7 months
[PATCH aggregator 1/2] Tempalte test for deleting a template with instances
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/spec/models/template_spec.rb | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/spec/models/template_spec.rb b/src/spec/models/template_spec.rb
index ef30fc1..cac172c 100644
--- a/src/spec/models/template_spec.rb
+++ b/src/spec/models/template_spec.rb
@@ -16,4 +16,12 @@ describe Template do
rimg.save
tpl.providers.size.should eql(1)
end
+
+ it "should not destroy template if there are instances created from this template" do
+ inst = Factory.build(:instance)
+ inst.save!
+ lambda do
+ inst.template.destroy
+ end.should_not change(Template, :count)
+ end
end
--
1.7.2.3
13 years, 7 months
[PATCH aggregator] Remove gnuplot and scruffy deps from spec and environment.rb
by Steve Linabery
Since we don't use these now and will be switching to other charting libs (even if this just means our own fork of scruffy) when the time comes.
Revised to include edits to config/environment.rb
---
deltacloud-aggregator.spec.in | 3 ---
src/config/environment.rb | 2 --
2 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/deltacloud-aggregator.spec.in b/deltacloud-aggregator.spec.in
index f05646f..841d135 100644
--- a/deltacloud-aggregator.spec.in
+++ b/deltacloud-aggregator.spec.in
@@ -22,8 +22,6 @@ Requires: rubygem(will_paginate)
Requires: rubygem(parseconfig)
Requires: rubygem(authlogic)
Requires: rubygem(deltacloud-client) >= 0.0.9.8
-Requires: rubygem(gnuplot)
-Requires: rubygem(scruffy)
Requires: rubygem(compass)
Requires: rubygem(compass-960-plugin)
Requires: rubygem(simple-navigation)
@@ -36,7 +34,6 @@ Requires: rubygem(imagebuilder-console)
Requires: postgresql
Requires: postgresql-server
Requires: ruby-postgres
-Requires: gnuplot >= 4.2.6
Requires: ruby-RMagick
Requires: classads >= 1.0
Requires: condor >= 7.5.4
diff --git a/src/config/environment.rb b/src/config/environment.rb
index 423f224..7d8ba2c 100644
--- a/src/config/environment.rb
+++ b/src/config/environment.rb
@@ -47,8 +47,6 @@ Rails::Initializer.run do |config|
config.gem "haml"
config.gem "will_paginate"
config.gem "nokogiri", :version => ">= 1.4.0"
- config.gem "gnuplot"
- config.gem "scruffy"
config.gem "compass", :version => ">= 0.10.2"
config.gem "compass-960-plugin", :lib => "ninesixty"
config.gem "simple-navigation"
--
1.7.2.3
13 years, 7 months
[PATCH aggregator] Remove gnuplot and scruffy deps from spec
by Steve Linabery
Since we don't use these now and will be switching to other charting libs (even if this just means our own fork of scruffy) when the time comes.
---
deltacloud-aggregator.spec.in | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/deltacloud-aggregator.spec.in b/deltacloud-aggregator.spec.in
index f05646f..841d135 100644
--- a/deltacloud-aggregator.spec.in
+++ b/deltacloud-aggregator.spec.in
@@ -22,8 +22,6 @@ Requires: rubygem(will_paginate)
Requires: rubygem(parseconfig)
Requires: rubygem(authlogic)
Requires: rubygem(deltacloud-client) >= 0.0.9.8
-Requires: rubygem(gnuplot)
-Requires: rubygem(scruffy)
Requires: rubygem(compass)
Requires: rubygem(compass-960-plugin)
Requires: rubygem(simple-navigation)
@@ -36,7 +34,6 @@ Requires: rubygem(imagebuilder-console)
Requires: postgresql
Requires: postgresql-server
Requires: ruby-postgres
-Requires: gnuplot >= 4.2.6
Requires: ruby-RMagick
Requires: classads >= 1.0
Requires: condor >= 7.5.4
--
1.7.2.3
13 years, 7 months
[ANNOUNCE] Fifth milestone release of RHEV-M REST API
by Eoghan Glynn
Hi All,
We're happy to announce the fifth milestone release of the REST API for
Red Hat Enterprise Virtualization Manager.
Linux and Windows distributions of 0.9-milestone5 may be downloaded from
[1].
Signed individual artifacts are also deployed to maven and synch'd up to
the Central repository [2].
Highlights of this milestone release are summarized below, with the
corresponding trac[3] ticket ID specified where appropriate.
Main API additions:
- Import/export support (#28)
- Representation of tags hierarchy (#87)
- Host power management support (#55, #109)
- Additional VM properties (highly_available, start_time,
creation_time, origin, stateless) (#90, #91, #99, #101)
- Additional template properties (#111)
- Users/groups/permissions modelling of 2.3 features (#112)
- Use of xs:dateTime format for date/time properties (#65)
Backwards incompatible API changes:
- Use absolute paths instead of relative paths for URIs (83)
- Re-worked how attached storage domains are represented (#82)
- Removed "shared status" from storage domains (#96)
- Re-named the "isos" collection to "files" (#81)
Fixes:
- Fixed missing VM status (#92)
- Fixed issue with VLAN ID parsing (#84)
- Fixed bug with snapshot-less VM (#98)
- Fixed network update support (#107)
- Fixed error with isos collection (#66)
- Resolved various auth related issues (#94, #95)
- Fixed incorrect URIs (#97)
Misc:
- Parameter validation improvements (#113)
Many thanks to all those who filed trac issues and gave us feedback on
the mailing list on irc. As always, more feedback is most welcome!
[1] https://fedorahosted.org/releases/r/h/rhevm-api
[2] http://repo2.maven.org/maven2/com/redhat/rhevm/api
[3] https://fedorahosted.org/rhevm-api/report/13
13 years, 7 months
[PATCH aggregator 1/2] Tempalte test for searching packages with empty string
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/app/views/templates/content_selection.haml | 4 ++--
src/features/template.feature | 7 +++++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/app/views/templates/content_selection.haml b/src/app/views/templates/content_selection.haml
index 689c33d..af02da1 100644
--- a/src/app/views/templates/content_selection.haml
+++ b/src/app/views/templates/content_selection.haml
@@ -36,8 +36,8 @@
<input type="hidden" id="selected_package_#{p[:name]}" name="selected_packages[]" value="#{p[:name]}" />
%fieldset.clearfix
.search.grid_4.alpha
- %input{:type => "search", :placeholder => "Search for package", :name => 'package_search', :value => params[:package_search]}
- %button.action
+ %input{:type => "search", :placeholder => "Search for package", :name => 'package_search', :value => params[:package_search], :id => 'package_search'}
+ %button.action{:id => 'package_search_button'}
.grid_8
%a.grid_4.omega Advanced Search
diff --git a/src/features/template.feature b/src/features/template.feature
index 73de5ca..776500c 100644
--- a/src/features/template.feature
+++ b/src/features/template.feature
@@ -42,3 +42,10 @@ Feature: Manage Templates
Then I should be on the templates page
And I should see "Template saved"
And I should see "mocktemplate"
+
+ Scenario: Search software with empty string
+ Given I am on the new template page
+ When I press "Add Software"
+ And I fill in "package_search" with ""
+ And I press "package_search_button"
+ Then I should see "Search string is empty"
--
1.7.2.3
13 years, 7 months
updating the aggregator to work with rails 3
by Mo Morsi
I spent a bit of time yesterday/today going through the Deltacloud Aggregator,
updating the necessary components to work with Rails 3. Obviously I won't push
for this patch to be included until Rails 3 is in Fedora, but the good news is
that most everything seems to be working in the aggregator against it.
Some more work needs to be done to get the feature suite fully functional again and
some additional fixes are needed for various things (mostly to not rely on rails
functionality which is there but deprecated), but currently the webapp itself
works as it does w/ Rails 2.3.x and the spec suite is 100% functional.
Here are some specific points of interest about this patch:
- I tested it on Fedora 14, shipping with Ruby 1.8.7, and with Rails 3
installed via 'sudo gem install rails -v 3.0.1'
- Rails 3 has many various configuration changes:
* gem dependencies are now managed via Bundler and listed in
the Gemfile. Install them with 'bundle install' (as opposed
to 'rake gems:install' as instructed in the install docs).
We actually may be able to use this to our advantage by
parsing this file in our build system and using it to
generate the Requires in the rpm spec
* routes.rb has been overhauled, and I had to make some
changes in the app to bring things in line
* all the scripts/ have been replaced with scripts/rails
- All the gems and plugins we depend on seem to have been updated
to work against Rails 3. The upstream communities seem to be on
the ball regarding this matter
- I updated the spec suite to fully work against rails 3 and the
updated dependencies. I also did alot to fix the cucumber feature
suite, but this is not fully finished. I didn't touch the test suite
at all as this is deprecated, and should be removed at somepoint soon
- Some things have been deprecated / changed in the Rails API which
affect us:
- overriding the 'validate' method in the models is deprected and
we need to update those classes to register our own validation
method (eg validate :foo_validation_method)
- authlogic doesn't work 100% with rails 3, and I had to add a small hack
to app/models/user_session.rb to get things working again
(see relevant comment in that file)
- error_messages for forms is not directly supported in rails 3 as it was in 2,
rather its a plugin that needs to be seperately installed
(and thus we need to package)
- log_error doesn't seem to be present in rails anymore, so I had to substitute
it in the application controller with what the method used to do (simply log
the error to the rails logger)
I'll continue to fix the app to bring it in line with the new way of doing things
and we might need to change a few things here and there, but for the most part
everything looks pretty good concerning supporting Deltacloud on Rails 3.
-Mo
13 years, 7 months
[PATCH aggregator 1/2] Tempalte test for deleting a template with instances
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/spec/models/template_spec.rb | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/spec/models/template_spec.rb b/src/spec/models/template_spec.rb
index ef30fc1..cac172c 100644
--- a/src/spec/models/template_spec.rb
+++ b/src/spec/models/template_spec.rb
@@ -16,4 +16,12 @@ describe Template do
rimg.save
tpl.providers.size.should eql(1)
end
+
+ it "should not destroy template if there are instances created from this template" do
+ inst = Factory.build(:instance)
+ inst.save!
+ lambda do
+ inst.template.destroy
+ end.should_not change(Template, :count)
+ end
end
--
1.7.2.3
13 years, 7 months
[PATCH aggregator 1/2] limits user first and last names to standard db varchar length of 255 characters
by Mo Morsi
---
src/app/models/user.rb | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/app/models/user.rb b/src/app/models/user.rb
index fe429bd..8e007bc 100644
--- a/src/app/models/user.rb
+++ b/src/app/models/user.rb
@@ -27,4 +27,7 @@ class User < ActiveRecord::Base
belongs_to :quota, :autosave => true
accepts_nested_attributes_for :quota
+
+ validates_length_of :first_name, :maximum => 255
+ validates_length_of :last_name, :maximum => 255
end
--
1.7.2.3
13 years, 7 months