[PATCH] FGCP: added unit tests for storage_volumes and fixed error with unknown id

2013-02-18 Thread diesk
From: Dies Koper --- server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb | 3 + ...st_0002_must_return_list_of_storage_volumes.yml | 207 + ...t_0003_must_allow_to_filter_storage_volumes.yml | 118 ...ust_allow_to_retrieve_single_storage_volume.yml | 118 +++

RE: [PATCH] FGCP: added error handling to exclude resources that were deleted in the middle of a GET operation

2013-02-18 Thread Koper, Dies
Please review the patch I e-mailed 10 minutes after the patch below instead. Somehow I hadn't saved my source file when I was done so the patch below is missing some bits. Regards, Dies > -Original Message- > From: di...@fast.au.fujitsu.com [mailto:di...@fast.au.fujitsu.com] > Sent: Tues

[PATCH] FGCP: added error handling to exclude resources that were deleted in the middle of a GET operation

2013-02-18 Thread diesk
From: Dies Koper --- server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb | 202 -- 1 file changed, 114 insertions(+), 88 deletions(-) diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb index c8bcc7b..5fca504 1006

[PATCH] FGCP: added error handling to exclude resources that were deleted in the middle of a GET operation

2013-02-18 Thread diesk
From: Dies Koper --- server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb | 136 -- 1 file changed, 77 insertions(+), 59 deletions(-) diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb index c8bcc7b..66bddde 10064

RE: [PATCH] CIMI: system and system_template support for mock driver. Just GET for now, no subcollections

2013-02-18 Thread Koper, Dies
Hi Michal, David helped me pinpoint where the issue was, and suggested I ask you why the capability check is failing: On my machine, the following request causes a "The required capability to execute this operation is missing", while it works on David's: curl --user mockuser:mockpassword -H "Ac

[PATCH] CIMI: system and system_template support for mock driver, with unit tests. Just GET for now, no subcollections

2013-02-18 Thread diesk
From: Dies Koper --- server/lib/cimi/collections/system_templates.rb| 72 server/lib/cimi/collections/systems.rb | 198 + server/lib/cimi/models.rb | 2 + server/lib/cimi/models/system.rb | 68 +++ se

Re: [PATCH core 7/7] CIMI: Print warning for pending migrations

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 16:27 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > We don't want to run any migrations automatically during > Deltacloud server boot time, to give users chance to backup > data, etc. > > This patch will provide a nice warning message if you start > Deltacloud

Re: [PATCH core 6/7] Core: Re-use deltacloud-db-migrate in the Rake task

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 16:27 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > > Signed-off-by: Michal fojtik > --- > server/Rakefile | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) ACK; should also be squashed into something (1/7 ?) David

Re: [PATCH core 5/7] Core: Fix rake mock:fixtures:reset tasks to cleanup correct dir

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 16:27 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > > Signed-off-by: Michal fojtik > --- > server/Rakefile | 23 ++- > 1 file changed, 6 insertions(+), 17 deletions(-) ACK(ish) .. I'd rather make running the initializers part of an intern

Re: [PATCH core 4/7] Core: Don't run migrations when server starts

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 16:27 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > Users can now run migrations using: > > - bin/deltacloud-db-upgrade > - rake db:migrate > > Signed-off-by: Michal fojtik ACK. Should be squashed into 1/7 David

Re: [PATCH core 3/7] Core: Moved migrations to server/db/migrations

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 16:27 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > > Signed-off-by: Michal fojtik > --- > .../migrations/1_add_realm_to_machine_template.rb | 23 > ++ > .../migrations/1_add_realm_to_machine_template.rb | 23 > -- >

Re: [PATCH core 2/7] CIMI: Add support for 'realm' in MachineTemplate

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 16:27 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > Clients can now specify the 'realm' attribute when > creating the new MachineTemplate entity. If they then use > this MachineTemplate to create a new Machine, the Machine > will be placed into that realm. > >

Re: [PATCH core 1/7] Core: Added support for migrations to database

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 16:27 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > Currently everytime we add or remove attributes from > DB, users need to rerun the 'rake' task to recreate the > database. > > This patch will make possible to update the DB schema > without executing the rake

