deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 1/2] CIMI: Added :created property to Machine entity and fixed pluralization for MachineAdmin
Date Mon, 05 Dec 2011 14:11:39 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/cimi/model/machine.rb                  |    1 +
 server/lib/cimi/model/machine_admin_collection.rb |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/lib/cimi/model/machine.rb b/server/lib/cimi/model/machine.rb
index cff2dd5..4aef558 100644
--- a/server/lib/cimi/model/machine.rb
+++ b/server/lib/cimi/model/machine.rb
@@ -106,6 +106,7 @@ class CIMI::Model::Machine < CIMI::Model::Base
     self.new(
       :name => instance.id,
       :description => instance.name,
+      :created => Time.now,
       :uri => context.machine_url(instance.id),
       :state => convert_instance_state(instance.state),
       :cpu => convert_instance_cpu(instance.instance_profile, context),
diff --git a/server/lib/cimi/model/machine_admin_collection.rb b/server/lib/cimi/model/machine_admin_collection.rb
index a2ebbd8..b5f5e49 100644
--- a/server/lib/cimi/model/machine_admin_collection.rb
+++ b/server/lib/cimi/model/machine_admin_collection.rb
@@ -15,9 +15,9 @@
 
 class CIMI::Model::MachineAdminCollection < CIMI::Model::Base
 
-  act_as_root_entity :machine_admins
+  act_as_root_entity :machine_admin
 
-  array :machine_admin do
+  array :machine_admins do
     scalar :href
   end
 
-- 
1.7.4.4


Mime
View raw message