cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [34/50] [abbrv] git commit: updated refs/heads/marvin_refactor to b784012
Date Mon, 18 Nov 2013 08:50:41 GMT
marvin_refactor: always check for complete object identity with json

Remove check which ensured single key match for the json result with the
object response. This would return ipaddressResponse.ipaddress as a
nested object whereas the response itself is the ipaddress

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


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

Branch: refs/heads/marvin_refactor
Commit: 8decacb34bf49355ed60a5f8fa328cd2a8c5b883
Parents: 904a2bd
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Wed Sep 18 14:31:20 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Thu Oct 31 13:54:25 2013 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/jsonHelper.py          | 4 ----
 tools/marvin/marvin/test/test_factories.py | 6 ++----
 2 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8decacb3/tools/marvin/marvin/jsonHelper.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/jsonHelper.py b/tools/marvin/marvin/jsonHelper.py
index 605e06f..a395e6b 100644
--- a/tools/marvin/marvin/jsonHelper.py
+++ b/tools/marvin/marvin/jsonHelper.py
@@ -113,10 +113,6 @@ def finalizeResultObj(result, responseName, responsecls):
                                              responsecls)
         return result
     elif responsecls is not None:
-        for k, v in result.__dict__.iteritems():
-            if k in responsecls.__dict__:
-                return result
-
         attr = result.__dict__.keys()[0]
 
         value = getattr(result, attr)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8decacb3/tools/marvin/marvin/test/test_factories.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/test/test_factories.py b/tools/marvin/marvin/test/test_factories.py
index 89d67fb..6a09303 100644
--- a/tools/marvin/marvin/test/test_factories.py
+++ b/tools/marvin/marvin/test/test_factories.py
@@ -229,11 +229,9 @@ class IpAddressFactoryTest(unittest.TestCase):
             account=accnt.name,
             domainid=accnt.domainid)
 
-        all_ips = IpAddress.listPublic(apiclient=self.apiClient)
-        firstip = all_ips[0]
         networks = Network.list(apiclient=self.apiClient,
             account = accnt.name, domainid = accnt.domainid)
-        firstip.associate(apiclient=self.apiClient, networkid = networks[0].id)
+        IpAddress(apiclient=self.apiClient, networkid = networks[0].id)
 
 
 class FirewallRuleFactoryTest(unittest.TestCase):
@@ -280,7 +278,7 @@ class FirewallRuleFactoryTest(unittest.TestCase):
 
         fwrule = SshFirewallRuleFactory(
             apiclient=self.apiClient,
-            ipaddressid=ipaddress.ipaddress.id
+            ipaddressid=ipaddress.id
         )
         fwrule |should_not| be(None)
         fwrule |should| be_instance_of(Firewall)


Mime
View raw message