Marvin deserializes by matching attributes of the response with the
responseObject expected. In case the object's attributes don't mirror
the response Marvin assumes the response is invalid and can't return a
proper first class entity. This makes it difficult for tests to
reference the object's attributes in a sensible way.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
createAccountResponse is now an instance of createAccountResponse and
not just a plain dict.
TODO:
1. nested entities don't work yet.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Build phase will init the bare minimum object required to make the web
request to the mgmt server
Create phase will make the actual request and fill the attributes of the
entity after recieving the response
This allows for one shot creation of the entity using:
EntityFactory.create(apiclient)
over two steps:
factory = EntityFactory()
entity = Entity.create(apiclient, factory)
TODO:
Figure out howto perform related factory creation.
eg: UserFactory.create() inits AccountFactory.create()
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Factories are reqd. for entities that come into existense through the
process of a CLoudStack API create command. Some entities are added from
external sources for which factories are not reqd.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Some entities do not conform to the CRUD format and define extra verbs -
eg: markDefaultNicForVirtualMachine, ldapConfig, ldapRemove etc.
These are refactored and combined into their respective entities.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
For eg:
1. nf = NetworkOffering.create(apiClient, NetworkOfferingFactory())
2. nf.update(apiClient, state='Enabled')
Operation #2 requires that nf's id be supplied to enable the network
offering
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
- 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>
factories will help define default test data for each entity. So a
Account.create(apiclient) returns a default account
VirtualMachine.deploy(apiclient) returns a virtualmachine etc
WIP: only skeletons, no flesh
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
- don't do package import of cloudstackentity
- create() and list() method will return obj(s) of type(Entity)
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
- 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>
factories will help define default test data for each entity. So a
Account.create(apiclient) returns a default account
VirtualMachine.deploy(apiclient) returns a virtualmachine etc
WIP: only skeletons, no flesh
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
The generateBase.py will give out Entity.(create|update|list|delete)
style python modules for use by the integration library.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
enable the marvin plugin when the --with-marvin directive is given to nose. The
enableOpt value is set from the command line directive and self.enabled
(True|False) determines whether marvin's tests will run. By default
non-default plugins like marvin will be disabled"
This fixes regression from 03830c5
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
- Added few common naming conventions
- Cleanedup code
- Added a simple utility function
Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
This will add time taken in seconds along with start and end timestamp
logging facility for test cases.Currently this is not
available for console logs
Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Detail: Previously the cloud user has full password-less sudo access.
This commit changes that to only allow access to a specific list of
commands. Been tested in production on ACS 4.0 and 4.2 mangement servers.
BUG-ID: CLOUDSTACK-967
Bugfix-for:
Reviewed-by:
Reported-by:
Signed-off-by: John Kinsella <jlk@stratosec.co> 1382560936 -0700
There were few unwanted calls as part of test client, did some clean up
Made the test client API uniform to accept both mgmt and dbsvr details
Did some minor bug fixes as well.
Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
This module provides facilitation to use uniform codes across various test
features. Users can import this module and use these codes to maintain
readability and one point of change.
Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
setup/dev/advanced.cfg is used by the simulator deployments that are
usually not https. disabled the http within this config file.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
advanced.cfg: Contains three additional flags "useHttps,certCAPath,certPath"
for https usage in marvin for establishing cs connection. We will use the
configuraiton under advanced.cfg provided by user to establish connection over
https. If establishing the connection over https failed, then the default certs
will be used. or else raise the exception, the existing http will work as it
is when useHttps flag set to "False"
Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
And wondering why they are included here and not in the systemvm.iso.
Also giving the systemvm a little more space to fix the out-of-diskspace error during the build