Add new locally scoped relation and context updates for nova-ceilometer

This commit is contained in:
James Page
2013-11-29 15:35:28 +00:00
parent 2ea2f1658a
commit 70c7b91f47
6 changed files with 24 additions and 2 deletions

View File

@@ -0,0 +1 @@
nova_compute_hooks.py

View File

@@ -0,0 +1 @@
nova_compute_hooks.py

View File

@@ -209,6 +209,12 @@ def upgrade_charm():
amqp_joined(relation_id=r_id) amqp_joined(relation_id=r_id)
@hooks.hook('nova-ceilometer-relation-changed')
@restart_on_change(restart_map())
def nova_ceilometer_relation_changed():
CONFIGS.writeall()
def main(): def main():
try: try:
hooks.execute(sys.argv) hooks.execute(sys.argv)

View File

@@ -69,7 +69,12 @@ BASE_RESOURCE_MAP = {
context.OSConfigFlagContext(), context.OSConfigFlagContext(),
CloudComputeContext(), CloudComputeContext(),
NovaComputeLibvirtContext(), NovaComputeLibvirtContext(),
NovaComputeCephContext()], NovaComputeCephContext(),
context.SubordinateConfigContext(
interface='nova-ceilometer',
service='nova',
config_file=NOVA_CONF,
)],
}, },
} }

View File

@@ -6,7 +6,7 @@ description: |
addition to its "native" API (the OpenStack API), it also supports the Amazon addition to its "native" API (the OpenStack API), it also supports the Amazon
EC2 API. EC2 API.
categories: categories:
- openstack - openstack
provides: provides:
cloud-compute: cloud-compute:
interface: nova-compute interface: nova-compute
@@ -22,6 +22,9 @@ requires:
nrpe-external-master: nrpe-external-master:
interface: nrpe-external-master interface: nrpe-external-master
scope: container scope: container
nova-ceilometer:
interface: nova-ceilometer
scope: container
peers: peers:
compute-peer: compute-peer:
interface: nova interface: nova

View File

@@ -84,3 +84,9 @@ volume_api_class = nova.volume.cinder.API
{% if live_migration_uri -%} {% if live_migration_uri -%}
live_migration_uri = {{ live_migration_uri }} live_migration_uri = {{ live_migration_uri }}
{% endif -%} {% endif -%}
{% if sections and 'DEFAULT' in sections -%}
{% for key, value in sections['DEFAULT'] -%}
{{ key }} = {{ value }}
{% endfor -%}
{% endif -%}