
added: extensions/ extensions/__init__.py quantum/common/extensions.py tests/unit/extension_stubs.py tests/unit/extensions/ tests/unit/extensions/__init__.py tests/unit/extensions/foxinsocks.py tests/unit/test_extensions.py modified: README etc/quantum.conf etc/quantum.conf.sample etc/quantum.conf.test quantum/api/__init__.py quantum/common/flags.py quantum/common/utils.py quantum/common/wsgi.py quantum/db/api.py quantum/db/models.py quantum/manager.py quantum/plugins/SamplePlugin.py tests/__init__.py tests/unit/test_api.py tools/pip-requires pending merges: Deepak N 2011-08-10 [merge] Merged quantum trunk vinkesh banka 2011-08-09 Rajaram/Vinkesh | Added examples of scoping extension alias in request and action extension vinkesh banka 2011-08-05 Deepak/Vinkesh | Fixed show action in extension controller to return 404, added example to include namespace in a request extension vinkesh banka 2011-08-05 [merge] Merged quantum trunk Santhosh Kumar 2011-08-05 Santhosh/Vinkesh | Added extension_stubs file vinkesh banka 2011-08-02 Vinkesh | Changed import orders according to pep8 recommendations Santhosh Kumar 2011-08-01 Vinkesh/Santhosh | Moved the stub classes in test_extensions to a separate file extension_stubs Santhosh Kumar 2011-08-01 [merge] Merged from trunk Santhosh Kumar 2011-07-27 Vinkesh/Santhosh | Removed loading extensions from 'contrib' and fixed an indentation bug while loading extensions Rajaram Mallya 2011-07-26 Santhosh/Rajaram|modified extensions section in README Rajaram Mallya 2011-07-26 Rajaram/Santhosh | Added logging to the PluginAwareExtensionManager failures Rajaram Mallya 2011-07-26 Rajaram/Santhosh|Added plugin interface in foxinsox and Updated README Rajaram Mallya 2011-07-25 Rajaram/Santhosh|quantum manager loads plugin only once, even though both extension middleware and APIRouter calls it Rajaram Mallya 2011-07-25 [merge] Santhosh/Rajaram|latest merge from quantum and made extensions use options to load plugin Rajaram Mallya 2011-07-22 Rajaram/Vinkesh | Plugins advertise which extensions it supports. vinkesh banka 2011-07-20 Vinkesh/Santhosh | Added tests to check the member and collection custom actions of ResourceExtensions Deepak N 2011-07-19 Vinkesh/Deepak | Moved plugin related checks in ExtensionManager code to PluginAwareExtensionManager Deepak N 2011-07-19 Deepak/Vinkesh | Added an base abstract class which can be inherited by PluginInterface class which defines the contract expected by extension. Deepak N 2011-07-19 Vinkesh/Deepak| Added doc and small refactoring Deepak N 2011-07-18 Deepak/Santhosh | ExtensionManager verifies that plugin implements the interface expected by the extension Deepak N 2011-07-18 Santhosh/Deepak | Made supports_extension method optional for plugin, plugin will be loaded only once Deepak N 2011-07-18 [merge] Merged from quantum trunk Deepak N 2011-07-18 Santhosh/deepak| Load extensions supported by plugin Rajaram Mallya 2011-07-07 Rajaram/Santosh|misc readablity improvements to extension tests Rajaram Mallya 2011-07-07 Santosh/Rajaram| added extenstion test to show header extensibility Rajaram Mallya 2011-07-06 Rajaram/Vinkesh | Added tests to confirm extensions can edit previously uneditable field. Santhosh 2011-06-23 Santhosh/Vinkesh | Added extensions framework
# -- Welcome! You have come across a cloud computing network fabric controller. It has identified itself as "Quantum." It aims to tame your (cloud) networking! # -- Basics: 1) Quantum REST API: Quantum supports a REST-ful programmatic interface to manage your cloud networking fabric. 2) Quantum Plugins: Quantum sports a plug-able architecture that allows Quantum's REST API to be backed by various entities that can create a cloud-class virtual networking fabric. The advantages of this plug-able architecture is two-folds: a) Allows for ANY open-source project or commercial vendor to write a Quantum plug-in. b) Allows Quantum users to not be tied down to a single Quantum implementation and enables them to switch out a plug-in by simple editing a config file - plugins.ini # -- Dependencies The following python packages are required to run quantum. These can be installed using pip: eventlet>=0.9.12 nose Paste PasteDeploy pep8==0.5.0 python-gflags routes simplejson webob webtest 1) Install easy_install (there is probably a distribution specific package for this) 2) Install pip: $ easy_install pip==dev 3) Install packages with pip: $ pip install <package name> # -- Configuring Quantum plug-in 1) Identify your desired plug-in. Choose a plugin from one of he options in the quantum/plugins directory. 2) Update plug-in configuration by editing the quantum/plugins.ini file and modify "provider" property to point to the location of the Quantum plug-in. It should specify the class path to the plugin and the class name (i.e. for a plugin class MyPlugin in quantum/plugins/myplugin/myplugin.py the provider would be: quantum.plugins.myplugin.myplugin.MyPlugin) 3) Read the plugin specific README, this is usually found in the same directory as your Quantum plug-in, and follow configuration instructions. # -- Launching the Quantum Service 1) Start quantum using the following command [on the quantum service host]: ~/src/quantum$ PYTHONPATH=.:$PYTHONPATH python bin/quantum etc/quantum.conf # -- Making requests against the Quantum Service Please refer to sample Web Service client code in: ../quantum/test_scripts/miniclient.py # -- CLI tools to program the Quantum-managed Cloud networking fabric Quantum comes with a programmatic CLI that is driven by the Quantum Web Service. You can use the CLI by issuing the following command: ~/src/quantum$ PYTHONPATH=.:$PYTHONPATH python quantum/cli.py This will show help all of the available commands. An example session looks like this: $ export TENANT=t1 $ PYTHONPATH=. python quantum/cli.py -v create_net $TENANT network1 Created a new Virtual Network with ID:e754e7c0-a8eb-40e5-861a-b182d30c3441 # -- Writing your own Quantum plug-in If you wish the write your own Quantum plugin, please refer to some concrete as well as sample plugins available in: ../quantum/quantum/plugins/.. directory. There are a few requirements to writing your own plugin: 1) Your plugin should implement all methods defined in the quantum/quantum_plugin_base.QuantumPluginBase class 2) Copy your Quantum plug-in over to the quantum/quantum/plugins/.. directory 3) The next step is to edit the plugins.ini file in the same directory as QuantumPluginBase class and specify the location of your custom plugin as the "provider" 4) Launch the Quantum Service, and your plug-in is configured and ready to manage a Cloud Networking Fabric. # -- Extensions 1) Creating Extensions: a) Extension files should be placed under ./extensions folder. b) The extension file should have a class with the same name as the filename. This class should implement the contract required by the extension framework. See ExtensionDescriptor class in ./quantum/common/extensions.py for details c) To stop a file in ./extensions folder from being loaded as an extension, the filename should start with an "_" For an example of an extension file look at Foxinsocks class in ./tests/unit/extensions/foxinsocks.py The unit tests in ./tests/unit/test_extensions.py document all the ways in which you can use extensions 2) Associating plugins with extensions: a) A Plugin can advertize all the extensions it supports through the 'supported_extension_aliases' attribute. Eg: class SomePlugin: ... supported_extension_aliases = ['extension1_alias', 'extension2_alias', 'extension3_alias'] Any extension not in this list will not be loaded for the plugin b) Extension Interfaces for plugins (optional) The extension can mandate an interface that plugins have to support with the 'get_plugin_interface' method in the extension. For an example see the FoxInSocksPluginInterface in foxinsocks.py. The QuantumEchoPlugin lists foxinsox in its supported_extension_aliases and implements the method from FoxInSocksPluginInterface.
Description
Languages
Python
98.5%
Shell
1.5%