ACK. Tong Li Emerging Technologies & Standards Building 501/B205 [email protected]
[email protected] wrote on 12/02/2011 08:34:41 AM: > From: [email protected] > To: [email protected] > Date: 12/02/2011 08:34 AM > Subject: [PATCH core 2/4] CIMI: CloudEntryPoint now generate its > schema before create > > From: Michal Fojtik <[email protected]> > > > Signed-off-by: Michal fojtik <[email protected]> > --- > server/lib/cimi/model/base.rb | 3 +++ > server/lib/cimi/model/cloud_entry_point.rb | 1 - > 2 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/server/lib/cimi/model/base.rb b/server/lib/cimi/model/base.rb > index f8ee983..fe12628 100644 > --- a/server/lib/cimi/model/base.rb > +++ b/server/lib/cimi/model/base.rb > @@ -80,6 +80,9 @@ module CIMI::Model > def self.register_as_root_entity!(name) > @root_entities ||= [] > @root_entities << name > + unless CIMI::Model::CloudEntryPoint.href_defined?(name) > + CIMI::Model::CloudEntryPoint.send(:href, name.underscore) > + end > end > > def self.root_entities > diff --git a/server/lib/cimi/model/cloud_entry_point.rb b/server/ > lib/cimi/model/cloud_entry_point.rb > index edbcf0e..62a91b6 100644 > --- a/server/lib/cimi/model/cloud_entry_point.rb > +++ b/server/lib/cimi/model/cloud_entry_point.rb > @@ -17,7 +17,6 @@ class CIMI::Model::CloudEntryPoint < CIMI::Model::Base > > def self.create(context) > root_entities = CIMI::Model.root_entities.inject({}) do |result, entity| > - send(:href, entity.underscore) if not href_defined?(entity) > if context.respond_to? :"#{entity.underscore}_url" > result[entity.underscore] = { :href => context.send(:"# > {entity.underscore}_url") } > end > -- > 1.7.4.4 >
