Skip to content

Instantly share code, notes, and snippets.

@denismakogon
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denismakogon/9c2d802e2a61eb6164d2 to your computer and use it in GitHub Desktop.
Save denismakogon/9c2d802e2a61eb6164d2 to your computer and use it in GitHub Desktop.
Notification refactoring
# **kwards should contain: AZ, name, flavor(new flavor for instance resize), compute instance id, volume size
def send_usage_event(self, event_type, **kwargs):
event_type = 'trove.instance.%s' % event_type
publisher_id = CONF.host
az = kwargs.pop('az')
name = kwargs.pop('name')
created_time = timeutils.isotime(self.db_info.created)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment