Skip to content

Commit 4faca70

Browse files
author
Prasanna Santhanam
committed
marvin_refactor: create takes factories not reqd args
- Let all entities inherit from CloudStackEntity - create and list are classmethods since they work without need for an entity to exist - create takes only factories by default. no need for long param list. Entitiy.create(apiclient) will give entity out of default factory - Use entityFactory.attributes() to init entities Signed-off-by: Prasanna Santhanam <tsp@apache.org>
1 parent f916031 commit 4faca70

25 files changed

Lines changed: 100 additions & 0 deletions

tools/marvin/marvin/integration/lib/base/AccountFromProject.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class AccountFromProject(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

tools/marvin/marvin/integration/lib/base/AccountToProject.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class AccountToProject(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

tools/marvin/marvin/integration/lib/base/ApiLimit.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
class ApiLimit(CloudStackEntity.CloudStackEntity):
2222

2323

24+
def __init__(self, items):
25+
self.__dict__.update(items)
26+
27+
2428
def __init__(self, items):
2529
self.__dict__.update(items)
2630

tools/marvin/marvin/integration/lib/base/AsyncJobResult.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class AsyncJobResult(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

tools/marvin/marvin/integration/lib/base/CloudIdentifier.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class CloudIdentifier(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

tools/marvin/marvin/integration/lib/base/CustomCertificate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class CustomCertificate(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

tools/marvin/marvin/integration/lib/base/DefaultZoneForAccount.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class DefaultZoneForAccount(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

tools/marvin/marvin/integration/lib/base/FromLoadBalancerRule.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class FromLoadBalancerRule(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

tools/marvin/marvin/integration/lib/base/HostForMaintenance.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class HostForMaintenance(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

tools/marvin/marvin/integration/lib/base/HostMaintenance.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class HostMaintenance(CloudStackEntity.CloudStackEntity):
2121

2222

23+
def __init__(self, items):
24+
self.__dict__.update(items)
25+
26+
2327
def __init__(self, items):
2428
self.__dict__.update(items)
2529

0 commit comments

Comments
 (0)