Re: [PATCH core 8/8] Mock: Cleanup in MockDriver code

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 14:41 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > - Removed obsoleted 'requires' (yaml, base64, etc) > - REALMS moved to 'realms' method > - @@METRICS_NAMES moved to Metric model > - Revamped 'filter_on' methods > - Next 'id' generation moved to separate metho

Re: [PATCH core 7/8] Tests: Be more verbose when checking state in Mock tests

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 14:41 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > The XML should reflect the state change of an Instance. > Instead of checking the status code returned we should also > verify the XML. > > Signed-off-by: Michal fojtik > --- > server/tests/deltacloud/collec

Re: [PATCH core 6/8] Mock: Cleanup in how we create mock 'metrics'

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 14:41 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > Moved the code to the Metric model to keep MockDriver > clean. > > Signed-off-by: Michal fojtik > --- > server/lib/deltacloud/models/metric.rb | 45 > ++ > 1 file changed, 45

Re: [PATCH core 5/8] Mock: Require 'yaml' in client instead of driver

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 14:41 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > The YAML is really required in MockClient (I think this > require is not required here anyway ;-) > > This patch will also make .store() method return the stored > object, so in driver we don't need to create

Re: [PATCH core 4/8] Core: Added possibility to run filter_on with multiple attrs

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 14:41 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > So instead of writing: > > instances = filter_on instances, :id, opts > instances = filter_on instances, :realm_id, opts > instances = filter_on instances, :state, opts > > You can now use: > > instances = f

Re: [PATCH core 3/8] Core: Added possibility to define multiple features for collection

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 14:41 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > Instead of: > > feature :collection, :name > feature :collection, :second_name > > You can now use: > > feature :collection, :name, :second_name, ... > > Signed-off-by: Michal fojtik > --- > server/lib/de

Re: [PATCH core 2/8] Tests: Removed debugging 'puts' from openstack tests

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 14:41 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > > Signed-off-by: Michal fojtik ACK

Re: [PATCH core 1/8] Core: Fix rake mock:fixtures:reset tasks to cleanup correct dir

