Commit Graph

21276 Commits

Author SHA1 Message Date
Prasanna Santhanam
b78401221d marvin_refactor: include expungeVirtualMachine API to verbs
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:26 +05:30
Prasanna Santhanam
571e091f10 marvin-refactor: update to latest spring dependencies 2013-10-31 13:54:26 +05:30
Prasanna Santhanam
d30fe15d29 marvin_refactor: setup/teardown per test for the vpc lifecycle test
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:26 +05:30
Prasanna Santhanam
aff28f4144 marvin_refactor: remove the entity from passing to the apiserver
entity attributes derived for each API should not be sent to the API
server as it messes with the signature generation.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:26 +05:30
Prasanna Santhanam
f00fafe43c marvin_refactor: simple vpc lifecycle test
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:26 +05:30
Prasanna Santhanam
b978188446 marvin_refactor: hiding SubFactory attributes
attributes generated from subfactory calls need to be hidden from the
subsequent factory calls as these attributes are not part of the default
factory

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:26 +05:30
Prasanna Santhanam
26b4025761 marvin_refactor: prepending marvin. to all logs
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:26 +05:30
Prasanna Santhanam
8cd58a7bee marvin_refactor: add more util functions from legacy
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:26 +05:30
Prasanna Santhanam
50aa256699 marvin_refactor: pep8 all python files
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:26 +05:30
Prasanna Santhanam
b006c993f3 marvin_refactor: exception handle for non-standard libraries
non-standard python libraries that are not installed by default on
python installations need to be exception handled appropriately

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:25 +05:30
Prasanna Santhanam
f1eb72359e marvin_refactor: docs for design and internals 2013-10-31 13:54:25 +05:30
Prasanna Santhanam
c4f9855668 marvin_refactor: CLOUDSTACK-4591 - switch to unittest2
Switch marvin to unittest2 so as to support multiple python versions

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:25 +05:30
Prasanna Santhanam
425043684d marvin_refactor: additional verbs modify and disocciate
modify -> modifyPool
dissociate -> dissociateLun

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:25 +05:30
Prasanna Santhanam
939c4d2efc marvin_refactor: improve unittests for additional data factoreis
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:25 +05:30
Prasanna Santhanam
2bb1533a8e marvin_refactor: security group splits into ingress/egress
@also Include the apiclient as part of the factory instantiation so
there is not redundant parameter when dealing with the object after it
is generated by the factory.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:25 +05:30
Prasanna Santhanam
ec09163ffd marvin_refactor: additional factories for entities
staticnat, vpc, vpcoffering, networkoffering, etc

All classes within factories don't include the redundant *Factory in
their naming.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:25 +05:30
Prasanna Santhanam
8decacb34b marvin_refactor: always check for complete object identity with json
Remove check which ensured single key match for the json result with the
object response. This would return ipaddressResponse.ipaddress as a
nested object whereas the response itself is the ipaddress

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:25 +05:30
Prasanna Santhanam
904a2bde0a marvin_refactor: New firewall rule test
Firewall entities were mixed up with multiple __init__'s. This is now
resolved by ensuring only one creator exists per enitity. Only entities
affected by this are template, sshkeypair and firewall.

Introduced a new utils module for utitlity functions. Deprecate the old
utils in legacy package.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:25 +05:30
Prasanna Santhanam
70a9d3eb57 marvin_refactor: allow the nose plugin to load
include deployer module in the packaging and correct cloudstackAPI
import to use absolute imports

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:24 +05:30
Prasanna Santhanam
ef0b08e21a marvin_refactor: initial commit for dsl implementation
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:24 +05:30
Prasanna Santhanam
73102758b5 marvin_refactor: include an example with should-dsl
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:24 +05:30
Prasanna Santhanam
dad9ce211a marvin_refactor: changes to legacy's imports 2013-10-31 13:54:24 +05:30
Prasanna Santhanam
8a816e5d19 marvin_refactor: update the object during non-create transforms
When an entity is updated/ the object attributes should be updated.
Previously we only updated the attributes when creating the entity.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:24 +05:30
Prasanna Santhanam
0fdc4e25bc marvin_refactor: data for networkoffering
use the random_gen for the name /displaytext of the offering

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:24 +05:30
Prasanna Santhanam
4268f24aca marvin_refactor: include apiclient as part of factory
The apiclient is required for creation of any factory and should be the
in the FACTORY_ARGS list. This is useful for post_generation hooks to
call other methods on the resulting object. For eg: A network creation
triggers a networkoffering creation and so the enabling of the
networkoffering.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:24 +05:30
Prasanna Santhanam
422c7b08c6 marvin_refactor: PostGenerationMethodCall doesn't work in create strategy
For performing post-generation hooks after the generation during the
create strategy of a factory we need to use the post_generation hook
instead of a PostGenerationMethodCall. Also, the `apiclient` attribute
does not get passed to the postgenerator unless specified in the
kwargs using the extended args notation (ATTR__ARGS)

