cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [5/5] git commit: updated refs/heads/master to f0749ce
Date Mon, 06 May 2013 09:26:50 GMT
CLOUDSTACK-2323: fix test scripts to conform with library changes

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/f0749ce6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f0749ce6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f0749ce6

Branch: refs/heads/master
Commit: f0749ce62552bdd9c92b371d7c34e2c9bb5a8a28
Parents: 70c936bb
Author: Talluri <Srikanteswararao.Talluri@citrix.com>
Authored: Fri May 3 23:11:56 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Mon May 6 14:55:58 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_accounts.py        |   94 +++---
 test/integration/component/test_blocker_bugs.py    |   88 +++---
 test/integration/component/test_egress_rules.py    |  198 +++++++-------
 test/integration/component/test_eip_elb.py         |  122 ++++----
 .../integration/component/test_network_offering.py |  218 +++++++-------
 test/integration/component/test_project_configs.py |   36 ++--
 test/integration/component/test_project_limits.py  |   18 +-
 .../component/test_project_resources.py            |   58 ++--
 test/integration/component/test_project_usage.py   |   58 ++--
 test/integration/component/test_projects.py        |   34 ++--
 test/integration/component/test_resource_limits.py |   96 ++++----
 test/integration/component/test_routers.py         |  118 ++++----
 test/integration/component/test_security_groups.py |  206 +++++++-------
 test/integration/component/test_snapshots.py       |   92 +++---
 test/integration/component/test_storage_motion.py  |    4 +-
 test/integration/component/test_templates.py       |   44 ++--
 test/integration/component/test_usage.py           |  104 ++++----
 .../integration/component/test_vm_passwdenabled.py |   12 +-
 test/integration/component/test_volumes.py         |   72 +++---
 test/integration/component/test_vpn_users.py       |   48 ++--
 test/integration/smoke/test_iso.py                 |   18 +-
 test/integration/smoke/test_network.py             |  156 +++++-----
 test/integration/smoke/test_nic.py                 |    8 +-
 test/integration/smoke/test_routers.py             |   60 ++--
 test/integration/smoke/test_scale_vm.py            |    4 +-
 test/integration/smoke/test_templates.py           |   36 ++--
 test/integration/smoke/test_volumes.py             |   24 +-
 27 files changed, 1013 insertions(+), 1013 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_accounts.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py
index 459cfb3..fb38e62 100644
--- a/test/integration/component/test_accounts.py
+++ b/test/integration/component/test_accounts.py
@@ -162,11 +162,11 @@ class TestAccounts(cloudstackTestCase):
                             self.apiclient,
                             self.services["account"]
                             )
-        self.debug("Created account: %s" % account.account.name)
+        self.debug("Created account: %s" % account.name)
         self.cleanup.append(account)
         list_accounts_response = list_accounts(
                                                self.apiclient,
-                                               id=account.account.id
+                                               id=account.id
                                                )
         self.assertEqual(
                          isinstance(list_accounts_response, list),
@@ -181,12 +181,12 @@ class TestAccounts(cloudstackTestCase):
 
         account_response = list_accounts_response[0]
         self.assertEqual(
-                            account.account.accounttype,
+                            account.accounttype,
                             account_response.accounttype,
                             "Check Account Type of Created account"
                             )
         self.assertEqual(
-                            account.account.name,
+                            account.name,
                             account_response.name,
                             "Check Account Name of Created account"
                             )
@@ -194,8 +194,8 @@ class TestAccounts(cloudstackTestCase):
         user = User.create(
                             self.apiclient,
                             self.services["user"],
-                            account=account.account.name,
-                            domainid=account.account.domainid
+                            account=account.name,
+                            domainid=account.domainid
                             )
         self.debug("Created user: %s" % user.id)
         list_users_response = list_users(
@@ -301,15 +301,15 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         user_1 = User.create(
                             self.apiclient,
                             self.services["user"],
-                            account=self.account.account.name,
-                            domainid=self.account.account.domainid
+                            account=self.account.name,
+                            domainid=self.account.domainid
                             )
         self.debug("Created user: %s" % user_1.id)
         user_2 = User.create(
                             self.apiclient,
                             self.services["user"],
-                            account=self.account.account.name,
-                            domainid=self.account.account.domainid
+                            account=self.account.name,
+                            domainid=self.account.domainid
                             )
         self.debug("Created user: %s" % user_2.id)
         self.cleanup.append(user_2)
@@ -317,12 +317,12 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         vm_1 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
-                                  domainid=self.account.account.domainid,
+                                  accountid=self.account.name,
+                                  domainid=self.account.domainid,
                                   serviceofferingid=self.service_offering.id
                                   )
         self.debug("Deployed VM in account: %s, ID: %s" % (
-                                                           self.account.account.name,
+                                                           self.account.name,
                                                            vm_1.id
                                                            ))
         self.cleanup.append(vm_1)
@@ -330,12 +330,12 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         vm_2 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
-                                  domainid=self.account.account.domainid,
+                                  accountid=self.account.name,
+                                  domainid=self.account.domainid,
                                   serviceofferingid=self.service_offering.id
                                   )
         self.debug("Deployed VM in account: %s, ID: %s" % (
-                                                           self.account.account.name,
+                                                           self.account.name,
                                                            vm_2.id
                                                            ))
         self.cleanup.append(vm_2)
