1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
18 from dataclasses
import dataclass
19 from enum
import auto
, IntEnum
21 #######################################################################################
22 # Workflow Dataclasses
26 class VimOperationInput
:
28 Input dataclass for workflows that perform operations
29 (create, update, delete) on VIMs.
34 The UUID of the VIM account as stored in the OSM vim
38 The operation (task) id for this workflow. This is used
39 by the workflow at the end to update the status of the
40 operation in Mongo vim collection.
48 class NsLcmOperationInput
:
50 Input dataclass for workflows that run as LCM operations.
56 A dictionary representing the nslcmop record from the
63 #######################################################################################
64 # Activity Dataclasses
67 class LcmOperationState(IntEnum
):
74 class UpdateLcmOperationStateInput
:
76 Input dataclass for updating LCM Operations in the Mongo nslcmops
77 collection. The following attributes will be updated automatically
84 The operation (task) id for this activity. This is the key
85 to the record in nslcmops collection that will be updated.
87 op_state : LcmOperationState
88 A representation of the state of the specified operation id,
89 such as PROCESSING, COMPLETED, or FAILED.
92 Human readable checkpoint message, intended only to give the
96 Human readable error message if any failure occurred.
99 Human readable message providing additional details to the
100 operation state, such as the error message explaining why
101 the operation failed.
105 op_state
: LcmOperationState
112 class TestVimConnectivityInput
:
114 Input dataclass for the Test Vim Connectivity Ativity
119 The UUID of the VIM account as stored in the OSM vim
126 class VimState(IntEnum
):
133 class UpdateVimStateInput
:
135 Input dataclass for updating VIM state in the DB
140 The UUID of the VIM account as stored in the OSM vim
143 operational_state : VimState
144 A representation of the operational state (ENABLED or ERROR)
148 Human readable message providing additional details to the
149 operational state, such as the error message associated
150 with the ERROR operational_state.
154 operational_state
: VimState
158 class VimOperationState(IntEnum
):
164 class UpdateVimOperationStateInput
:
166 Input dataclass for updating VIM Operations in the Mongo VIM
172 The UUID of the VIM account as stored in the OSM vim
176 The operation (task) id for this workflow. This is used
177 to update the status of the operation in Mongo vim collection.
179 op_state : VimOperationState
180 A representation of the state of the specified operation id,
181 such as COMPLETED, or FAILED.
184 Human readable message providing additional details to the
185 operation state, such as the error message explaining why
186 the operation failed.
191 op_state
: VimOperationState
196 class DeleteVimInput
:
198 Input dataclass for deleting vim record from the database
203 The UUID of the VIM account as stored in the OSM vim