c301b5e763
Deletion sessions were in 'deploying' state instead of 'deleting'. Because of this such sessions could not be found by RPC result processing code and remained in 'deploying' status causing UI to display progress bar forever. Also there were 2 duplicate SessionStates enums in the code with and the second copy was outdated and didn't contained DELETING status as well as other new session statuses. Because buggy code was using that outdated enum it was necessary to merge both enums into single declaration Change-Id: I852f1f3dd1051c7b40afaa2575a4335b0f3c3104 Closes-Bug: #1386068
40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
# Copyright (c) 2013 Mirantis, Inc.
|
|
#
|
|
# 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.
|
|
import collections
|
|
|
|
SessionState = collections.namedtuple('SessionState', [
|
|
'OPENED', 'DEPLOYING', 'DEPLOYED', 'DEPLOY_FAILURE', 'DELETING',
|
|
'DELETE_FAILURE'
|
|
])(
|
|
OPENED='opened',
|
|
DEPLOYING='deploying',
|
|
DEPLOYED='deployed',
|
|
DEPLOY_FAILURE='deploy failure',
|
|
DELETING='deleting',
|
|
DELETE_FAILURE='delete failure'
|
|
)
|
|
|
|
EnvironmentStatus = collections.namedtuple('EnvironmentStatus', [
|
|
'READY', 'PENDING', 'DEPLOYING', 'DEPLOY_FAILURE', 'DELETING',
|
|
'DELETE_FAILURE'
|
|
])(
|
|
READY='ready',
|
|
PENDING='pending',
|
|
DEPLOYING='deploying',
|
|
DEPLOY_FAILURE='deploy failure',
|
|
DELETING='deleting',
|
|
DELETE_FAILURE='delete failure'
|
|
|
|
)
|