charm-nova-cloud-controller/unit_tests
Felipe Reyes 366df4c07e Update nova relations data on ha-relation-changed
When taking the nova-cloud-controller from single unit to full HA by
increasing the number of units from 1 to 3 and relating it to hacluster,
the data set on the cloud-compute relation is not updated, because the
update_nova_relation() function is only called on
cloud-compute-relation-joined and config-changed, none of these hooks
are executed when scaling out the application.

This patch introduces a call to update_nova_relation() on
ha-relation-changed.

Test case on an environment deployed with a single unit of
nova-cloud-controller:

    export NOVA_CC_VIP=10.0.0.11
    juju config nova-cloud-controller vip=$NOVA_CC_VIP
    juju deploy --series jammy --channel 2.4/stable hacluster \
        nova-cloud-controller-hacluster
    juju add-unit -n 2 nova-cloud-controller
    juju deploy --series jammy memcached
    juju add-relation memcached nova-cloud-controller
    juju add-relation nova-cloud-controller nova-cloud-controller-hacluster

Change-Id: Ib08bf9b6e1ce2b69be4d99ffe0726b59d81f4bc9
Closes-Bug: #2002154
2023-04-24 21:22:22 -04:00
..
__init__.py Use unittest.mock instead of mock 2021-12-15 14:16:56 +00:00
test_actions_openstack_upgrade.py Update unittests 2023-03-22 15:27:36 -03:00
test_actions.py Fix unittest 2023-03-22 15:06:52 -03:00
test_nova_cc_contexts.py Merge "Expose max_local_block_devices as an explicit charm option" 2022-03-11 08:41:05 +00:00
test_nova_cc_hooks.py Update nova relations data on ha-relation-changed 2023-04-24 21:22:22 -04:00
test_nova_cc_utils.py Update unittests 2023-03-22 15:27:36 -03:00
test_utils.py Remove nrpe check of nova-consoleauth when not needed. 2022-01-06 12:04:58 -03:00