You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/10/02 18:41:59 UTC

[29/50] [abbrv] git commit: updated refs/heads/marvin-refactor to bbaf354

marvin_refactor: update the object during non-create transforms

When an entity is updated/ the object attributes should be updated.
Previously we only updated the attributes when creating the entity.

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5eebce19
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5eebce19
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5eebce19

Branch: refs/heads/marvin-refactor
Commit: 5eebce194d2c77d09c0e8c4a3885f6d4217bf614
Parents: 5055acd
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Fri Sep 13 15:57:05 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Oct 2 20:27:48 2013 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/generate/entity.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5eebce19/tools/marvin/marvin/generate/entity.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/generate/entity.py b/tools/marvin/marvin/generate/entity.py
index dc96a14..b9f825b 100644
--- a/tools/marvin/marvin/generate/entity.py
+++ b/tools/marvin/marvin/generate/entity.py
@@ -90,7 +90,7 @@ class Entity(object):
                                   'if %s and len(%s) > 0 else None' % (
                                   entity, entity.lower(), entity.lower(), entity.lower()))
                 else:
-                    m.body.append(self.tabspace + 'return %s if %s else None' % (entity.lower(), entity.lower()))
+                    m.body.append(self.tabspace + 'return self.__update__(%s.__dict__) if %s else None' % (entity.lower(), entity.lower()))
             else:
                 if len(details['args']) > 0: #has required arguments
                     m.signature = 'def __init__(self, apiclient=None, %s, factory=None, **kwargs):' % (