From: Michal Fojtik
This feature indicate wheter cloud provider support
uploading of custom PEM keys or not.
Signed-off-by: Michal fojtik
---
server/lib/deltacloud/collections/keys.rb | 1 -
server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb | 1 +
server
From: Michal Fojtik
This patch add URL helpers for all Rabbit subcollections, like:
system_volumes(:id => system_id)
=> "http://localhost:3001/cimi/systems/system_id/volumes";
system_volumes(:id => system_id, :ent_id => volume_id)
=> "http://localhost:3001/cimi/systems/system_id/volumes/volum
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
client/lib/deltacloud/client/models/base.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/client/lib/deltacloud/client/models/base.rb
b/client/lib/deltacloud/client/models/base.rb
index dbf34f7..cfdab5d 100644
--- a/client/lib/delta
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
client/lib/deltacloud/client.rb | 1 +
client/lib/deltacloud/client/methods/instance.rb | 1 +
2 files changed, 2 insertions(+)
diff --git a/client/lib/deltacloud/client.rb b/client/lib/deltacloud/client.rb
index c7048dd..7
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
client/lib/deltacloud/client/models/instance.rb | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/client/lib/deltacloud/client/models/instance.rb
b/client/lib/deltacloud/client/models/instance.rb
index 01e188
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
.../lib/deltacloud/client/models/instance_address.rb | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/client/lib/deltacloud/client/models/instance_address.rb
b/client/lib/deltacloud/client/models/ins
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
client/tests/methods/instance_test.rb | 6 ++
client/tests/models/image_test.rb | 2 ++
2 files changed, 8 insertions(+)
diff --git a/client/tests/methods/instance_test.rb
b/client/tests/methods/instance_test.rb
index 47b3934..4abe
From: Michal Fojtik
All CIMI entities share the same code in Rabbit operations.
These helpers should merge them all to avoid code duplication.
Signed-off-by: Michal fojtik
---
server/lib/cimi/helpers/cimi_rabbit_helper.rb | 59 +++
1 file changed, 59 insertions(+)
crea
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/address_templates.rb | 46 ++-
server/lib/cimi/collections/addresses.rb | 48 +++-
server/lib/cimi/collections/base.rb| 6 ++-
server/lib/cimi/collectio
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/service/volume_template.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/cimi/service/volume_template.rb
b/server/lib/cimi/service/volume_template.rb
index d95ba72..89d2879 100644
--- a/serve
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/service/volume_configuration.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/cimi/service/volume_configuration.rb
b/server/lib/cimi/service/volume_configuration.rb
index ebb2c7c..ebab1cb 100
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/service/volume_template.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/cimi/service/volume_template.rb
b/server/lib/cimi/service/volume_template.rb
index d95ba72..89d2879 100644
--- a/serve
From: Michal Fojtik
* Wrong attribute values are not reported correctly
Signed-off-by: Michal fojtik
---
server/lib/cimi/models/resource.rb | 5 ++
server/lib/cimi/models/schema.rb | 88 +---
server/tests/cimi/model/errors_spec.rb | 141
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/deltacloud/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/deltacloud/version.rb b/server/lib/deltacloud/version.rb
index a21eacb..7e19d99 100644
--- a/server/lib/deltacloud/version.rb
+++
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/Gemfile | 2 --
server/deltacloud-core.gemspec | 9 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/server/Gemfile b/server/Gemfile
index 5f3c98d..7ac1b25 100644
--- a/server/Gemfile
+++ b/serv
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
b/server/lib/deltacloud/drivers/d
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
.travis.yml | 6 ++
1 file changed, 6 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 9651c9a..e720039 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,13 @@ install:
- cd server
- bundle install
- bin/deltacl
Good news everyone!
I started a complete rewrite of the deltacloud-client component
of Deltacloud core repo few week ago, because:
1. Too much *magic* in the current client (meta-programming, etc)
2. No documentation (see 1))
3. Hard to navigate in code and fix bugs (see 1,2)
4. Hard to add colle
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/deltacloud/api.rb | 11 +-
server/lib/deltacloud/collections/images.rb| 2 +-
server/lib/deltacloud/collections/instances.rb | 4 +-
server/lib/deltacloud/drivers/base_driver.rb | 1 +
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
.../deltacloud/collections/instances_collection_test.rb| 5 -
server/tests/deltacloud/common.rb | 2 +-
server/tests/drivers/ec2/buckets_test.rb | 2 +-
server/tests/drivers/ec2/images_te
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/tests/test_helper.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/tests/test_helper.rb b/server/tests/test_helper.rb
index 61ee26d..b0184f3 100644
--- a/server/tests/test_helper.rb
+++ b/server/tests/test_helper.rb
@@ -2
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/deltacloud/core_ext/array.rb | 1 +
server/lib/deltacloud/core_ext/integer.rb | 22 ++
server/lib/deltacloud/core_ext/string.rb | 73 +++
3 files changed, 59 insertions(+), 37 deletions(-)
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/Gemfile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/server/Gemfile b/server/Gemfile
index bd56845..5440691 100644
--- a/server/Gemfile
+++ b/server/Gemfile
@@ -2,6 +2,8 @@ source "http://rubygems.org";
gemspec
+gem 'til
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/address_templates.rb | 6 +++---
server/lib/cimi/collections/addresses.rb | 6 +++---
server/lib/cimi/collections/cloud_entry_point.rb | 2 +-
server/lib/cimi/collections/credentials.rb
From: Michal Fojtik
Make possible to call .parse on Service models from
Rabbit collections.
Signed-off-by: Michal fojtik
---
server/lib/cimi/service/base.rb | 5 +
1 file changed, 5 insertions(+)
diff --git a/server/lib/cimi/service/base.rb b/server/lib/cimi/service/base.rb
index 9f2c765.
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/models/schema.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/lib/cimi/models/schema.rb b/server/lib/cimi/models/schema.rb
index 4ce16b9..6cbf8cc 100644
--- a/server/lib/cimi/models/schema.rb
+
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/machine_images.rb | 6 ++--
server/lib/cimi/models/machine_image.rb | 28 ---
server/lib/cimi/service.rb| 1 +
server/lib/cimi/service/machine_image.rb | 51 +++
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/tests/cimi/collections/machine_templates_test.rb | 1 -
1 file changed, 1 deletion(-)
diff --git a/server/tests/cimi/collections/machine_templates_test.rb
b/server/tests/cimi/collections/machine_templates_test.rb
index 696052a..cfe2
From: Michal Fojtik
No need to have ugly chained methods in collections.
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/machines.rb | 2 +-
server/lib/cimi/service/base.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/lib/cimi/collections/m
From: Michal Fojtik
In CIMI we don't have views except the error ones.
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/base.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/lib/cimi/collections/base.rb
b/server/lib/cimi/collections/base.rb
index 3
From: David Lutterkort
The current CIMI::Model classes address two concerns:
* serialization/deserialization of CIMI objects
* interaction with the current driver and the DB
This patch splits these two concerns into two separate class hierarchies:
CIMI::Model for (de)serialization and CIMI:
From: Michal Fojtik
Using HTTPS connection is now prefered way how to access
rubygems. Under MRI 2.0 having non-https URL will print
a huge ugly warning.
Signed-off-by: Michal fojtik
---
server/Gemfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/Gemfile b/server/
From: Michal Fojtik
The 'puma' web server is much faster and reliable
than java webrick.
Signed-off-by: Michal fojtik
---
server/Gemfile | 1 +
server/bin/deltacloudd | 24 +---
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/server/Gemfile b/server
From: Michal Fojtik
Sinatra::Rabbit for CIMI is now CIMI::Rabbit
Sinatra::Rabbit for Deltacloud is now Deltacloud::CIMI
Signed-off-by: Michal fojtik
---
server/lib/deltacloud/drivers/openstack/openstack_driver.rb| 6 +++---
server/lib/deltacloud/helpers/deltacloud_helper.rb |
From: Michal Fojtik
NOTE: A sinatra-rabbit >= 1.15 is required to make this work and to
fix the bug.
Signed-off-by: Michal fojtik
---
server/deltacloud-core.gemspec| 2 +-
server/lib/cimi/collections/base.rb | 4
server/lib/deltacloud/collections/base.rb | 4
3 file
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/addresses.rb | 2 --
1 file changed, 2 deletions(-)
diff --git a/server/lib/cimi/collections/addresses.rb
b/server/lib/cimi/collections/addresses.rb
index 92aca3e..c34068d 100644
--- a/server/lib/cimi/collection
From: Michal Fojtik
NOTE: A sinatra-rabbit >= 1.15 is required to make this work and to
fix the bug.
Signed-off-by: Michal fojtik
---
server/deltacloud-core.gemspec| 2 +-
server/lib/cimi/collections/base.rb | 4
server/lib/deltacloud/collections/base.rb | 4
3 file
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/addresses.rb | 2 --
1 file changed, 2 deletions(-)
diff --git a/server/lib/cimi/collections/addresses.rb
b/server/lib/cimi/collections/addresses.rb
index 92aca3e..c34068d 100644
--- a/server/lib/cimi/collection
From: Michal Fojtik
- Added :authentication_key feature to instances
Signed-off-by: Michal fojtik
---
.../drivers/digitalocean/digitalocean_driver.rb| 51 +-
server/lib/deltacloud/models/base_model.rb | 2 +
server/lib/deltacloud/models/key.rb|
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/volume_images.rb | 3 +-
server/lib/cimi/models.rb | 1 +
server/lib/cimi/models/volume_image.rb| 25 +-
server/lib/cimi/models/volume_image_create.rb | 47 ++
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/volume_templates.rb | 6 ++---
server/lib/cimi/models.rb| 3 ++-
server/lib/cimi/models/volume_template.rb| 25 +-
server/lib/cimi/models/volume_template_create.r
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/db/volume_template.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/db/volume_template.rb b/server/lib/db/volume_template.rb
index da7d4f7..7f54c33 100644
--- a/server/lib/db/volume_template.rb
+++
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/volumes.rb | 3 +-
server/lib/cimi/models.rb | 3 +-
server/lib/cimi/models/volume.rb | 40 -
server/lib/cimi/models/volume_configuration.rb | 3 +-
se
From: Michal Fojtik
The ref_id(url) will extract the last segment of the
URL and return it as an 'id'.
FIXME: We should use ctx to return the ID of resource properly.
Signed-off-by: Michal fojtik
---
server/lib/cimi/models/base.rb | 4
1 file changed, 4 insertions(+)
diff --git a/server
From: Michal Fojtik
Under latest MRI 1.9.3 the 'opts[:class]' is not visible
to 'find' method and it is reported as 'method missing'
With 'class.superclass' we get access to the original class
we used to create Ref.
Signed-off-by: Michal fojtik
---
server/lib/cimi/models/schema.rb | 8 ++-
From: Michal Fojtik
Since the database is erased, Deltacloud will exit(1)
when started using CIMI frontend. This patch will execute
the migration after mock dir cleanup.
Signed-off-by: Michal fojtik
---
server/Rakefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/Rakefile b/serve
From: Michal Fojtik
Since we now have initializers, we not longer need to load
config.ru to have all stuff initialized.
Signed-off-by: Michal fojtik
---
server/Rakefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/Rakefile b/server/Rakefile
index bcea9a2..da068b
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/deltacloud-core.gemspec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/deltacloud-core.gemspec b/server/deltacloud-core.gemspec
index 292e6e1..a8ecce0 100644
--- a/server/deltacloud-core.gemspec
+++ b/ser
From: Michal Fojtik
This patch introduce new helper that provide mechanism
to load all collection for the given frontend
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections.rb | 36 +--
server/lib/cimi/models/cloud_entry_point.rb| 2 +-
server/lib/de
From: Michal Fojtik
This patch will make sure you don't have two duplicate collections
registred to Rabbit both for DC and CIMI.
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections.rb | 1 +
server/lib/deltacloud/collections.rb | 3 +++
2 files changed, 4 insertions(+)
diff --g
From: Michal Fojtik
The -L/--log option is ignored when you run Deltacloud
in 'daemon' mode (-d). This cause Deltacloud to log into
syslog even user specify the log file location explicately.
Signed-off-by: Michal fojtik
---
server/bin/deltacloudd | 4 +++-
1 file changed, 3 insertions(+), 1 d
Hi,
While fixing the collection loading, I realized that we have a lot
of duplicated code in collection loading for CIMI and Deltacloud.
In rev2 I tried to improve that with shared helper.
Tracker here: http://tracker.deltacloud.org/set/334
-- Michal
From: Michal Fojtik
The -L/--log option is ignored when you run Deltacloud
in 'daemon' mode (-d). This cause Deltacloud to log into
syslog even user specify the log file location explicately.
Signed-off-by: Michal fojtik
---
server/bin/deltacloudd | 4 +++-
1 file changed, 3 insertions(+), 1 d
From: Michal Fojtik
This patch will make sure you don't have two duplicate collections
registred to Rabbit both for DC and CIMI.
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections.rb | 1 +
server/lib/deltacloud/collections.rb | 3 +++
2 files changed, 4 insertions(+)
diff --g
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/deltacloud-core.gemspec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/deltacloud-core.gemspec b/server/deltacloud-core.gemspec
index 292e6e1..a8ecce0 100644
--- a/server/deltacloud-core.gemspec
+++ b/ser
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 ...
- Improved collection filtering filter() metho
From: Michal Fojtik
The 'excon' was updated it 0.17.0 which ultimately breaks
the VCR fixtures we are using (rake test:drivers:google).
Saying that we don't want to update it in gemspec should
fix this issue.
Signed-off-by: Michal fojtik
---
server/deltacloud-core.gemspec | 2 +-
1 file chang
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
-
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
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/
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
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
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'
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
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
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/
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
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
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
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
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
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:
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
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.
For CIMI tests, this will make sure the database directory exists.
Signed-off-by: Michal fojtik
---
server/tests/cimi/coll
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 happen in one place.
Signed-off-by: Michal fojtik
---
server/config.ru | 65 +---
From: Michal Fojtik
This patch will make sure that logs produced by Sequel (SQL logs)
will go to DeltacloudLogger instead of default Ruby Logger.
The reason is that user can set the '-L/--log' option and redirect
all logs into a file. In that case, this patch will make sure
that SQL logs are sav
From: Michal Fojtik
This patch will make our DeltacloudLogger more compatible
wit the default Ruby 'Logger' class.
Signed-off-by: Michal fojtik
---
server/lib/sinatra/rack_logger.rb | 59 +++
1 file changed, 35 insertions(+), 24 deletions(-)
diff --git a/se
Hi,
This patch is something like a 'cleanup' in the way how we initialize
things when Deltacloud server is starting up.
Right now, these things are 'initialized' during server boot:
1. Mock directory is created and populated (this happen in mock driver)
2. Database file and schema is created (db
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/base.rb | 1 +
server/lib/cimi/server.rb | 1 +
server/lib/deltacloud/collections/base.rb | 1 +
server/lib/deltacloud/server.rb | 1 +
4 files changed, 4 insertions(+)
diff --git
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/deltacloud-core.gemspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/deltacloud-core.gemspec b/server/deltacloud-core.gemspec
index 8df1587..d5c6731 100644
--- a/server/deltacloud-core.gemspec
+++ b/serve
From: Michal Fojtik
In case when db/provider model is accessed outside the Deltacloud
server context (CIMI tests, CIMI client, etc...) the
Deltacloud.default_frontend method is not set, because 'deltacloud_rack'
is not required.
This patch will add 'fallback' mode where if you use this model out
Hi,
This patch is an addition to the 1/11 set I sent earlier today
(I don't want to do more spam ;-).
I added more *Create models for some other entities.
Things still pending:
- Network* -> It lack support in Mock driver, so I can't run tests.
- Volume* -> Too complex to just move the create to
From: Michal Fojtik
- AddressCreate
- AddressTemplateCreate
- CredentialCreate
- CredentialTemplateCreate
- MachineImageCreate
- NetworkCreate
As part of this patch, all 'create' operations were moved
to these EntityCreate models.
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/a
From: Michal Fojtik
- Added MachineTemplateCreate action
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/base.rb | 2 +-
server/lib/cimi/models.rb | 3 +-
server/lib/cimi/models/base.rb| 14 ++--
server/lib/cimi/models/ma
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/deltacloud/helpers/deltacloud_helper.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/lib/deltacloud/helpers/deltacloud_helper.rb
b/server/lib/deltacloud/helpers/deltacloud_helper.rb
index 4575ae2
From: Michal Fojtik
In Sinatra helpers have direct access to the 'request' method,
so there is no need to pass any parameter to this helper.
This patch will also report unsupported media type correctly
via Deltacloud exception handler with proper HTTP status code.
Signed-off-by: Michal fojtik
From: Michal Fojtik
Signed-off-by: Michal fojtik
---
server/lib/deltacloud/models/realm.rb | 2 +-
server/views/realms/show.xml.haml | 7 ---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/server/lib/deltacloud/models/realm.rb
b/server/lib/deltacloud/models/realm.rb
in
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_
From: David Lutterkort
Signed-off-by: Michal fojtik
---
server/lib/cimi/collections/machines.rb | 7 +---
server/lib/cimi/models/machine.rb| 69
server/lib/cimi/models/machine_create.rb | 29 ++
3 files changed, 31 insertions(+), 74 deleti
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
From: David Lutterkort
Signed-off-by: Michal fojtik
---
server/lib/cimi/models.rb | 4 +-
server/lib/cimi/models/base.rb | 5 +++
server/lib/cimi/models/machine_template.rb | 6 +--
server/lib/cimi/models/schema.rb | 44
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
From: David Lutterkort
Signed-off-by: Michal fojtik
---
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(+)
cre
Hi,
This patch-bomb is represents merged version of David patches that add
the 'ref' attribute type and my validation patches.
-- Michal
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
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
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
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/
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'
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
1 - 100 of 745 matches
Mail list logo