5
sys.path.append('hooks/')
7
from charmhelpers.contrib.openstack.utils import (
8
do_action_openstack_upgrade,
11
from charmhelpers.core.hookenv import (
16
from cinder_hooks import (
21
from cinder_utils import (
26
def openstack_upgrade():
27
"""Upgrade packages to config-set Openstack version.
29
If the charm was installed from source we cannot upgrade it.
30
For backwards compatibility a config flag must be set for this
31
code to run, otherwise a full service level upgrade will fire
34
if (do_action_openstack_upgrade('cinder-common',
37
# tell any storage-backends we just upgraded
38
for rid in relation_ids('storage-backend'):
39
relation_set(relation_id=rid,
40
upgrade_nonce=uuid.uuid4())
43
if __name__ == '__main__':