Files
trove/trove/backup/state.py
Robert Myers 0007a5076a Removing dependency on trove models in the guest agent
Reasons:
 - The guest agent is importing backup models and agent
   heartbeat, this triggers the all of the trove database
   setup logic which bloats the guest process on the host.

 - Moving the state to its own module and removing an unused
   function decreases the memory usage by about 15 - 20 megs.

Closes-Bug: #1375311
Change-Id: I126c0b89c170b325d85b3f09afca399b4f5de9e8
2014-10-06 10:21:20 -05:00

27 lines
913 B
Python

# Copyright 2014 OpenStack Foundation
# All Rights Reserved.
#
# 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.
#
class BackupState(object):
NEW = "NEW"
BUILDING = "BUILDING"
SAVING = "SAVING"
COMPLETED = "COMPLETED"
FAILED = "FAILED"
DELETE_FAILED = "DELETE_FAILED"
RUNNING_STATES = [NEW, BUILDING, SAVING]
END_STATES = [COMPLETED, FAILED, DELETE_FAILED]