def notify_about_volume_swap(context, instance, host, action, phase, old_volume_id, new_volume_id, exception=None):
 ips = _get_instance_ips(instance)
 flavor = flavor_notification.FlavorPayload(instance.flavor)
 (fault, priority) = _get_fault_and_priority_from_exc(exception)
 payload = instance_notification.InstanceActionVolumeSwapPayload(instance=instance, fault=fault, ip_addresses=ips, flavor=flavor, old_volume_id=old_volume_id, new_volume_id=new_volume_id)
 instance_notification.InstanceActionVolumeSwapNotification(context=context, priority=priority, publisher=notification_base.NotificationPublisher(context=context, host=host, binary='nova-compute'), event_type=notification_base.EventType(object='instance', action=action, phase=phase), payload=payload).emit(context)

def notify_about_volume_swap ( context , instance , host , action , phase , old_volume_id , new_volume_id , exception = None ) : ips = _get_instance_ips ( instance ) flavor = flavor_notification . FlavorPayload ( instance . flavor ) ( fault , priority ) = _get_fault_and_priority_from_exc ( exception ) payload = instance_notification . InstanceActionVolumeSwapPayload ( instance = instance , fault = fault , ip_addresses = ips , flavor = flavor , old_volume_id = old_volume_id , new_volume_id = new_volume_id ) instance_notification . InstanceActionVolumeSwapNotification ( context = context , priority = priority , publisher = notification_base . NotificationPublisher ( context = context , host = host , binary = 'nova-compute' ) , event_type = notification_base . EventType ( object = 'instance' , action = action , phase = phase ) , payload = payload ) . emit ( context )
send versioned notification about the volume swap action on the instance .