vmware-nsx/neutron/plugins/nicira/vshield/tasks/constants.py
Kaiwei Fan 90db4802d7 VCNS driver implementation
Implement API/driver interface for configuring vShield Edge Appliance.

Currently implemented functions:
    - Deploy an Edge
    - Destroy an Edge
    - Configuring interfaces
    - Configuring SNAT/DNAT rules
    - Configuring default gateway and static routes
    - Query Edge status
    - Task-based asynchronous model
    - Allow old routes/nat config to be skipped if new updates are coming

Implements: blueprint vcns-driver
Change-Id: I881bde907f4c90de4c919d008b76b8c2a2d0e1fd
2013-09-04 17:16:41 -07:00

47 lines
1.4 KiB
Python
Executable File

# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 VMware, Inc.
# 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 TaskStatus(object):
"""Task running status.
This is used by execution/status callback function to notify the
task manager what's the status of current task, and also used for
indication the final task execution result.
"""
PENDING = 1
COMPLETED = 2
ERROR = 3
ABORT = 4
class TaskState(object):
"""Current state of a task.
This is to keep track of the current state of a task.
NONE: the task is still in the queue
START: the task is pull out from the queue and is about to be executed
EXECUTED: the task has been executed
STATUS: we're running periodic status check for this task
RESULT: the task has finished and result is ready
"""
NONE = -1
START = 0
EXECUTED = 1
STATUS = 2
RESULT = 3