cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [46/49] git commit: updated refs/heads/marvin_refactor to 0b5fe9a
Date Sun, 21 Apr 2013 17:03:57 GMT
AccountFactory doesn't need hashing

SHA encryption is applied by the server


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

Branch: refs/heads/marvin_refactor
Commit: f4006bf35080c3da58529a8248f91bf741270b37
Parents: 447d51d
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Sun Apr 21 22:30:19 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Sun Apr 21 22:30:19 2013 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/factory/AccountFactory.py      |   10 +++-------
 tools/marvin/marvin/factory/TemplateFactory.py     |    2 +-
 .../marvin/marvin/factory/VirtualMachineFactory.py |    6 +++---
 tools/marvin/marvin/factory/ZoneFactory.py         |    2 +-
 tools/marvin/marvin/factory/test/testFactories.py  |   14 ++++++++------
 5 files changed, 16 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4006bf3/tools/marvin/marvin/factory/AccountFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/factory/AccountFactory.py b/tools/marvin/marvin/factory/AccountFactory.py
index 5b97332..3c07683 100644
--- a/tools/marvin/marvin/factory/AccountFactory.py
+++ b/tools/marvin/marvin/factory/AccountFactory.py
@@ -15,8 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
-import hashlib
-from marvin.factory.CloudStackBaseFactory import *
+import factory
+from marvin.factory.CloudStackBaseFactory import CloudStackBaseFactory
 from marvin.base import Account
 from marvin.utils import random_gen
 
@@ -30,11 +30,7 @@ class AccountFactory(CloudStackBaseFactory):
     lastname = factory.Sequence(lambda n: random_gen())
     email = factory.LazyAttribute(lambda e: '{0}.{1}@cloudstack.org'.format(e.firstname,
e.lastname).lower())
     username = factory.Sequence(lambda n: random_gen())
-
-    # Password Encoding
-    mdf = hashlib.md5()
-    mdf.update('password')
-    password = mdf.hexdigest()
+    password = 'password'
 
 
 class AdminAccountFactory(AccountFactory):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4006bf3/tools/marvin/marvin/factory/TemplateFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/factory/TemplateFactory.py b/tools/marvin/marvin/factory/TemplateFactory.py
index 85c383f..6d71277 100644
--- a/tools/marvin/marvin/factory/TemplateFactory.py
+++ b/tools/marvin/marvin/factory/TemplateFactory.py
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 from marvin.base import Template
-from marvin.factory import CloudStackBaseFactory
+from marvin.factory.CloudStackBaseFactory import CloudStackBaseFactory
 
 class TemplateFactory(CloudStackBaseFactory):
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4006bf3/tools/marvin/marvin/factory/VirtualMachineFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/factory/VirtualMachineFactory.py b/tools/marvin/marvin/factory/VirtualMachineFactory.py
index 4d8a4d6..6c6e44e 100644
--- a/tools/marvin/marvin/factory/VirtualMachineFactory.py
+++ b/tools/marvin/marvin/factory/VirtualMachineFactory.py
@@ -15,12 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-from marvin.base import VirtualMachine
-from marvin.factory import CloudStackBaseFactory
+from marvin.base.VirtualMachine import VirtualMachine
+from marvin.factory.CloudStackBaseFactory import CloudStackBaseFactory
 
 class VirtualMachineFactory(CloudStackBaseFactory):
 
-    FACTORY_FOR = VirtualMachine.VirtualMachine
+    FACTORY_FOR = VirtualMachine
 
     serviceofferingid = None
     templateid = None

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4006bf3/tools/marvin/marvin/factory/ZoneFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/factory/ZoneFactory.py b/tools/marvin/marvin/factory/ZoneFactory.py
index bc0f6a5..41221c8 100644
--- a/tools/marvin/marvin/factory/ZoneFactory.py
+++ b/tools/marvin/marvin/factory/ZoneFactory.py
@@ -21,7 +21,7 @@ from marvin.utils import random_gen
 
 class ZoneFactory(CloudStackBaseFactory):
 
-    FACTORY_FOR = Zone
+    FACTORY_FOR = Zone.Zone
 
     dns1 = "8.8.8.8"
     internaldns1 = "8.8.8.8"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4006bf3/tools/marvin/marvin/factory/test/testFactories.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/factory/test/testFactories.py b/tools/marvin/marvin/factory/test/testFactories.py
index 4e8a606..81bcca6 100644
--- a/tools/marvin/marvin/factory/test/testFactories.py
+++ b/tools/marvin/marvin/factory/test/testFactories.py
@@ -17,22 +17,24 @@
 
 import unittest
 import logging
+
 from marvin.cloudstackTestClient import cloudstackTestClient
-from marvin.base import Account, Zone, Template, User
 
 from marvin.factory.AccountFactory import *
-
 from marvin.factory.ServiceOfferingFactory import *
-
 from marvin.factory.NetworkOfferingFactory import *
-
 from marvin.factory.TemplateFactory import *
-
 from marvin.factory.VirtualMachineFactory import *
-
 from marvin.factory.UserFactory import *
 
 
+from marvin.base.Zone import *
+from marvin.base.Account import Account
+from marvin.base.Template import Template
+
+
+
+
 class BuildVsCreateStrategyTest(unittest.TestCase):
     def setUp(self):
         self.apiClient = cloudstackTestClient(mgtSvr='localhost', logging=logging.getLogger('factories.cloudstack')).getApiClient()


Mime
View raw message