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

2013-02-07 Thread Michal Fojtik
On 02/07, David Lutterkort wrote: > On Thu, 2013-02-07 at 15:35 +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

Re: [PATCH] CIMI bug - create CIMI db resource with no properties - Fix for DTACLOUD-448

2013-02-07 Thread David Lutterkort
On Thu, 2013-01-31 at 19:14 +0200, mar...@redhat.com wrote: > diff --git a/server/lib/cimi/models/address_template.rb > b/server/lib/cimi/models/address_template.rb > index 41d86f6..b804396 100644 > --- a/server/lib/cimi/models/address_template.rb > +++ b/server/lib/cimi/models/address_template.rb

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

2013-02-07 Thread David Lutterkort
On Thu, 2013-02-07 at 15:35 +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 2/3] Fix issue with arubacloud driver - savon client configuration method changed

2013-02-07 Thread David Lutterkort
On Tue, 2013-02-05 at 18:22 +0200, mar...@redhat.com wrote: > diff --git a/server/lib/deltacloud/drivers/arubacloud/arubacloud_driver.rb > b/server/lib/deltacloud/drivers/arubacloud/arubacloud_driver.rb > index 0fd8bee..7a3e974 100644 > --- a/server/lib/deltacloud/drivers/arubacloud/arubacloud_dri

Re: [PATCH core 3/4] CIMI: Initial inclusion of CIMI action models

2013-02-07 Thread David Lutterkort
On Thu, 2013-02-07 at 13:52 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > The way of how we currently create CIMI entities is not > really nice. We parse the raw JSON/XML and then we are > trying to create the CIMI entity. > > Besides the code looks ugly, there is no way to add vali

[PATCH 3/3] CIMI: use MachineCreate object

2013-02-07 Thread lutter
From: David Lutterkort Move the logic from Machine.create_from_json and Machine.create_from_xml into MachineCreate --- server/lib/cimi/collections/machines.rb | 7 +--- server/lib/cimi/models/machine.rb| 69 server/lib/cimi/models/machine_create.rb | 29

[PATCH 2/3] CIMI models: add a MachineCreate model

2013-02-07 Thread lutter
From: David Lutterkort --- server/lib/cimi/models.rb | 1 + server/lib/cimi/models/machine_create.rb | 18 +++ server/tests/cimi/model/machine_create_spec.rb | 44 ++ 3 files changed, 63 insertions(+) create mode 100644 server/lib/cimi

[PATCH 1/3] CIMI models: add a 'ref' to the DSL for embedded resources

2013-02-07 Thread lutter
From: David Lutterkort This makes it possible to have a full MachineConfiguration object referenced from a Machinetemplate --- server/lib/cimi/models.rb | 4 +- server/lib/cimi/models/base.rb | 5 +++ server/lib/cimi/models/machine_template.rb

Another take on machine creation

2013-02-07 Thread lutter
These patches represent another take on machine creation from what Michal posted earlier - I've had them lying around for a while, and should have sent them earlier. There are a myriad ways in which an object can be created, especially for machines; I introduced a new 'ref' keyword to the model D

Re: [PATCH core 2/4] CIMI: Capture the validation errors and advertise them as HTTP 400

2013-02-07 Thread David Lutterkort
On Thu, 2013-02-07 at 13:52 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > In case when client sent scrumbed XML or JSON body, this patch > will make sure we send 'HTTP 400 - Bad Request' back instead of > horrible looking 500 error. > > This patch also properly advertise the Validat

Re: [PATCH core 1/4] CIMI: Initial addition of attribute validation for CIMI models

2013-02-07 Thread David Lutterkort
On Thu, 2013-02-07 at 13:52 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik > > This addition will make possible to specify the 'required => true' > option for all attributes in CIMI models, like: > > class Machine < Base > text :name, :required => true > end > > To run a check if the

Re: [PATCH 2/2] Refactor how CIMI models are stored in the database

2013-02-07 Thread David Lutterkort
On Thu, 2013-02-07 at 13:31 +0100, Michal Fojtik wrote: > On 02/06, lut...@redhat.com wrote: > > I really like the simplification you did. Altrough I will need to look > deeper to understand how exactly the code works, I like it :-) The one thing I don't like too much about what I did is that I'd

Re: [PATCH] passing realm option when creating a new VM

