Record instance actions and events

Record when an action is initiated on an instance, and the underlying
events related to completing that action.

Actions will typically occur at the API level and should match what a
user intended to do with an instance.  Events will typically track what
happens behind the scenes and may include things that would be unclear
for a user if exposed, but should be beneficial to an admin/deployer.

Adds a new wrapper to the compute manager.  The wrapper will record when
an event begins and finishes from the point of view of the compute
manager.  It will also record errors if they occur.

Blueprint instance-actions

Change-Id: I801f3e796d091e146413f84c2ccfab95ad2e1af4
This commit is contained in:
Andrew Laski
2013-01-15 17:24:49 -05:00
parent c421d775ee
commit 250230b323
15 changed files with 579 additions and 42 deletions

View File

@@ -0,0 +1,30 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from nova import db
def fake_action_event_start(*args):
pass
def fake_action_event_finish(*args):
pass
def stub_out_action_events(stubs):
stubs.Set(db, 'action_event_start', fake_action_event_start)
stubs.Set(db, 'action_event_finish', fake_action_event_finish)