[jamespage,r=gnuoy] Add support for multiple network configuration
This commit is contained in:
commit
3278294236
@ -1 +1,2 @@
|
||||
bin
|
||||
.coverage
|
||||
|
20
Makefile
20
Makefile
@ -2,13 +2,21 @@
|
||||
PYTHON := /usr/bin/env python
|
||||
|
||||
lint:
|
||||
@flake8 --exclude hooks/charmhelpers hooks
|
||||
@flake8 --exclude hooks/charmhelpers unit_tests tests
|
||||
@flake8 --exclude hooks/charmhelpers hooks unit_tests tests
|
||||
@charm proof
|
||||
|
||||
unit_test:
|
||||
@echo Starting unit tests...
|
||||
@$(PYTHON) /usr/bin/nosetests --nologcapture unit_tests
|
||||
@$(PYTHON) /usr/bin/nosetests --nologcapture --with-coverage unit_tests
|
||||
|
||||
bin/charm_helpers_sync.py:
|
||||
@mkdir -p bin
|
||||
@bzr cat lp:charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py \
|
||||
> bin/charm_helpers_sync.py
|
||||
|
||||
sync: bin/charm_helpers_sync.py
|
||||
@$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-hooks.yaml
|
||||
@$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-tests.yaml
|
||||
|
||||
test:
|
||||
@echo Starting Amulet tests...
|
||||
@ -17,10 +25,6 @@ test:
|
||||
# https://bugs.launchpad.net/amulet/+bug/1320357
|
||||
@juju test -v -p AMULET_HTTP_PROXY
|
||||
|
||||
sync:
|
||||
@charm-helper-sync -c charm-helpers-hooks.yaml
|
||||
@charm-helper-sync -c charm-helpers-tests.yaml
|
||||
|
||||
publish: lint test
|
||||
publish: lint unit_test
|
||||
bzr push lp:charms/quantum-gateway
|
||||
bzr push lp:charms/trusty/quantum-gateway
|
||||
|
11
config.yaml
11
config.yaml
@ -86,3 +86,14 @@ options:
|
||||
default: nova
|
||||
type: string
|
||||
description: Database name
|
||||
# Network configuration options
|
||||
# by default all access is over 'private-address'
|
||||
os-data-network:
|
||||
type: string
|
||||
description: |
|
||||
The IP address and netmask of the OpenStack Data network (e.g.,
|
||||
192.168.0.0/24)
|
||||
.
|
||||
This network will be used for tenant network traffic in overlay
|
||||
networks.
|
||||
|
||||
|
@ -28,6 +28,7 @@ from charmhelpers.contrib.hahelpers.cluster import(
|
||||
eligible_leader
|
||||
)
|
||||
import re
|
||||
from charmhelpers.contrib.network.ip import get_address_in_network
|
||||
|
||||
DB_USER = "quantum"
|
||||
QUANTUM_DB = "quantum"
|
||||
@ -164,7 +165,9 @@ class QuantumGatewayContext(OSContextGenerator):
|
||||
def __call__(self):
|
||||
ctxt = {
|
||||
'shared_secret': get_shared_secret(),
|
||||
'local_ip': get_host_ip(), # XXX: data network impact
|
||||
'local_ip':
|
||||
get_address_in_network(config('os-data-network'),
|
||||
get_host_ip(unit_get('private-address'))),
|
||||
'core_plugin': core_plugin(),
|
||||
'plugin': config('plugin'),
|
||||
'debug': config('debug'),
|
||||
|
Loading…
Reference in New Issue
Block a user