2013-02-18 Thread David Lutterkort
On Mon, 2013-02-18 at 14:41 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > > Signed-off-by: Michal fojtik ACK, though I prefer the patch I sent for this, since it relies on the initializers doing their thing rather than redoing it in the Rakefile (even if it's just one line now) D

Re: [PATCH] CIMI: system and system_template support for mock driver. Just GET for now, no subcollections

2013-02-18 Thread David Lutterkort
On Tue, 2013-02-19 at 10:53 +1100, Koper, Dies wrote: > > strange, both of these work for me now. I had to do an unholy > > combination of deleting directories of the form /var/tmp/*deltacloud* , > > If you could send me the exact steps in the unholy combination you > followed, maybe that would he

Launching the CIMI webclient

2013-02-18 Thread David Lutterkort
Hi, I just tried to launch the CIMI webclient from a git checkout, following the instructions in clients/cimi/README.md When I run './bin/start -u "http://localhost:3001/cimi";' I get the attached error message. What am I doing wrong ? Also, it would be much cleaner if you passed the URL of the

RE: [PATCH] CIMI: system and system_template support for mock driver. Just GET for now, no subcollections

2013-02-18 Thread Koper, Dies
Hi David, Glad to hear it's working for someone :) But making it less likely that I'm going to find out what's wrong. Some different gem version? > strange, both of these work for me now. I had to do an unholy > combination of deleting directories of the form /var/tmp/*deltacloud* , If you coul

Re: [PATCH] CIMI: system and system_template support for mock driver. Just GET for now, no subcollections

2013-02-18 Thread David Lutterkort
Hi Dies, strange, both of these work for me now. I had to do an unholy combination of deleting directories of the form /var/tmp/*deltacloud* , restarting the server and requesting the CEP to get proper responses; with the two patches I just posted, it should be enough to do 'rake mock:fixtures:res

A couple fixes related to initializers

2013-02-18 Thread lutter
There was a typo in the mock initializer, and the Rakefile needed updating

[PATCH 1/2] * lib/initializers/mock_initialize.rb: fix typo

2013-02-18 Thread lutter
From: David Lutterkort We did not create MOCK_STORAGE_DIR when it was missing --- server/lib/initializers/mock_initialize.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/lib/initializers/mock_initialize.rb b/server/lib/initializers/mock_initialize.rb index c8c

[PATCH 2/2] * Rakefile (mock:fixtures): fix tasks to work with new layout/initializers

2013-02-18 Thread lutter
From: David Lutterkort --- server/Rakefile | 46 +- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/server/Rakefile b/server/Rakefile index 41bd2c1..48fd9f6 100644 --- a/server/Rakefile +++ b/server/Rakefile @@ -46,40 +46,36 @@ Gem::Pac

Re: [jira] [Created] (DTACLOUD-487) Keypair support for ovirt backend

2013-02-18 Thread Jeremy Daggett
X Sent from my iPhone On Feb 18, 2013, at 12:11 PM, "Ian Main (JIRA)" wrote: > Ian Main created DTACLOUD-487: > - > > Summary: Keypair support for ovirt backend > Key: DTACLOUD-487 > URL: https://issues.apache.org/jira

[jira] [Created] (DTACLOUD-487) Keypair support for ovirt backend

2013-02-18 Thread Ian Main (JIRA)
Ian Main created DTACLOUD-487: - Summary: Keypair support for ovirt backend Key: DTACLOUD-487 URL: https://issues.apache.org/jira/browse/DTACLOUD-487 Project: DeltaCloud Issue Type: Improvement

[jira] [Closed] (DTACLOUD-278) CIMI: create_image operation is missing from ec2 (and maybe other) machines

2013-02-18 Thread Ronelle Landy (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ronelle Landy closed DTACLOUD-278. -- Resolution: Fixed Fixed in deltacloud 1.1.1: STARTED 4 7864320 http://qeblade

[jira] [Closed] (DTACLOUD-418) Missing href-attribute in JSON output

2013-02-18 Thread Ronelle Landy (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ronelle Landy closed DTACLOUD-418. -- Resolution: Fixed Closing this JIRA http://tracker.deltacloud.org/set/258 - marked as PU

[jira] [Closed] (DTACLOUD-276) CIMI: restart action href is listed as: /cimi/restart_machines/

2013-02-18 Thread Ronelle Landy (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ronelle Landy closed DTACLOUD-276. -- Resolution: Fixed Fixed in deltacloud 1.1.1: [root@qeblade39 ~]# curl -X GET --user "un:pw"

[jira] [Closed] (DTACLOUD-102) Most of the buttons in Deltacloud UI are not functioning properly, needs a tricky way to click on those buttons

2013-02-18 Thread Ronelle Landy (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ronelle Landy closed DTACLOUD-102. -- Resolution: Fixed Closing issue - buttons working more systematically now >

Re: DTACLOUD-462 - a GET for an instance can fail while a different instance is being destroyed.

2013-02-18 Thread jvlcek
On 02/15/2013 03:43 PM, jvl...@redhat.com wrote: > This patch addresses JIRA DTACLOUD-462. > > The Indication: > A backtrace was produced from a GET /api/instance/ > > The Problem: > If a different instance is being destroyed during a GET for > a different instance a backtrace is produced. This is

[PATCH core 7/7] CIMI: Print warning for pending migrations

2013-02-18 Thread mfojtik
From: Michal Fojtik We don't want to run any migrations automatically during Deltacloud server boot time, to give users chance to backup data, etc. This patch will provide a nice warning message if you start Deltacloud and you have some pending migrations to run. Signed-off-by: Michal fojtik -

[PATCH core 5/7] Core: Fix rake mock:fixtures:reset tasks to cleanup correct dir

2013-02-18 Thread mfojtik
From: Michal Fojtik Signed-off-by: Michal fojtik --- server/Rakefile | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/server/Rakefile b/server/Rakefile index 5938b9e..2a52ec2 100644 --- a/server/Rakefile +++ b/server/Rakefile @@ -56,32 +56,21 @@ name

[PATCH core 3/7] Core: Moved migrations to server/db/migrations

2013-02-18 Thread mfojtik
From: Michal Fojtik Signed-off-by: Michal fojtik --- .../migrations/1_add_realm_to_machine_template.rb | 23 ++ .../migrations/1_add_realm_to_machine_template.rb | 23 -- 2 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 server/db/

[PATCH core 4/7] Core: Don't run migrations when server starts

2013-02-18 Thread mfojtik
From: Michal Fojtik Users can now run migrations using: - bin/deltacloud-db-upgrade - rake db:migrate Signed-off-by: Michal fojtik --- server/Rakefile | 10 ++ server/bin/deltacloud-db-upgrade | 13 + server/lib/db.rb | 4 +--- 3 files cha

[PATCH core 6/7] Core: Re-use deltacloud-db-migrate in the Rake task

2013-02-18 Thread mfojtik
From: Michal Fojtik Signed-off-by: Michal fojtik --- server/Rakefile | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/Rakefile b/server/Rakefile index 2a52ec2..9ec9aa4 100644 --- a/server/Rakefile +++ b/server/Rakefile @@ -46,18 +46,16 @@ Gem::PackageTask.n

[PATCH core 1/7] Core: Added support for migrations to database

2013-02-18 Thread mfojtik
From: Michal Fojtik Currently everytime we add or remove attributes from DB, users need to rerun the 'rake' task to recreate the database. This patch will make possible to update the DB schema without executing the rake task. The 'migrations' extension in Sequel will check the 'schema_version'

[PATCH core 2/7] CIMI: Add support for 'realm' in MachineTemplate

2013-02-18 Thread mfojtik
From: Michal Fojtik Clients can now specify the 'realm' attribute when creating the new MachineTemplate entity. If they then use this MachineTemplate to create a new Machine, the Machine will be placed into that realm. Signed-off-by: Michal fojtik --- server/lib/cimi/models/machine.rb

Database migrations (rev 2)

2013-02-18 Thread mfojtik
Hi, This set will add support for database migrations and should work on the latest master. I added few extra features, like: - Now you get nice warning message if you are pending some migrations - Rake tasks is now super-small :) - I tried to re-use the initialization code I was thinking about

[PATCH] rename vsp to networkPort

2013-02-18 Thread martha . c . chumo
From: NjeriChelimo --- server/lib/cimi/models/network_port.rb | 34 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/server/lib/cimi/models/network_port.rb b/server/lib/cimi/models/network_port.rb index d69dc3f..03b0ca3 100644 --- a/server/lib/c

[PATCH core 6/8] Mock: Cleanup in how we create mock 'metrics'

2013-02-18 Thread mfojtik
From: Michal Fojtik Moved the code to the Metric model to keep MockDriver clean. Signed-off-by: Michal fojtik --- server/lib/deltacloud/models/metric.rb | 45 ++ 1 file changed, 45 insertions(+) diff --git a/server/lib/deltacloud/models/metric.rb b/server/lib/

[PATCH core 7/8] Tests: Be more verbose when checking state in Mock tests

2013-02-18 Thread mfojtik
From: Michal Fojtik The XML should reflect the state change of an Instance. Instead of checking the status code returned we should also verify the XML. Signed-off-by: Michal fojtik --- server/tests/deltacloud/collections/instances_collection_test.rb | 3 +++ 1 file changed, 3 insertions(+) di

[PATCH core 3/8] Core: Added possibility to define multiple features for collection

2013-02-18 Thread mfojtik
From: Michal Fojtik Instead of: feature :collection, :name feature :collection, :second_name You can now use: feature :collection, :name, :second_name, ... Signed-off-by: Michal fojtik --- server/lib/deltacloud/drivers/base_driver.rb| 16 +--- server/lib/deltacloud/drivers/e

[PATCH core 8/8] Mock: Cleanup in MockDriver code

2013-02-18 Thread mfojtik
From: Michal Fojtik - Removed obsoleted 'requires' (yaml, base64, etc) - REALMS moved to 'realms' method - @@METRICS_NAMES moved to Metric model - Revamped 'filter_on' methods - Next 'id' generation moved to separate method a lot of small changes... Signed-off-by: Michal fojtik --- server/lib

[PATCH core 5/8] Mock: Require 'yaml' in client instead of driver

2013-02-18 Thread mfojtik
From: Michal Fojtik The YAML is really required in MockClient (I think this require is not required here anyway ;-) This patch will also make .store() method return the stored object, so in driver we don't need to create a special var for it. Signed-off-by: Michal fojtik --- server/lib/deltac

[PATCH core 4/8] Core: Added possibility to run filter_on with multiple attrs

2013-02-18 Thread mfojtik
From: Michal Fojtik So instead of writing: instances = filter_on instances, :id, opts instances = filter_on instances, :realm_id, opts instances = filter_on instances, :state, opts You can now use: instances = filter_on instances, opts, :id, :realm_id, :state The backward compatibility with o

[PATCH core 1/8] Core: Fix rake mock:fixtures:reset tasks to cleanup correct dir

2013-02-18 Thread mfojtik
From: Michal Fojtik Signed-off-by: Michal fojtik --- server/Rakefile | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/server/Rakefile b/server/Rakefile index 5494148..4be72ba 100644 --- a/server/Rakefile +++ b/server/Rakefile @@ -46,32 +46,21 @@ Gem:

[PATCH core 2/8] Tests: Removed debugging 'puts' from openstack tests

2013-02-18 Thread mfojtik
From: Michal Fojtik Signed-off-by: Michal fojtik --- server/tests/drivers/openstack/instances_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/tests/drivers/openstack/instances_test.rb b/server/tests/drivers/openstack/instances_test.rb index 9adcf4b..986bc1

[PATCH 1/2] changed routing_group to forwarding_group

2013-02-18 Thread martha . c . chumo
From: NjeriChelimo --- server/lib/cimi/models/network.rb | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/lib/cimi/models/network.rb b/server/lib/cimi/models/network.rb index f415664..e9d133f 100644 --- a/server/lib/cimi/models/network.rb +++ b/server/li

[PATCH 2/2] renaming vsp to network and removing CIMI client vsp view files

2013-02-18 Thread martha . c . chumo
From: NjeriChelimo --- clients/cimi/app.rb|4 clients/cimi/lib/entities.rb |3 --- server/lib/cimi/models/network_port.rb | 34 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/clients/cimi/app.rb b/cli

[jira] [Created] (DTACLOUD-486) CIMI client renaming issues after VSP -> Network transition

2013-02-18 Thread Martha Chumo (JIRA)
Martha Chumo created DTACLOUD-486: - Summary: CIMI client renaming issues after VSP -> Network transition Key: DTACLOUD-486 URL: https://issues.apache.org/jira/browse/DTACLOUD-486 Project: DeltaCloud

Validations, Create entities and more (rebased)

2013-02-18 Thread Michal Fojtik
Hi, As usual with 11+ patches set, it requires rebase soon :-) I recorded the rebased version here: http://tracker.deltacloud.org/set/322 There was just one problem with imageLocation attribute for MachineImage creation. The comment states that this attribute is 'required' when creating a new Ma

Re: [PATCH core 1/4] Core: Added 'lib/initializers' directory

2013-02-18 Thread Michal Fojtik
On 02/15, David Lutterkort wrote: > On Fri, 2013-02-15 at 11:36 +0100, mfoj...@redhat.com wrote: > > From: Michal Fojtik > > > > Before this patch, we used to initialize stuff like database > > or mock directories in random places in source code. > > > > This patch should make all initialization

Re: [PATCH core 4/4] Tests: Use 'initializers' in all our tests.

2013-02-18 Thread Michal Fojtik
On 02/15, David Lutterkort wrote: > On Fri, 2013-02-15 at 11:36 +0100, mfoj...@redhat.com wrote: > > From: Michal Fojtik > > > > This patch will make possible to run our unit-tests without > > initializing the Deltacloud.configure classes, because we already > > do that in initializers. > > > >