Moving Core to the incubator
by David Lutterkort
Hi all,
as you may have heard, Deltacloud Core is moving to the Apache
incubator[1]
There's two key things in that move that I want to get done in the next
few days:
1. Move mailing lists
=====================
Move all mailing list traffic for Deltacloud Core to the Apache list[2]
- from now on, all discoussions, patches, gripes, offers of large
amounts of money etc. concerning the Detlacloud API should go to
deltacloud-dev(a)incubator.apache.org (nothing will change for the
aggregator/portal) Please subscribe to that list.
2. Import code into subversion
===============================
Import the code into subversion[3]; a git mirror of the subversion repo
will be available in short order. I've tested the conversion and am
hopeful that I can get it committed 'for reals' today or tomorrow.
The conversion does a few nasty things (filter-branch to get rid of
vendored rails, rebase of the master branch on top of Apache's
subversion), so that the subversion repo will be a new repo, with no
direct connection to the existing git repo, even though the commits will
be (mostly) the same. I will put a tag on the master branch in the
existing repo to mark where exactly I did the import from.
That means that if you are using the current git repo, you will have to
clone the Apache repo as if it were brand new; it's probably easiest to
use git-format-patch and git-am to carry over any private branches you
may have.
I'll post again once I have the code in the Apache repo.
David
[1] http://incubator.apache.org/projects/deltacloud.html
[2] http://mail-archives.apache.org/mod_mbox/incubator-deltacloud-dev/
[3] https://svn.apache.org/repos/asf/incubator/deltacloud/
13 years, 11 months
[PATCH aggregator] Fixed failing specs.
by jason.guiditta
Updated to use proper paths.
---
src/spec/controllers/users_controller_spec.rb | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/spec/controllers/users_controller_spec.rb b/src/spec/controllers/users_controller_spec.rb
index 231a533..c6ce46c 100644
--- a/src/spec/controllers/users_controller_spec.rb
+++ b/src/spec/controllers/users_controller_spec.rb
@@ -37,8 +37,8 @@ describe UsersController do
p.permissions.any? {
|perm| perm.role.name.eql?('Instance Creator and User')
}.should be_true
- id = User.find(:first, :conditions => ['login = ?', "tuser2"]).id
- response.should redirect_to("http://test.host/users/show/#{id}")
+ user = User.find(:first, :conditions => ['login = ?', "tuser2"])
+ response.should redirect_to(user_url(user))
end
it "fails to create pool" do
@@ -69,8 +69,8 @@ describe UsersController do
:password => "testpass",
:password_confirmation => "testpass" }
}.should change{ User.count }
- id = User.find(:first, :conditions => ['login = ?', "tuser3"]).id
- response.should redirect_to("http://test.host/users/show/#{id}")
+ user = User.find(:first, :conditions => ['login = ?', "tuser3"])
+ response.should redirect_to(user_url(user))
end
it "should not allow a regular user to create user" do
--
1.7.1.1
13 years, 11 months
Reworked images and instances listing
by Jan Provazník
Hi,
Datatables plugin (used for images and instances listing) has
some issues when JS is off and pagination is server-side, this
patch replaces it with simpler/cleaner HTML table which works
better without JS.
13 years, 11 months
image builder - css cleanup, collapsible tree
by Jan Provazník
Sending again this patchset (older version is not applicable because of
some fixes in patch "image builder - package selection and javascript")
[PATCH aggregator 1/2]: I tried to cleanup Image Builder CSS
[PATCH aggregator 2/2]: List of selected packages on "Software" page is now collapsible in JS version (non-JS version still displays expanded list)
(this patchset depends on previous Image Builder patches)
13 years, 11 months
[PATCH] Update docs with Condor information.
by Ian Main
This patch adds information on how to setup and configure Condor for
use with deltacloud aggregator.
Signed-off-by: Ian Main <imain(a)redhat.com>
---
README | 38 +++++++++++++++++++++++++++++++++++++-
1 files changed, 37 insertions(+), 1 deletions(-)
diff --git a/README b/README
index 0722292..84148b5 100644
--- a/README
+++ b/README
@@ -5,7 +5,8 @@ The Deltacloud project consists of two parts: **Core** and **Aggregator**. Core
gives you the API and drivers to various cloud providers. It also provides a
client library (which Aggregator uses) and a commandline interface.
-Aggregator is a web frontend to the API.
+Aggregator is a web frontend to the API. The aggregator also depends on
+Condor for its task implementation system.
In addition, there is the **docs** repository that contains the project
documentation and the sources of the <http://deltacloud.org> website.
@@ -100,6 +101,41 @@ And this sets the database up:
$ rake db:create:all
$ rake db:migrate
+Setting up Condor
+-----------------
+
+In the 'next' branch, the Deltacloud Aggregator now uses condor as a
+task system. Condor is used to decide where a new instance is started
+and takes care of actually starting that instance among other tasks.
+At this time support for Deltacloud is provided in a custom build of
+Condor, this is available at:
+
+http://people.redhat.com/clalance/condor-dcloud/
+
+The easiest way to install it is to use the command:
+
+ $ yum localinstall http://people.redhat.com/clalance/condor-dcloud/condor-7.5.2-3dcloud.fc13... \
+ http://people.redhat.com/clalance/condor-dcloud/libdcloudapi-0.2-1.fc13.x...
+
+Note that new versions may become available and you should check the
+site for the latest version.
+
+Once those are installed, you will also want to download:
+
+http://people.redhat.com/clalance/condor-dcloud/condor_config.local
+
+And place this file in /var/lib/condor/condor_config.local. The only
+configuration variable you will have to change is the CONDOR_HOST, which
+should be set to your local host name. If you are concerned about security,
+the ALLOW_HOSTS variable can also be set to your machines host name.
+
+At this time you should restart Condor:
+
+ $ sudo service condor restart
+
+Note that if you restart Condor, you should also restart the aggregator
+in order to populate Condor with the available backend cloud information.
+
Tying it all together
---------------------
--
1.7.0.1
13 years, 11 months
CSS cleanup (rev. 1)
by Tomas Sedovic
This patch removes styles that we no longer need. In addition, it drops more
of the ovirt legacy -- some layouts and helpers that we don't use anywhere in
the current code.
(this is a rebased version of a patch that was sent before and got lost in
the rush)
13 years, 11 months
Fw: [PATCH core] Fixed method rewriting in client
by Michal Fojtik
Hi,
This patch is fixing Realm issue in client.
-- Michal
--
--------------------------------------------------------
Michal Fojtik, mfojtik(a)redhat.com, +420 532 294 4307
Ruby / Ruby On Rails Developer
Deltacloud API: http://deltacloud.org
--------------------------------------------------------
13 years, 11 months
[PATCH aggregator] Core and Aggregator compatibility
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
* HardwareProfileProperty 'kind' chnaged to symbol
* allowed float format for CPU amount
* HardwareProfile.name is generated from API 'id' attribute
* added two simple CPU amount tests
(this patch replaces aggregator_Update-for-client-changes.patch,
core part of patch is already pushed in repository)
---
src/app/models/hardware_profile.rb | 6 ++--
src/app/models/hardware_profile_property.rb | 21 ++++---------
src/app/models/property_enum_entry.rb | 8 ++---
src/app/models/provider.rb | 4 +--
src/spec/factories/hardware_profile_property.rb | 36 +++++++++++-----------
src/spec/models/hardware_profile_spec.rb | 14 +++++++++
6 files changed, 45 insertions(+), 44 deletions(-)
diff --git a/src/app/models/hardware_profile.rb b/src/app/models/hardware_profile.rb
index a92b658..de9ef23 100644
--- a/src/app/models/hardware_profile.rb
+++ b/src/app/models/hardware_profile.rb
@@ -90,10 +90,10 @@ class HardwareProfile < ActiveRecord::Base
:value => prop.value)
case prop.kind
when HardwareProfileProperty::RANGE
- the_property.range_first = prop.range.first
- the_property.range_last = prop.range.last
+ the_property.range_first = prop.range[:from]
+ the_property.range_last = prop.range[:to]
when HardwareProfileProperty::ENUM
- the_property.property_enum_entries = prop.enum.entries.collect do |entry|
+ the_property.property_enum_entries = prop.options.collect do |entry|
PropertyEnumEntry.new(:value => entry, :hardware_profile_property => the_property)
end
end
diff --git a/src/app/models/hardware_profile_property.rb b/src/app/models/hardware_profile_property.rb
index aedae31..0717484 100644
--- a/src/app/models/hardware_profile_property.rb
+++ b/src/app/models/hardware_profile_property.rb
@@ -26,9 +26,9 @@ class HardwareProfileProperty < ActiveRecord::Base
CPU = "cpu"
ARCHITECTURE = "architecture"
- FIXED = "fixed"
- RANGE = "range"
- ENUM = "enum"
+ FIXED = :fixed
+ RANGE = :range
+ ENUM = :enum
UNIT_MB = "MB"
UNIT_GB = "GB"
@@ -48,22 +48,14 @@ class HardwareProfileProperty < ActiveRecord::Base
validates_presence_of :unit
validates_presence_of :value
validates_numericality_of :value, :greater_than => 0,
- :if => Proc.new{|p| p.name == MEMORY or p.name == STORAGE }
- validates_numericality_of :value, :greater_than => 0,
- :if => Proc.new{|p| p.name == CPU }, :only_integer => true
+ :if => Proc.new{|p| p.name == MEMORY or p.name == STORAGE or p.name == CPU}
validates_numericality_of :range_first, :greater_than => 0,
- :if => Proc.new{|p| (p.name == MEMORY or p.name == STORAGE) and
+ :if => Proc.new{|p| (p.name == MEMORY or p.name == STORAGE or p.name == CPU) and
p.kind == RANGE}
validates_numericality_of :range_last, :greater_than => 0,
- :if => Proc.new{|p| (p.name == MEMORY or p.name == STORAGE) and
+ :if => Proc.new{|p| (p.name == MEMORY or p.name == STORAGE or p.name == CPU) and
p.kind == RANGE}
- validates_numericality_of :range_first, :greater_than => 0,
- :if => Proc.new{|p| (p.name == CPU) and
- p.kind == RANGE}, :only_integer => true
- validates_numericality_of :range_last, :greater_than => 0,
- :if => Proc.new{|p| (p.name == CPU) and
- p.kind == RANGE}, :only_integer => true
validates_associated :property_enum_entries
def validate
case name
@@ -104,7 +96,6 @@ class HardwareProfileProperty < ActiveRecord::Base
"Range ending must only be specified for range properties")
end
end
-
end
end
diff --git a/src/app/models/property_enum_entry.rb b/src/app/models/property_enum_entry.rb
index eb246ff..ff497ef 100644
--- a/src/app/models/property_enum_entry.rb
+++ b/src/app/models/property_enum_entry.rb
@@ -29,9 +29,7 @@ class PropertyEnumEntry < ActiveRecord::Base
:if => Proc.new{|p| p.hardware_profile_property.name ==
HardwareProfileProperty::MEMORY or
p.hardware_profile_property.name ==
- HardwareProfileProperty::STORAGE }
- validates_numericality_of :value, :greater_than => 0, :only_integer => true,
- :if => Proc.new{|p| p.hardware_profile_property.name ==
- HardwareProfileProperty::CPU }
-
+ HardwareProfileProperty::STORAGE or
+ p.hardware_profile_property.name ==
+ HardwareProfileProperty::CPU }
end
diff --git a/src/app/models/provider.rb b/src/app/models/provider.rb
index 0a0120f..e439520 100644
--- a/src/app/models/provider.rb
+++ b/src/app/models/provider.rb
@@ -56,9 +56,7 @@ class Provider < ActiveRecord::Base
hardware_profiles.each do |hardware_profile|
ar_hardware_profile = HardwareProfile.new(:external_key =>
hardware_profile.id,
- :name => hardware_profile.name ?
- hardware_profile.name :
- hardware_profile.id,
+ :name => hardware_profile.id,
:provider_id => id)
ar_hardware_profile.add_properties(hardware_profile)
ar_hardware_profile.save!
diff --git a/src/spec/factories/hardware_profile_property.rb b/src/spec/factories/hardware_profile_property.rb
index 7f470f6..0a2447d 100644
--- a/src/spec/factories/hardware_profile_property.rb
+++ b/src/spec/factories/hardware_profile_property.rb
@@ -3,35 +3,35 @@ end
Factory.define :mock_hwp1_memory, :parent => :hardware_profile_property do |p|
p.name 'memory'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'MB'
p.value 1740.8
end
Factory.define :mock_hwp1_storage, :parent => :hardware_profile_property do |p|
p.name 'storage'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'GB'
p.value 160
end
Factory.define :mock_hwp1_cpu, :parent => :hardware_profile_property do |p|
p.name 'cpu'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'count'
- p.value 1
+ p.value 1.0
end
Factory.define :mock_hwp1_arch, :parent => :hardware_profile_property do |p|
p.name 'architecture'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'label'
p.value 'i386'
end
Factory.define :mock_hwp2_memory, :parent => :hardware_profile_property do |p|
p.name 'memory'
- p.kind 'range'
+ p.kind :range
p.unit 'MB'
p.value 10240
p.range_first 7680
@@ -40,7 +40,7 @@ end
Factory.define :mock_hwp2_storage, :parent => :hardware_profile_property do |p|
p.name 'storage'
- p.kind 'enum'
+ p.kind :enum
p.unit 'GB'
p.value 850
# p.property_enum_entries { |p| [p.association(:mock_hwp2_storage_enum1),
@@ -49,49 +49,49 @@ end
Factory.define :mock_hwp2_cpu, :parent => :hardware_profile_property do |p|
p.name 'cpu'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'count'
- p.value 2
+ p.value 2.0
end
Factory.define :mock_hwp2_arch, :parent => :hardware_profile_property do |p|
p.name 'architecture'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'label'
p.value 'x86_64'
end
Factory.define :agg_hwp1_memory, :parent => :hardware_profile_property do |p|
p.name 'memory'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'MB'
p.value 1740.8
end
Factory.define :agg_hwp1_storage, :parent => :hardware_profile_property do |p|
p.name 'storage'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'GB'
p.value 160
end
Factory.define :agg_hwp1_cpu, :parent => :hardware_profile_property do |p|
p.name 'cpu'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'count'
p.value 1
end
Factory.define :agg_hwp1_arch, :parent => :hardware_profile_property do |p|
p.name 'architecture'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'label'
p.value 'i386'
end
Factory.define :agg_hwp2_memory, :parent => :hardware_profile_property do |p|
p.name 'memory'
- p.kind 'range'
+ p.kind :range
p.unit 'MB'
p.value 10240
p.range_first 7680
@@ -100,7 +100,7 @@ end
Factory.define :agg_hwp2_storage, :parent => :hardware_profile_property do |p|
p.name 'storage'
- p.kind 'enum'
+ p.kind :enum
p.unit 'GB'
p.value 850
# p.property_enum_entries { |p| [p.association(:agg_hwp2_storage_enum1),
@@ -109,14 +109,14 @@ end
Factory.define :agg_hwp2_cpu, :parent => :hardware_profile_property do |p|
p.name 'cpu'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'count'
p.value 2
end
Factory.define :agg_hwp2_arch, :parent => :hardware_profile_property do |p|
p.name 'architecture'
- p.kind 'fixed'
+ p.kind :fixed
p.unit 'label'
p.value 'x86_64'
end
diff --git a/src/spec/models/hardware_profile_spec.rb b/src/spec/models/hardware_profile_spec.rb
index ab04fe1..8aa6557 100644
--- a/src/spec/models/hardware_profile_spec.rb
+++ b/src/spec/models/hardware_profile_spec.rb
@@ -42,6 +42,20 @@ describe HardwareProfile do
end
end
+ it "should require valid amount of CPU" do
+ [nil, "hello", -1].each do |fail_value|
+ @hp.cpu.value = fail_value
+ @hp.should_not be_valid
+ end
+ end
+
+ it "should allow numerical amount of CPU" do
+ [2, 2.2].each do |fail_value|
+ @hp.cpu.value = fail_value
+ @hp.should be_valid
+ end
+ end
+
it "should allow Aggregator profiles only for provider profiles" do
@hp.provider = nil
--
1.7.0.1
13 years, 11 months