Rebase
This commit is contained in:
commit
8a9c1a09ea
@ -58,6 +58,11 @@ options:
|
||||
default: False
|
||||
type: boolean
|
||||
description: Enable verbose logging
|
||||
use-syslog:
|
||||
type: boolean
|
||||
default: False
|
||||
description: |
|
||||
If set to True, supporting services will log to syslog.
|
||||
instance-mtu:
|
||||
type: int
|
||||
description: |
|
||||
|
@ -31,6 +31,9 @@ from charmhelpers.contrib.openstack.neutron import (
|
||||
)
|
||||
|
||||
import charmhelpers.contrib.openstack.context as context
|
||||
from charmhelpers.contrib.openstack.context import (
|
||||
SyslogContext
|
||||
)
|
||||
import charmhelpers.contrib.openstack.templating as templating
|
||||
from charmhelpers.contrib.openstack.neutron import headers_package
|
||||
from quantum_contexts import (
|
||||
@ -177,7 +180,8 @@ NOVA_CONFIG_FILES = {
|
||||
context.SharedDBContext(ssl_dir=NOVA_CONF_DIR),
|
||||
context.PostgresqlDBContext(),
|
||||
NetworkServiceContext(),
|
||||
QuantumGatewayContext()],
|
||||
QuantumGatewayContext(),
|
||||
SyslogContext()],
|
||||
'services': ['nova-api-metadata']
|
||||
},
|
||||
}
|
||||
@ -215,7 +219,8 @@ NEUTRON_SHARED_CONFIG_FILES.update(NOVA_CONFIG_FILES)
|
||||
QUANTUM_OVS_CONFIG_FILES = {
|
||||
QUANTUM_CONF: {
|
||||
'hook_contexts': [context.AMQPContext(ssl_dir=QUANTUM_CONF_DIR),
|
||||
QuantumGatewayContext()],
|
||||
QuantumGatewayContext(),
|
||||
SyslogContext()],
|
||||
'services': ['quantum-l3-agent',
|
||||
'quantum-dhcp-agent',
|
||||
'quantum-metadata-agent',
|
||||
@ -240,7 +245,8 @@ QUANTUM_OVS_CONFIG_FILES.update(QUANTUM_SHARED_CONFIG_FILES)
|
||||
NEUTRON_OVS_CONFIG_FILES = {
|
||||
NEUTRON_CONF: {
|
||||
'hook_contexts': [context.AMQPContext(ssl_dir=NEUTRON_CONF_DIR),
|
||||
QuantumGatewayContext()],
|
||||
QuantumGatewayContext(),
|
||||
SyslogContext()],
|
||||
'services': ['neutron-l3-agent',
|
||||
'neutron-dhcp-agent',
|
||||
'neutron-metadata-agent',
|
||||
|
@ -4,6 +4,7 @@ state_path=/var/lib/nova
|
||||
lock_path=/var/lock/nova
|
||||
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
|
||||
verbose=True
|
||||
use_syslog = {{ use_syslog }}
|
||||
api_paste_config=/etc/nova/api-paste.ini
|
||||
enabled_apis=metadata
|
||||
multi_host=True
|
||||
|
@ -1,6 +1,7 @@
|
||||
[DEFAULT]
|
||||
verbose = {{ verbose }}
|
||||
debug = {{ debug }}
|
||||
use_syslog = {{ use_syslog }}
|
||||
lock_path = /var/lock/quantum
|
||||
core_plugin = {{ core_plugin }}
|
||||
rabbit_userid = {{ rabbitmq_user }}
|
||||
|
@ -5,8 +5,9 @@
|
||||
[DEFAULT]
|
||||
verbose = {{ verbose }}
|
||||
debug = {{ debug }}
|
||||
use_syslog = {{ use_syslog }}
|
||||
lock_path = /var/lock/neutron
|
||||
core_plugin = {{ core_plugin }}
|
||||
core_plugin = {{ core_plugin }}
|
||||
{% include "parts/rabbitmq" %}
|
||||
control_exchange = neutron
|
||||
notification_driver = neutron.openstack.common.notifier.list_notifier
|
||||
|
@ -8,6 +8,7 @@ state_path=/var/lib/nova
|
||||
lock_path=/var/lock/nova
|
||||
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
|
||||
verbose= {{ verbose }}
|
||||
use_syslog = {{ use_syslog }}
|
||||
api_paste_config=/etc/nova/api-paste.ini
|
||||
enabled_apis=metadata
|
||||
multi_host=True
|
||||
|
@ -1,5 +1,10 @@
|
||||
from mock import MagicMock, patch
|
||||
from mock import (
|
||||
Mock,
|
||||
MagicMock,
|
||||
patch
|
||||
)
|
||||
import quantum_contexts
|
||||
import sys
|
||||
from contextlib import contextmanager
|
||||
|
||||
from test_utils import (
|
||||
@ -244,6 +249,19 @@ class TestHostIP(CharmTestCase):
|
||||
super(TestHostIP, self).setUp(quantum_contexts,
|
||||
TO_PATCH)
|
||||
self.config.side_effect = self.test_config.get
|
||||
# Save and inject
|
||||
self.mods = {'dns': None, 'dns.resolver': None}
|
||||
for mod in self.mods:
|
||||
if mod not in sys.modules:
|
||||
sys.modules[mod] = Mock()
|
||||
else:
|
||||
del self.mods[mod]
|
||||
|
||||
def tearDown(self):
|
||||
super(TestHostIP, self).tearDown()
|
||||
# Cleanup
|
||||
for mod in self.mods.keys():
|
||||
del sys.modules[mod]
|
||||
|
||||
def test_get_host_ip_already_ip(self):
|
||||
self.assertEquals(quantum_contexts.get_host_ip('10.5.0.1'),
|
||||
|
Loading…
Reference in New Issue
Block a user