From e2e8de070e5957f1b1bfb83441e1d09f2ec99e87 Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Tue, 20 Aug 2013 12:06:15 -0700 Subject: [PATCH] Add generic relation broken hook. --- hooks/amqp-relation-broken | 1 + hooks/cinder-volume-service-relation-broken | 1 + hooks/identity-service-relation-broken | 1 + hooks/image-service-relation-broken | 1 + hooks/nova-volume-service-relation-broken | 1 + hooks/nova_cc_hooks.py | 11 +++++++++++ hooks/quantum-network-service-relation-broken | 1 + hooks/shared-db-relation-broken | 1 + 8 files changed, 18 insertions(+) create mode 120000 hooks/amqp-relation-broken create mode 120000 hooks/cinder-volume-service-relation-broken create mode 120000 hooks/identity-service-relation-broken create mode 120000 hooks/image-service-relation-broken create mode 120000 hooks/nova-volume-service-relation-broken create mode 120000 hooks/quantum-network-service-relation-broken create mode 120000 hooks/shared-db-relation-broken diff --git a/hooks/amqp-relation-broken b/hooks/amqp-relation-broken new file mode 120000 index 00000000..f6702415 --- /dev/null +++ b/hooks/amqp-relation-broken @@ -0,0 +1 @@ +nova_cc_hooks.py \ No newline at end of file diff --git a/hooks/cinder-volume-service-relation-broken b/hooks/cinder-volume-service-relation-broken new file mode 120000 index 00000000..f6702415 --- /dev/null +++ b/hooks/cinder-volume-service-relation-broken @@ -0,0 +1 @@ +nova_cc_hooks.py \ No newline at end of file diff --git a/hooks/identity-service-relation-broken b/hooks/identity-service-relation-broken new file mode 120000 index 00000000..f6702415 --- /dev/null +++ b/hooks/identity-service-relation-broken @@ -0,0 +1 @@ +nova_cc_hooks.py \ No newline at end of file diff --git a/hooks/image-service-relation-broken b/hooks/image-service-relation-broken new file mode 120000 index 00000000..f6702415 --- /dev/null +++ b/hooks/image-service-relation-broken @@ -0,0 +1 @@ +nova_cc_hooks.py \ No newline at end of file diff --git a/hooks/nova-volume-service-relation-broken b/hooks/nova-volume-service-relation-broken new file mode 120000 index 00000000..f6702415 --- /dev/null +++ b/hooks/nova-volume-service-relation-broken @@ -0,0 +1 @@ +nova_cc_hooks.py \ No newline at end of file diff --git a/hooks/nova_cc_hooks.py b/hooks/nova_cc_hooks.py index 6d778ede..14cbfdbb 100755 --- a/hooks/nova_cc_hooks.py +++ b/hooks/nova_cc_hooks.py @@ -353,6 +353,17 @@ def ha_changed(): identity_joined(rid=rid) +@hooks.hook('amqp-relation-broken', + 'cinder-volume-service-relation-broken', + 'identity-service-relation-broken', + 'image-service-relation-broken', + 'nova-volume-service-relation-broken', + 'shared-db-relation-broken' + 'quantum-network-service-relation-broken') +def relation_broken(): + CONFIGS.write_all() + + def configure_https(): ''' Enables SSL API Apache config if appropriate and kicks identity-service diff --git a/hooks/quantum-network-service-relation-broken b/hooks/quantum-network-service-relation-broken new file mode 120000 index 00000000..f6702415 --- /dev/null +++ b/hooks/quantum-network-service-relation-broken @@ -0,0 +1 @@ +nova_cc_hooks.py \ No newline at end of file diff --git a/hooks/shared-db-relation-broken b/hooks/shared-db-relation-broken new file mode 120000 index 00000000..f6702415 --- /dev/null +++ b/hooks/shared-db-relation-broken @@ -0,0 +1 @@ +nova_cc_hooks.py \ No newline at end of file