'Store the Event in the database.'

def store(self):

    ev = {'resource_name': self.resource_name, 'physical_resource_id': self.physical_resource_id, 'stack_id': self._stack_identifier.stack_id, 'resource_action': self.action, 'resource_status': self.status, 'resource_status_reason': self.reason, 'resource_type': self.resource_type}
    if (self.uuid is not None):
        ev['uuid'] = self.uuid
    if (self.timestamp is not None):
        ev['created_at'] = self.timestamp
    if self.rsrc_prop_data:
        ev['rsrc_prop_data_id'] = self.rsrc_prop_data.id
    new_ev = event_object.Event.create(self.context, ev)
    self.id = new_ev.id
    self.timestamp = new_ev.created_at
    self.uuid = new_ev.uuid
    return self.id