2013-02-07 Thread David Lutterkort
On Thu, 2013-02-07 at 14:43 +0100, Michal Fojtik wrote: > On 02/07, Oved Ourfali wrote: > > ACK. > > One thought, we do have 'realm' defined for the Machine entity as > resourceMetadata. Is this element supposed to work also for the > MachineCreate entity? Since it's something people should be a

Re: [jira] [Closed] (DTACLOUD-443) Openstack Provider 'Availability Zones'

2013-02-07 Thread David Lutterkort
Hi guys, I am very confused by what's been happening on this ticket. Can somebody explain what the differences between different Openstack providers and realms now is ? The way it should work is that different providers share nothing (different images, different instances, different everything) w

Re: making cimi tests pass on fgcp

2013-02-07 Thread jvlcek
On 02/05/2013 02:29 AM, Koper, Dies wrote: > Hi Joe, > > Thanks for your reply! > >> I think this proposal sounds great. The only concern I have is >> how to address retires that could potentially never succeed. > There is already retry logic in current tests (both cimi and api) and I > have been c

[jira] [Resolved] (DTACLOUD-416) No Base64 Decoding Openstack Driver

2013-02-07 Thread Joseph J. VLcek (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joseph J. VLcek resolved DTACLOUD-416. -- Resolution: Fixed Assignee: Ronelle Landy (was: Joseph J. VLcek) Fix with comm

[jira] [Closed] (DTACLOUD-438) Import SSH key into Amazon EC2 not working as expected

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marios Andreou closed DTACLOUD-438. --- > Import SSH key into Amazon EC2 not working as expected >

[jira] [Resolved] (DTACLOUD-438) Import SSH key into Amazon EC2 not working as expected

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marios Andreou resolved DTACLOUD-438. - Resolution: Fixed > Import SSH key into Amazon EC2 not working as expected > --

[jira] [Commented] (DTACLOUD-438) Import SSH key into Amazon EC2 not working as expected

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573619#comment-13573619 ] Marios Andreou commented on DTACLOUD-438: - pushed with commit id #5a38b15d561fb0

[jira] [Commented] (DTACLOUD-443) Openstack Provider 'Availability Zones'

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573616#comment-13573616 ] Marios Andreou commented on DTACLOUD-443: - Forgot to mention - a new version of

[jira] [Closed] (DTACLOUD-443) Openstack Provider 'Availability Zones'

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marios Andreou closed DTACLOUD-443. --- > Openstack Provider 'Availability Zones' > --- > >

[jira] [Resolved] (DTACLOUD-443) Openstack Provider 'Availability Zones'

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marios Andreou resolved DTACLOUD-443. - Resolution: Fixed > Openstack Provider 'Availability Zones' > -

[jira] [Commented] (DTACLOUD-443) Openstack Provider 'Availability Zones'

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573615#comment-13573615 ] Marios Andreou commented on DTACLOUD-443: - OK - Christian thanks for all you hel

Re: [jira] [Commented] (DTACLOUD-455) [PATCH] Openstack: Adds 'launch_time' attribute mapping to instance collection

2013-02-07 Thread Sri Harsha Yenuganti
unsubscribe On 7 February 2013 10:53, Marios Andreou (JIRA) wrote: > > [ > https://issues.apache.org/jira/browse/DTACLOUD-455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573611#comment-13573611] > > Marios Andreou commented on DTACLOUD-455: > ---

[jira] [Commented] (DTACLOUD-455) [PATCH] Openstack: Adds 'launch_time' attribute mapping to instance collection

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573611#comment-13573611 ] Marios Andreou commented on DTACLOUD-455: - ACK - thanks Christian - pushed with

[jira] [Resolved] (DTACLOUD-455) [PATCH] Openstack: Adds 'launch_time' attribute mapping to instance collection

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marios Andreou resolved DTACLOUD-455. - Resolution: Fixed > [PATCH] Openstack: Adds 'launch_time' attribute mapping to inst

[jira] [Closed] (DTACLOUD-455) [PATCH] Openstack: Adds 'launch_time' attribute mapping to instance collection

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marios Andreou closed DTACLOUD-455. --- > [PATCH] Openstack: Adds 'launch_time' attribute mapping to instance collection >

[jira] [Updated] (DTACLOUD-450) Creating images from instances - Openstack provider returns 404 although the image is created

2013-02-07 Thread Marios Andreou (JIRA)
[ https://issues.apache.org/jira/browse/DTACLOUD-450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marios Andreou updated DTACLOUD-450: Attachment: 0001-Core-DTACLOUD-450-update-gemspec-for-latest-openstac.patch I cut a new v

[jira] [Created] (DTACLOUD-457) RHEVm, Passing an invalid instance ID to start instance results in traceback with 500.

2013-02-07 Thread Joseph J. VLcek (JIRA)
Joseph J. VLcek created DTACLOUD-457: Summary: RHEVm, Passing an invalid instance ID to start instance results in traceback with 500. Key: DTACLOUD-457 URL: https://issues.apache.org/jira/browse/DTACLOUD-457

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

2013-02-07 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

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

2013-02-07 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'

Re: CIMI and attribute validation

2013-02-07 Thread Michal Fojtik
On 02/06, David Lutterkort wrote: > > 2. Add ':required => true' parameter to attributes in the CIMI models and > >then add '.validate(format, body)' method and do all the validation on > >the model level. > > > >class MachineTemplate > > text :name, :required => true > >end >

Re: [PATCH] passing realm option when creating a new VM

2013-02-07 Thread Michal Fojtik
On 02/07, Oved Ourfali wrote: ACK. One thought, we do have 'realm' defined for the Machine entity as resourceMetadata. Is this element supposed to work also for the MachineCreate entity? -- Michal > --- > server/lib/cimi/models/machine.rb | 2 ++ > 1 file changed, 2 insertions(+) > > diff -

[PATCH] passing realm option when creating a new VM

2013-02-07 Thread Oved Ourfali
--- server/lib/cimi/models/machine.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/lib/cimi/models/machine.rb b/server/lib/cimi/models/machine.rb index 6e075e8..9164847 100644 --- a/server/lib/cimi/models/machine.rb +++ b/server/lib/cimi/models/machine.rb @@ -70,6 +70,7 @@ class C

[PATCH core 3/4] CIMI: Initial inclusion of CIMI action models

2013-02-07 Thread mfojtik
From: Michal Fojtik The way of how we currently create CIMI entities is not really nice. We parse the raw JSON/XML and then we are trying to create the CIMI entity. Besides the code looks ugly, there is no way to add validation for required attributes without make it even more uglier. This patc

[PATCH core 1/4] CIMI: Initial addition of attribute validation for CIMI models

2013-02-07 Thread mfojtik
From: Michal Fojtik This addition will make possible to specify the 'required => true' option for all attributes in CIMI models, like: class Machine < Base text :name, :required => true end To run a check if the instance of Machine is valid or not you can do following: Machine.from_xml(xml_b

[PATCH core 2/4] CIMI: Capture the validation errors and advertise them as HTTP 400

2013-02-07 Thread mfojtik
From: Michal Fojtik In case when client sent scrumbed XML or JSON body, this patch will make sure we send 'HTTP 400 - Bad Request' back instead of horrible looking 500 error. This patch also properly advertise the ValidationError in case when client want to create CIMI resource but the validatio

[PATCH core 4/4] CIMI: Tests for CIMI validation in MachineTemplate model

2013-02-07 Thread mfojtik
From: Michal Fojtik Signed-off-by: Michal fojtik --- .../cimi/collections/machine_templates_test.rb | 76 ++ 1 file changed, 76 insertions(+) create mode 100644 server/tests/cimi/collections/machine_templates_test.rb diff --git a/server/tests/cimi/collections/machine_

Initial implementation of CIMI action models and validation

2013-02-07 Thread mfojtik
Hi, This patch set introduces the 'models/actions' directory for CIMI where we can store the 'action' models, like MachineTemplateCreate or MachineCreate. I do believe these models will make our CIMI entities more nicer and we will require much less code to handle the create operation. Also using

Re: [PATCH 2/2] Refactor how CIMI models are stored in the database

2013-02-07 Thread Michal Fojtik
On 02/06, lut...@redhat.com wrote: I really like the simplification you did. Altrough I will need to look deeper to understand how exactly the code works, I like it :-) ACK. -- Michal > From: David Lutterkort > > The 'entities' table now associates entries with CIMI::Model objects rather >