@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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
CloudStackEntity : represents the base entity. This is a placeholder for
future use. Right now it only implements version info
CloudStackBaseFactory: overloads AbstractFactory to provide custom hooks
for CloudStackEntity creation. The current creators for cloudstack
entities are any api actions that begin as create, deploy or register
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
legacy: all old integration libraries go here
generate: all the code used to autogenerate marvin libraries
docs: documentation
data: data objects representing what were earlier service dictionaries
cmd.id = self.id expression should be included only when id is in the
required arguments of the entity.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Some entities are unrelated to the API. Include the complete API as the
verb to make the relationship to the entitiy clearer
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
All delete APIs have an id field and the entityType the delete is
removing from the system is found here. Include the entity Type for
these in the API discovery service.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
Also include the entity generation in to the codegenerator so single
module can generate both api command objects and the derived entities.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>