Also Correct the network creation test

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:24 +05:30
Prasanna Santhanam
4ea9a2c402 marvin_refactor: fix imports for local deployer modules
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:23 +05:30
Prasanna Santhanam
73193eca28 marvin_refactor: remove the newly generated sources
- in factory and entity
- MUST NOT remove factory.data

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:23 +05:30
Prasanna Santhanam
62edcefe98 marvin_refactor: fix marvin build and code generation
- generate code using generate/ module but triggered from basedir/marvin
- fix the pom to be the same as before, use codegenerator
- fix simulator build by removing ConfigDepot bean already injected as
  part of applicationContext.xml

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:23 +05:30
Prasanna Santhanam
412c34ed83 marvin_refactor: Fix marvin build and maven pom
- maven pom pointer codegenerator->xmltoapi
- regression in apidocxmlwriter fixed NPE
- fixed imports in generate module
2013-10-31 13:54:23 +05:30
Prasanna Santhanam
bc7f9165c9 marvin_refactor: UnitTests for NetworkFactory
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:23 +05:30
Prasanna Santhanam
0678ce7f9f marvin_refactor: remove redundant examples from sandbox
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:23 +05:30
Prasanna Santhanam
c632fadee5 marvin_refactor: network data factory
network can create isolated guest and shared guest networks. the network
object will inturn use the default networkofferings which are
auto-enabeld by their postgenerators

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:23 +05:30
Prasanna Santhanam
6dc259ea88 marvin_refactor: correcting references to random_gen
random_gen moves to marvin.legacy.utils from marvin.utils

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:23 +05:30
Prasanna Santhanam
b437ae984a marvin_refactor: generation of code is in the generate module
CloudStack's API DSL is converted into marvin's modules using the
generate module.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:22 +05:30
Prasanna Santhanam
44b3edcf75 marvin-refactor: move the deployment helpers to deployer module
deployer module will contain all the helper modules used for json
description of data center and will also feature the export module for
exporting a datacenter in to json

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:22 +05:30
Prasanna Santhanam
fac014d295 marvin-refactor: moving old integration libraries to legacy 2013-10-31 13:54:22 +05:30
Prasanna Santhanam
b8fc99f1c5 marvin_refactor: docs updates
- fix the xml/json compilation
- need ability to send in identifiers for cloud resources

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:22 +05:30
Prasanna Santhanam
8cb437110e marvin_refactor: getText() reveals the actual value
otherwise required is always not None and always True

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:21 +05:30
Prasanna Santhanam
cdb6754323 marvin_refactor: some project cleanup. 2013-10-31 13:54:21 +05:30
Prasanna Santhanam
8b65ce9a95 marvin_refactor: include markdown docs 2013-10-31 13:54:21 +05:30
Prasanna Santhanam
526a9d6043 marvin_refactor: Some renames to organize data and entities
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:21 +05:30
Prasanna Santhanam
6a260ce355 marvin_refactor: use percached commands.xml for api generation
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:21 +05:30
Prasanna Santhanam
02b35367a0 marvin_refactor: cloudConnection is CloudConnection
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:21 +05:30
Prasanna Santhanam
e0e29d7d37 marvin_refactor: multiple fixes to entity gen.
1. extend the namespace using execfile for getting cmdlets. Don't expect
existing marvin installations
2. additional entity adjustments for registerUserkeys and template
related APIs
3. optional **kwargs are explained in docstring

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:21 +05:30
Prasanna Santhanam
4ae4f0df4c marvin_refactor: move OptionParser to ArgumentParser
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:21 +05:30
Prasanna Santhanam
4d3865808d marvin_refactor: skip jobStatus and jobId when determining mirror objects
When comparing json response against the response object disregard the
jobstatus and jobid returned as part of object response. These are some
quirks in the API response added previously that we are unable to
remove.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:20 +05:30
Prasanna Santhanam
5fab4fd3a2 marvin_refactor: additional packages for marvin
should-dsl and inflect for cleaner assertions and for entity code
generation.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:20 +05:30
Prasanna Santhanam
e6ed427426 marvin_refactor: move apidoc artifact to marvin dir for precache api list
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-10-31 13:54:20 +05:30
Prasanna Santhanam
9888bb2561 marvin_refactor: remove all the code that is auto-generated
All factories and base modules are auto-generated by the
entity_generator
2013-10-31 13:54:20 +05:30