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