You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2012/12/14 13:04:51 UTC
[PATCH core 1/4] CIMI: Don't set the 'name' attribute from Collection
From: Michal Fojtik <mf...@redhat.com>
This attribute is not defined in Collection schema,
however we set that to 'default' ;-)
Signed-off-by: Michal fojtik <mf...@redhat.com>
---
server/lib/cimi/models/collection.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/cimi/models/collection.rb b/server/lib/cimi/models/collection.rb
index c7f3b21..2c703e1 100644
--- a/server/lib/cimi/models/collection.rb
+++ b/server/lib/cimi/models/collection.rb
@@ -123,7 +123,7 @@ module CIMI::Model
url = context.send(create)
ops << { :rel => "add", :href => url }
end
- collection_class.new(:id => id, :name => 'default',
+ collection_class.new(:id => id,
:count => entries.size,
:entries => entries,
:operations => ops,
--
1.8.0.2
Re: [PATCH core 1/4] CIMI: Don't set the 'name' attribute from
Collection
Posted by David Lutterkort <lu...@redhat.com>.
On Fri, 2012-12-14 at 13:04 +0100, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mf...@redhat.com>
>
> This attribute is not defined in Collection schema,
> however we set that to 'default' ;-)
>
> Signed-off-by: Michal fojtik <mf...@redhat.com>
> ---
> server/lib/cimi/models/collection.rb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
ACK to series. Pushed.
David
[PATCH core 3/4] CIMI: Removed forgotten 'puts' statement in base
Posted by mf...@redhat.com.
From: Michal Fojtik <mf...@redhat.com>
Signed-off-by: Michal fojtik <mf...@redhat.com>
---
server/lib/cimi/models/base.rb | 1 -
1 file changed, 1 deletion(-)
diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb
index 0708988..9869fea 100644
--- a/server/lib/cimi/models/base.rb
+++ b/server/lib/cimi/models/base.rb
@@ -108,7 +108,6 @@ class CIMI::Model::Resource
clone_base_schema unless base_schema_cloned?
member_name = model.name.split("::").last
if ::Struct.const_defined?("CIMI_#{member_name}")
- puts "Removing struct"
::Struct.send(:remove_const, "CIMI_#{member_name}")
end
member_symbol = member_name.underscore.pluralize.to_sym
--
1.8.0.2
[PATCH core 2/4] CIMI: Initialize attribute_values as OrderedHash
Posted by mf...@redhat.com.
From: Michal Fojtik <mf...@redhat.com>
Signed-off-by: Michal fojtik <mf...@redhat.com>
---
server/lib/cimi/models/base.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb
index 2988459..0708988 100644
--- a/server/lib/cimi/models/base.rb
+++ b/server/lib/cimi/models/base.rb
@@ -181,7 +181,7 @@ class CIMI::Model::Resource
#
def initialize(values = {})
names = self.class.schema.attribute_names
- @attribute_values = names.inject({}) do |hash, name|
+ @attribute_values = names.inject(OrderedHash.new) do |hash, name|
hash[name] = self.class.schema.convert(name, values[name])
hash
end
--
1.8.0.2
[PATCH core 4/4] CIMI: Fix ordering of Collection entries XML elements (DTACLOUD-396)
Posted by mf...@redhat.com.
From: Michal Fojtik <mf...@redhat.com>
Signed-off-by: Michal fojtik <mf...@redhat.com>
---
server/lib/cimi/models/schema.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/lib/cimi/models/schema.rb b/server/lib/cimi/models/schema.rb
index 4e1affb..b86fb08 100644
--- a/server/lib/cimi/models/schema.rb
+++ b/server/lib/cimi/models/schema.rb
@@ -136,7 +136,7 @@ class CIMI::Model::Schema
end
def convert_to_xml(model)
- xml = {}
+ xml = OrderedHash.new
@schema.to_xml(model, xml)
xml
end
--
1.8.0.2