rally/tests/deploy/__init__.py
Boris Pavlovic 0089a26a13 Add deploy engine factory
rally.deploy.engine.EngineFactory is base class for every engine.

    All engines should be added to rally.deploy.engines.some_module.py

    Example of usage:

    # Add new engine with __name__ == 'A'
    class A(EngineFactory):
        def __init__(self, config):
            # do something

        def deploy(self):
            # Do deployment and return endpoints of openstack
            return {}   # here should be endpoints

        def cleanup(self):
            # Destory OpenStack deployment and free resource

    Now to use new engine 'A' we should use with statement:

    with EngineFactory.get_engine('A', some_config) as deployment:
        # deployment is returned value of deploy() method
        # do all stuff that you need with your cloud
2013-09-01 16:46:16 +04:00

0 lines
Python