~corey.bryant/charms/trusty/nova-compute/git-old

« back to all changes in this revision

Viewing changes to hooks/nova_compute_context.py

  • Committer: Edward Hope-Morley
  • Date: 2015-02-16 09:53:45 UTC
  • mfrom: (99.4.1 nova-compute)
  • Revision ID: edward.hope-morley@canonical.com-20150216095345-29jkmtb0ga1u2gsn
[cbjchen,r=hopem]

Making sure libvirt daemon gets a unique host_uuid
on every host.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import uuid
 
2
 
1
3
from charmhelpers.contrib.openstack import context
2
4
from charmhelpers.core.host import service_running, service_start
3
5
from charmhelpers.fetch import apt_install, filter_installed_packages
119
121
        if config('disk-cachemodes'):
120
122
            ctxt['disk_cachemodes'] = config('disk-cachemodes')
121
123
 
 
124
        ctxt['host_uuid'] = '%s' % uuid.uuid4()
122
125
        return ctxt
123
126
 
124
127