@@ -347,7 +347,7 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         # Account should exist after deleting user
         accounts_response = list_accounts(
                                           self.apiclient,
-                                          id=self.account.account.id
+                                          id=self.account.id
                                         )
         self.assertEqual(
                          isinstance(accounts_response, list),
@@ -362,8 +362,8 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
                             )
         vm_response = list_virtual_machines(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                          isinstance(vm_response, list),
@@ -401,43 +401,43 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         user_1 = User.create(
                             self.apiclient,
                             self.services["user"],
-                            account=self.account.account.name,
-                            domainid=self.account.account.domainid
+                            account=self.account.name,
+                            domainid=self.account.domainid
                             )
         self.debug("Created user: %s" % user_1.id)
         user_2 = User.create(
                             self.apiclient,
                             self.services["user"],
-                            account=self.account.account.name,
-                            domainid=self.account.account.domainid
+                            account=self.account.name,
+                            domainid=self.account.domainid
                             )
         self.debug("Created user: %s" % user_2.id)
         vm_1 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   serviceofferingid=self.service_offering.id
                                   )
         self.debug("Deployed VM in account: %s, ID: %s" % (
-                                                           self.account.account.name,
+                                                           self.account.name,
                                                            vm_1.id
                                                            ))
         vm_2 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   serviceofferingid=self.service_offering.id
                                   )
         self.debug("Deployed VM in account: %s, ID: %s" % (
-                                                           self.account.account.name,
+                                                           self.account.name,
                                                            vm_2.id
                                                            ))
         # Get users associated with an account
         # (Total 3: 2 - Created & 1 default generated while account creation)
         users = list_users(
                           self.apiclient,
-                          account=self.account.account.name,
-                          domainid=self.account.account.domainid
+                          account=self.account.name,
+                          domainid=self.account.domainid
                           )
         self.assertEqual(
                          isinstance(users, list),
@@ -468,7 +468,7 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         # Account is removed after last user is deleted
         account_response = list_accounts(
                                          self.apiclient,
-                                         id=self.account.account.id
+                                         id=self.account.id
                                          )
         self.assertEqual(
                             account_response,
@@ -478,8 +478,8 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         # All VMs associated with account are removed.
         vm_response = list_virtual_machines(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             vm_response,
@@ -490,8 +490,8 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         with self.assertRaises(Exception):
             list_routers(
                           self.apiclient,
-                          account=self.account.account.name,
-                          domainid=self.account.account.domainid
+                          account=self.account.name,
+                          domainid=self.account.domainid
                         )
         return
 
@@ -1217,11 +1217,11 @@ class TestUserDetails(cloudstackTestCase):
         # Fetching the user details of account
         self.debug(
                    "Fetching user details for account: %s" %
-                                            self.account.account.name)
+                                            self.account.name)
         users = User.list(
                           self.apiclient,
-                          account=self.account.account.name,
-                          domainid=self.account.account.domainid
+                          account=self.account.name,
+                          domainid=self.account.domainid
                           )
         self.assertEqual(
                          isinstance(users, list),
@@ -1304,11 +1304,11 @@ class TestUserDetails(cloudstackTestCase):
         # Fetching the user details of account
         self.debug(
                    "Fetching user details for account: %s" %
-                                            self.account.account.name)
+                                            self.account.name)
         users = User.list(
                           self.apiclient,
-                          account=self.account.account.name,
-                          domainid=self.account.account.domainid
+                          account=self.account.name,
+                          domainid=self.account.domainid
                           )
         self.assertEqual(
                          isinstance(users, list),
@@ -1391,11 +1391,11 @@ class TestUserDetails(cloudstackTestCase):
         # Fetching the user details of account
         self.debug(
                    "Fetching user details for account: %s" %
-                                            self.account.account.name)
+                                            self.account.name)
         users = User.list(
                           self.apiclient,
-                          account=self.account.account.name,
-                          domainid=self.account.account.domainid
+                          account=self.account.name,
+                          domainid=self.account.domainid
                           )
         self.assertEqual(
                          isinstance(users, list),
@@ -1515,7 +1515,7 @@ class TestUserLogin(cloudstackTestCase):
         self.debug("Logging into the cloudstack with login API")
         respose = User.login(
                              self.apiclient,
-                             username=self.account.account.name,
+                             username=self.account.name,
                              password=self.services["account"]["password"]
                              )
         self.assertEqual(respose, None, "Login response should not be none")
@@ -1572,8 +1572,8 @@ class TestUserLogin(cloudstackTestCase):
 
         accounts = Account.list(
                                 self.apiclient,
-                                name=self.account.account.name,
-                                domainid=self.account.account.domainid,
+                                name=self.account.name,
+                                domainid=self.account.domainid,
                                 listall=True
                                 )
 
@@ -1586,7 +1586,7 @@ class TestUserLogin(cloudstackTestCase):
         self.debug("Logging into the cloudstack with login API")
         respose = User.login(
                              self.apiclient,
-                             username=self.account.account.name,
+                             username=self.account.name,
                              password=self.services["account"]["password"]
                              )
         self.assertEqual(respose, None, "Login response should not be none")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_blocker_bugs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_blocker_bugs.py b/test/integration/component/test_blocker_bugs.py
index bfd1c13..a6ea25a 100644
--- a/test/integration/component/test_blocker_bugs.py
+++ b/test/integration/component/test_blocker_bugs.py
@@ -136,7 +136,7 @@ class TestSnapshots(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -146,8 +146,8 @@ class TestSnapshots(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["virtual_machine"],
                                 templateid=cls.template.id,
-                                accountid=cls.account.account.name,
-                                domainid=cls.account.account.domainid,
+                                accountid=cls.account.name,
+                                domainid=cls.account.domainid,
                                 serviceofferingid=cls.service_offering.id,
                                 mode=cls.services["mode"]
                                 )
@@ -204,8 +204,8 @@ class TestSnapshots(cloudstackTestCase):
                                self.apiclient,
                                self.services["volume"],
                                zoneid=self.zone.id,
-                               account=self.account.account.name,
-                               domainid=self.account.account.domainid,
+                               account=self.account.name,
+                               domainid=self.account.domainid,
                                diskofferingid=self.disk_offering.id
                                )
         self.debug("Created volume with ID: %s" % volume.id)
@@ -283,8 +283,8 @@ class TestSnapshots(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    volume_response.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
         self.debug("Created snapshot: %s" % snapshot.id)
         #Create volume from snapshot
@@ -292,8 +292,8 @@ class TestSnapshots(cloudstackTestCase):
                                         self.apiclient,
                                         snapshot.id,
                                         self.services["volume"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.debug("Created Volume: %s from Snapshot: %s" % (
                                             volume_from_snapshot.id,
@@ -323,12 +323,12 @@ class TestSnapshots(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["virtual_machine"],
                                     templateid=self.template.id,
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     mode=self.services["mode"]
                                 )
-        self.debug("Deployed new VM for account: %s" % self.account.account.name)
+        self.debug("Deployed new VM for account: %s" % self.account.name)
         self.cleanup.append(new_virtual_machine)
 
         self.debug("Attaching volume: %s to VM: %s" % (
@@ -434,7 +434,7 @@ class TestTemplate(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls._cleanup = [
                         cls.account,
@@ -471,8 +471,8 @@ class TestTemplate(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["templates"],
                                     zoneid=self.zone.id,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.debug("Registering template with ID: %s" % template.id)
         try:
@@ -519,8 +519,8 @@ class TestTemplate(cloudstackTestCase):
                                  self.apiclient,
                                  self.services["virtual_machine"],
                                  templateid=template.id,
-                                 accountid=self.account.account.name,
-                                 domainid=self.account.account.domainid,
+                                 accountid=self.account.name,
+                                 domainid=self.account.domainid,
                                  serviceofferingid=self.service_offering.id,
                                  )
         self.debug("Deployed VM with ID: %s " % virtual_machine.id)
@@ -565,15 +565,15 @@ class TestNATRules(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id
                                 )
         cls.public_ip = PublicIPAddress.create(
                                     cls.api_client,
-                                    accountid=cls.account.account.name,
+                                    accountid=cls.account.name,
                                     zoneid=cls.zone.id,
-                                    domainid=cls.account.account.domainid,
+                                    domainid=cls.account.domainid,
                                     services=cls.services["virtual_machine"]
                                     )
         cls._cleanup = [
@@ -817,23 +817,23 @@ class TestRouters(cloudstackTestCase):
         vm_1 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.admin_account.account.name,
-                                  domainid=self.admin_account.account.domainid,
+                                  accountid=self.admin_account.name,
+                                  domainid=self.admin_account.domainid,
                                   serviceofferingid=self.service_offering.id
                                   )
         self.debug("Deployed VM with ID: %s" % vm_1.id)
         vm_2 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.user_account.account.name,
-                                  domainid=self.user_account.account.domainid,
+                                  accountid=self.user_account.name,
+                                  domainid=self.user_account.domainid,
                                   serviceofferingid=self.service_offering.id
                                   )
         self.debug("Deployed VM with ID: %s" % vm_2.id)
         routers = list_routers(
                                self.apiclient,
-                               account=self.admin_account.account.name,
-                               domainid=self.admin_account.account.domainid,
+                               account=self.admin_account.name,
+                               domainid=self.admin_account.domainid,
                                )
         self.assertEqual(
                             isinstance(routers, list),
@@ -887,8 +887,8 @@ class TestRouterRestart(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id
                                     )
         cls.cleanup = [
@@ -927,8 +927,8 @@ class TestRouterRestart(cloudstackTestCase):
         # Find router associated with user account
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -945,8 +945,8 @@ class TestRouterRestart(cloudstackTestCase):
         while True:
             networks = Network.list(
                                  self.apiclient,
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
             network = networks[0]
             if network.state in ["Implemented", "Setup"]:
@@ -966,8 +966,8 @@ class TestRouterRestart(cloudstackTestCase):
         # Get router details after restart
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -1009,7 +1009,7 @@ class TestTemplates(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]
@@ -1020,8 +1020,8 @@ class TestTemplates(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id,
                                     )
         #Stop virtual machine
@@ -1091,8 +1091,8 @@ class TestTemplates(cloudstackTestCase):
                                    self.apiclient,
                                    self.services["templates"],
                                    self.volume.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                 )
         self.debug("Creating template with ID: %s" % template.id)
         # Volume and Template Size should be same
@@ -1121,8 +1121,8 @@ class TestTemplates(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    self.volume.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
         self.debug("Created snapshot with ID: %s" % snapshot.id)
         snapshots = Snapshot.list(
@@ -1203,8 +1203,8 @@ class TestTemplates(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    self.volume.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
         self.debug("Created snapshot with ID: %s" % snapshot.id)
         snapshots = Snapshot.list(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_egress_rules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py
index 7972aa5..4af6eee 100644
--- a/test/integration/component/test_egress_rules.py
+++ b/test/integration/component/test_egress_rules.py
@@ -175,7 +175,7 @@ class TestDefaultSecurityGroupEgress(cloudstackTestCase):
                             admin=True,
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls._cleanup = [
                         cls.account,
@@ -208,12 +208,12 @@ class TestDefaultSecurityGroupEgress(cloudstackTestCase):
         # 4. listVirtualMachines should show that the VM belongs to default
         #    security group
 
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id
                                 )
         self.debug("Deployed VM with ID: %s" % self.virtual_machine.id)
@@ -260,8 +260,8 @@ class TestDefaultSecurityGroupEgress(cloudstackTestCase):
         # Verify listSecurity groups response
         security_groups = SecurityGroup.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                          isinstance(security_groups, list),
@@ -333,7 +333,7 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -371,15 +371,15 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -396,8 +396,8 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
         ingress_rule = security_group.authorize(
                                 self.apiclient,
                                 self.services["security_group"],
-                                account=self.account.account.name,
-                                domainid=self.account.account.domainid
+                                account=self.account.name,
+                                domainid=self.account.domainid
                                 )
         self.assertEqual(
                           isinstance(ingress_rule, dict),
@@ -410,12 +410,12 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
         # Should be able to SSH VM
         try:
             self.debug("SSH into VM: %s" % self.virtual_machine.ssh_ip)
@@ -491,7 +491,7 @@ class TestDefaultGroupEgress(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -529,16 +529,16 @@ class TestDefaultGroupEgress(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -557,8 +557,8 @@ class TestDefaultGroupEgress(cloudstackTestCase):
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -575,8 +575,8 @@ class TestDefaultGroupEgress(cloudstackTestCase):
         egress_rule = security_group.authorizeEgress(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -589,12 +589,12 @@ class TestDefaultGroupEgress(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Should be able to SSH VM
         try:
@@ -692,7 +692,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -730,16 +730,16 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -758,8 +758,8 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -773,12 +773,12 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Authorize Security group to SSH to VM
         self.debug(
@@ -787,8 +787,8 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase):
         egress_rule = security_group.authorizeEgress(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -875,7 +875,7 @@ class TestRevokeEgressRule(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -915,16 +915,16 @@ class TestRevokeEgressRule(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -944,8 +944,8 @@ class TestRevokeEgressRule(cloudstackTestCase):
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -963,8 +963,8 @@ class TestRevokeEgressRule(cloudstackTestCase):
         egress_rule = security_group.authorizeEgress(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -977,12 +977,12 @@ class TestRevokeEgressRule(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Should be able to SSH VM
         try:
@@ -1033,7 +1033,7 @@ class TestRevokeEgressRule(cloudstackTestCase):
             "Revoke Egress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
 
         result = security_group.revokeEgress(
@@ -1137,7 +1137,7 @@ class TestInvalidAccountAuthroize(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -1173,16 +1173,16 @@ class TestInvalidAccountAuthroize(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -1205,7 +1205,7 @@ class TestInvalidAccountAuthroize(cloudstackTestCase):
                                         self.apiclient,
                                         self.services["security_group"],
                                         account=random_gen(),
-                                        domainid=self.account.account.domainid
+                                        domainid=self.account.domainid
                                         )
         return
 
@@ -1804,7 +1804,7 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -1842,16 +1842,16 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -1871,8 +1871,8 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -1886,12 +1886,12 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Authorize Security group to SSH to VM
         self.debug(
@@ -1900,8 +1900,8 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
         egress_rule = security_group.authorizeEgress(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -2016,7 +2016,7 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -2054,16 +2054,16 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -2085,8 +2085,8 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
             egress_rule = security_group.authorizeEgress(
                                     self.apiclient,
                                     self.services["sg_invalid_port"],
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.debug(
             "Authorizing egress rule for sec group ID: %s with invalid cidr"
@@ -2095,8 +2095,8 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
             egress_rule = security_group.authorizeEgress(
                                     self.apiclient,
                                     self.services["sg_invalid_cidr"],
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.debug(
             "Authorizing egress rule for sec group ID: %s with invalid account"
@@ -2106,7 +2106,7 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["security_group"],
                                     account=random_gen(),
-                                    domainid=self.account.account.domainid
+                                    domainid=self.account.domainid
                                     )
         self.debug(
             "Authorizing egress rule for sec group ID: %s with cidr: anywhere and port: 22"
@@ -2114,8 +2114,8 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
         egress_rule_A = security_group.authorizeEgress(
                                     self.apiclient,
                                     self.services["sg_cidr_anywhere"],
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
 
         self.assertEqual(
@@ -2127,8 +2127,8 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
         egress_rule_R = security_group.authorizeEgress(
                                     self.apiclient,
                                     self.services["sg_cidr_restricted"],
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
 
         self.assertEqual(
@@ -2144,8 +2144,8 @@ class TestInvalidParametersForEgress(cloudstackTestCase):
             security_group.authorizeEgress(
                                     self.apiclient,
                                     self.services["sg_cidr_restricted"],
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         return
 
@@ -2203,7 +2203,7 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -2241,16 +2241,16 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                       )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                       )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -2270,8 +2270,8 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase):
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -2289,8 +2289,8 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase):
         egress_rule = security_group.authorizeEgress(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -2303,12 +2303,12 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Should be able to SSH VM
         try:

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_eip_elb.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_eip_elb.py b/test/integration/component/test_eip_elb.py
index c1ad505..cb41859 100644
--- a/test/integration/component/test_eip_elb.py
+++ b/test/integration/component/test_eip_elb.py
@@ -119,8 +119,8 @@ class TestEIP(cloudstackTestCase):
         cls.virtual_machine = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
-                                  domainid=cls.account.account.domainid,
+                                  accountid=cls.account.name,
+                                  domainid=cls.account.domainid,
                                   serviceofferingid=cls.service_offering.id
                                   )
         networks = Network.list(
@@ -140,8 +140,8 @@ class TestEIP(cloudstackTestCase):
                                     cls.api_client,
                                     associatednetworkid=cls.guest_network.id,
                                     isstaticnat=True,
-                                    account=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    account=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     listall=True
                                     )
         if isinstance(ip_addrs, list):
@@ -240,8 +240,8 @@ class TestEIP(cloudstackTestCase):
         # Verify listSecurity groups response
         security_groups = SecurityGroup.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                          isinstance(security_groups, list),
@@ -262,8 +262,8 @@ class TestEIP(cloudstackTestCase):
             "Creating Ingress rule to allow SSH on default security group")
 
         cmd = authorizeSecurityGroupIngress.authorizeSecurityGroupIngressCmd()
-        cmd.domainid = self.account.account.domainid
-        cmd.account = self.account.account.name
+        cmd.domainid = self.account.domainid
+        cmd.account = self.account.name
         cmd.securitygroupid = security_group.id
         cmd.protocol = 'TCP'
         cmd.startport = 22
@@ -370,16 +370,16 @@ class TestEIP(cloudstackTestCase):
 
         public_ip = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
-                                    domainid=self.account.account.domainid,
+                                    domainid=self.account.domainid,
                                     services=self.services["virtual_machine"]
                                     )
         self.debug("IP address: %s is acquired by network: %s" % (
-                                                public_ip.ipaddress.ipaddress,
+                                                public_ip.ipaddress,
                                                 self.guest_network.id))
         self.debug("Enabling static NAT for IP Address: %s" %
-                                                public_ip.ipaddress.ipaddress)
+                                                public_ip.ipaddress)
 
         StaticNATRule.enable(
                              self.apiclient,
@@ -390,11 +390,11 @@ class TestEIP(cloudstackTestCase):
         # Fetch details from user_ip_address table in database
         self.debug(
             "select is_system, one_to_one_nat from user_ip_address where public_ip_address='%s';" \
-                        % public_ip.ipaddress.ipaddress)
+                        % public_ip.ipaddress)
 
         qresultset = self.dbclient.execute(
                         "select is_system, one_to_one_nat from user_ip_address where public_ip_address='%s';" \
-                        % public_ip.ipaddress.ipaddress
+                        % public_ip.ipaddress
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -449,12 +449,12 @@ class TestEIP(cloudstackTestCase):
                 )
 
 #        try:
-#            self.debug("SSH into VM: %s" % public_ip.ipaddress.ipaddress)
+#            self.debug("SSH into VM: %s" % public_ip.ipaddress)
 #            ssh = self.virtual_machine.get_ssh_client(
-#                                    ipaddress=public_ip.ipaddress.ipaddress)
+#                                    ipaddress=public_ip.ipaddress)
 #        except Exception as e:
 #            self.fail("SSH Access failed for %s: %s" % \
-#                      (public_ip.ipaddress.ipaddress, e)
+#                      (public_ip.ipaddress, e)
 #                      )
 
         self.debug("SSH into netscaler: %s" %
@@ -472,7 +472,7 @@ class TestEIP(cloudstackTestCase):
             self.debug("Output: %s" % result)
 
             self.assertEqual(
-                    result.count(public_ip.ipaddress.ipaddress),
+                    result.count(public_ip.ipaddress),
                     1,
                     "One IP from EIP pool should be taken and configured on NS"
                     )
@@ -484,7 +484,7 @@ class TestEIP(cloudstackTestCase):
             self.debug("Output: %s" % result)
 
             self.assertEqual(
-                    result.count("NAME: Cloud-Inat-%s" % public_ip.ipaddress.ipaddress),
+                    result.count("NAME: Cloud-Inat-%s" % public_ip.ipaddress),
                     1,
                     "User source IP should be enabled for INAT service"
                     )
@@ -517,8 +517,8 @@ class TestEIP(cloudstackTestCase):
                                     self.api_client,
                                     associatednetworkid=self.guest_network.id,
                                     isstaticnat=True,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     listall=True
                                     )
         self.assertEqual(
@@ -602,8 +602,8 @@ class TestEIP(cloudstackTestCase):
                                     self.api_client,
                                     associatednetworkid=self.guest_network.id,
                                     isstaticnat=True,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     listall=True
                                     )
         self.assertEqual(
@@ -711,8 +711,8 @@ class TestEIP(cloudstackTestCase):
                                     self.api_client,
                                     associatednetworkid=self.guest_network.id,
                                     isstaticnat=True,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     listall=True
                                     )
         self.assertEqual(
@@ -784,8 +784,8 @@ class TestEIP(cloudstackTestCase):
                                     self.api_client,
                                     associatednetworkid=self.guest_network.id,
                                     isstaticnat=True,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     listall=True
                                     )
         self.assertEqual(
@@ -942,15 +942,15 @@ class TestELB(cloudstackTestCase):
         cls.vm_1 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
-                                  domainid=cls.account.account.domainid,
+                                  accountid=cls.account.name,
+                                  domainid=cls.account.domainid,
                                   serviceofferingid=cls.service_offering.id
                                   )
         cls.vm_2 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
-                                  domainid=cls.account.account.domainid,
+                                  accountid=cls.account.name,
+                                  domainid=cls.account.domainid,
                                   serviceofferingid=cls.service_offering.id
                                   )
         networks = Network.list(
@@ -968,9 +968,9 @@ class TestELB(cloudstackTestCase):
         cls.lb_rule = LoadBalancerRule.create(
                                         cls.api_client,
                                         cls.services["lbrule"],
-                                        accountid=cls.account.account.name,
+                                        accountid=cls.account.name,
                                         networkid=cls.guest_network.id,
-                                        domainid=cls.account.account.domainid
+                                        domainid=cls.account.domainid
                                         )
         cls.lb_rule.assign(cls.api_client, [cls.vm_1, cls.vm_2])
 
@@ -1024,8 +1024,8 @@ class TestELB(cloudstackTestCase):
         # Verify listSecurity groups response
         security_groups = SecurityGroup.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                          isinstance(security_groups, list),
@@ -1046,8 +1046,8 @@ class TestELB(cloudstackTestCase):
             "Creating Ingress rule to allow SSH on default security group")
 
         cmd = authorizeSecurityGroupIngress.authorizeSecurityGroupIngressCmd()
-        cmd.domainid = self.account.account.domainid
-        cmd.account = self.account.account.name
+        cmd.domainid = self.account.domainid
+        cmd.account = self.account.name
         cmd.securitygroupid = security_group.id
         cmd.protocol = 'TCP'
         cmd.startport = 22
@@ -1056,12 +1056,12 @@ class TestELB(cloudstackTestCase):
         self.apiclient.authorizeSecurityGroupIngress(cmd)
 
         self.debug(
-            "Fetching LB IP for account: %s" % self.account.account.name)
+            "Fetching LB IP for account: %s" % self.account.name)
         ip_addrs = PublicIPAddress.list(
                                     self.api_client,
                                     associatednetworkid=self.guest_network.id,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     forloadbalancing=True,
                                     listall=True
                                     )
@@ -1073,7 +1073,7 @@ class TestELB(cloudstackTestCase):
 
         lb_ip = ip_addrs[0]
         self.debug("LB IP generated for account: %s is: %s" % (
-                                            self.account.account.name,
+                                            self.account.name,
                                             lb_ip.ipaddress
                                             ))
 #TODO: uncomment this after ssh issue is resolved
@@ -1199,24 +1199,24 @@ class TestELB(cloudstackTestCase):
 
         public_ip = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
-                                    domainid=self.account.account.domainid,
+                                    domainid=self.account.domainid,
                                     services=self.services["virtual_machine"]
                                     )
         self.debug("IP address: %s is acquired by network: %s" % (
-                                                public_ip.ipaddress.ipaddress,
+                                                public_ip.ipaddress,
                                                 self.guest_network.id))
 
         self.debug("Creating LB rule for public IP: %s" %
-                                            public_ip.ipaddress.ipaddress)
+                                            public_ip.ipaddress)
         lb_rule = LoadBalancerRule.create(
                                         self.apiclient,
                                         self.services["lbrule"],
-                                        accountid=self.account.account.name,
+                                        accountid=self.account.name,
                                         ipaddressid=public_ip.ipaddress.id,
                                         networkid=self.guest_network.id,
-                                        domainid=self.account.account.domaind
+                                        domainid=self.account.domaind
                                         )
         self.debug("Assigning VMs (%s, %s) to LB rule: %s" % (self.vm_1.name,
                                                               self.vm_2.name,
@@ -1225,10 +1225,10 @@ class TestELB(cloudstackTestCase):
 #TODO: workaround : add route in the guest VM for SNIP
 #
 #        self.debug("SSHing into VMs using ELB IP: %s" %
-#                                                public_ip.ipaddress.ipaddress)
+#                                                public_ip.ipaddress)
 #        try:
 #            ssh_1 = self.vm_1.get_ssh_client(
-#                                    ipaddress=public_ip.ipaddress.ipaddress)
+#                                    ipaddress=public_ip.ipaddress)
 #            self.debug("Command: hostname")
 #            result = ssh_1.execute("hostname")
 #            self.debug("Result: %s" % result)
@@ -1244,7 +1244,7 @@ class TestELB(cloudstackTestCase):
 #                          )
 #
 #            ssh_2 = self.vm_2.get_ssh_client(
-#                                    ipaddress=public_ip.ipaddress.ipaddress)
+#                                    ipaddress=public_ip.ipaddress)
 #            self.debug("Command: hostname")
 #            result = ssh_2.execute("hostname")
 #            self.debug("Result: %s" % result)
@@ -1265,11 +1265,11 @@ class TestELB(cloudstackTestCase):
 ##         Fetch details from user_ip_address table in database
         self.debug(
             "select is_system from user_ip_address where public_ip_address='%s';" \
-                                            % public_ip.ipaddress.ipaddress)
+                                            % public_ip.ipaddress)
 
         qresultset = self.dbclient.execute(
                         "select is_system from user_ip_address where public_ip_address='%s';" \
-                        % public_ip.ipaddress.ipaddress)
+                        % public_ip.ipaddress)
 
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -1304,7 +1304,7 @@ class TestELB(cloudstackTestCase):
             self.debug("Output: %s" % result)
 
             self.assertEqual(
-                    result.count(public_ip.ipaddress.ipaddress),
+                    result.count(public_ip.ipaddress),
                     1,
                     "One IP from EIP pool should be taken and configured on NS"
                     )
@@ -1316,7 +1316,7 @@ class TestELB(cloudstackTestCase):
             self.debug("Output: %s" % result)
 
             self.assertEqual(
-                    result.count("Cloud-VirtualServer-%s-22 (%s:22) - TCP" % (public_ip.ipaddress.ipaddress, public_ip.ipaddress.ipaddress)),
+                    result.count("Cloud-VirtualServer-%s-22 (%s:22) - TCP" % (public_ip.ipaddress, public_ip.ipaddress)),
                     1,
                     "User subnet IP should be enabled for LB service"
                     )
@@ -1342,12 +1342,12 @@ class TestELB(cloudstackTestCase):
         #    running and USNIP : ON
 
         self.debug(
-            "Fetching LB IP for account: %s" % self.account.account.name)
+            "Fetching LB IP for account: %s" % self.account.name)
         ip_addrs = PublicIPAddress.list(
                                     self.api_client,
                                     associatednetworkid=self.guest_network.id,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     forloadbalancing=True,
                                     listall=True
                                     )
@@ -1359,7 +1359,7 @@ class TestELB(cloudstackTestCase):
 
         lb_ip = ip_addrs[0]
         self.debug("LB IP generated for account: %s is: %s" % (
-                                            self.account.account.name,
+                                            self.account.name,
                                             lb_ip.ipaddress
                                             ))
 
@@ -1424,11 +1424,11 @@ class TestELB(cloudstackTestCase):
          # Fetch details from account_id table in database
         self.debug(
             "select id from account where account_name='%s';" \
-                                            % self.account.account.name)
+                                            % self.account.name)
 
         qresultset = self.dbclient.execute(
                         "select id from account where account_name='%s';" \
-                                            % self.account.account.name)
+                                            % self.account.name)
 
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -1467,7 +1467,7 @@ class TestELB(cloudstackTestCase):
         public_ip = qresult[0]
 
         self.debug(
-            "Fetching public IP for account: %s" % self.account.account.name)
+            "Fetching public IP for account: %s" % self.account.name)
         ip_addrs = PublicIPAddress.list(
                                     self.api_client,
                                     ipaddress=public_ip,


Mime
View raw message