README update

This commit is contained in:
Liam Young 2016-09-15 07:37:26 +00:00
parent 85f776e541
commit e74ac1b6cc
1 changed files with 33 additions and 33 deletions

View File

@ -15,40 +15,40 @@ The interface provides the `{relation-name}.connected` and
The configure\_plugin method allows the following to be configured in the
principle charm:
* neutron\_plugin: Name of the plugin type eg 'ovs', 'odl' etc. This is not
* **neutron\_plugin**: Name of the plugin type eg 'ovs', 'odl' etc. This is not
currently used in the principle but should be set to
something representitve of the plugin type.
* core\_plugin: Value of core\_plugin to be set in neutron.conf
* neutroni\_plugin\_config: File containing plugin config. This config file is
* **core\_plugin**: Value of core\_plugin to be set in neutron.conf
* **neutron\_plugin\_config**: File containing plugin config. This config file is
appended to the list of configs the neutron
services read on startup.
* service\_plugins: Value of service\_plugins to be set in neutron.conf
* subordinate\_configuration: Config to be inserted into a configuration file
* **service\_plugins**: Value of service\_plugins to be set in neutron.conf
* **subordinate\_configuration**: Config to be inserted into a configuration file
that the principle manages.
Request `foo = bar` is inserted into the `DEFAULT` section of neutron.conf
```python
@reactive.when('neutron-plugin-api-subordinate.connected')
def configure_principle(api_principle):
@reactive.when('neutron-plugin-api-subordinate.connected')
def configure_principle(api_principle):
...
inject_config = {
"neutron-api": {
"/etc/neutron/neutron.conf": {
"sections": {
'DEFAULT': [
('foo', 'bar')
],
}
}
}
}
api_principle.configure_plugin(
neutron_plugin='odl',
core_plugin='neutron.plugins.ml2.plugin.Ml2Plugin',
neutron_plugin_config='/etc/neutron/plugins/ml2/ml2_conf.ini',
service_plugins='router,firewall,lbaas,vpnaas,metering',
subordinate_configuration=inject_config)
inject_config = {
"neutron-api": {
"/etc/neutron/neutron.conf": {
"sections": {
'DEFAULT': [
('foo', 'bar')
],
}
}
}
}
api_principle.configure_plugin(
neutron_plugin='odl',
core_plugin='neutron.plugins.ml2.plugin.Ml2Plugin',
neutron_plugin_config='/etc/neutron/plugins/ml2/ml2_conf.ini',
service_plugins='router,firewall,lbaas,vpnaas,metering',
subordinate_configuration=inject_config)
```
## Restart requests
@ -56,17 +56,17 @@ def configure_principle(api_principle):
Requesting a restart of all remote services:
```python
@reactive.when('neutron-plugin-api-subordinate.connected')
def remote_restart(api_principle):
@reactive.when('neutron-plugin-api-subordinate.connected')
def remote_restart(api_principle):
...
api_principle.request_restart()
api_principle.request_restart()
```
Requesting a restart of a specific type of remote services:
```python
@reactive.when('neutron-plugin-api-subordinate.connected')
def remote_restart(api_principle):
@reactive.when('neutron-plugin-api-subordinate.connected')
def remote_restart(api_principle):
...
api_principle.request_restart(service_type='neutron')
```
@ -84,10 +84,10 @@ and add a provides interface of type `neutron-plugin-api-subordinate` to your
charm or layers `metadata.yaml` eg:
```yaml
provides:
neutron-plugin-api-subordinate:
interface: neutron-plugin-api-subordinate
scope: container
provides:
neutron-plugin-api-subordinate:
interface: neutron-plugin-api-subordinate
scope: container
```
# Bugs