blob: de04186683e91d0a0cbd758591ed8c22a1df5dcf [file] [log] [blame]
Mark Beierlb808fea2023-03-22 10:32:45 -04001#######################################################################################
2# Copyright ETSI Contributors and Others.
3#
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
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
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
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#######################################################################################
17
18from dataclasses import dataclass
19
Mark Beierla8d016d2023-03-23 10:24:59 +000020# Workflow Dataclasses
21
22
23@dataclass
Gulsum Atici654c3772023-03-23 15:59:56 +030024class VimOperationInput:
25 """
26 Input dataclass for workflows that perform operations
27 (create, update, delete) on VIMs.
28
29 Attributes:
30 -----------
31 vim_uuid : str
32 The UUID of the VIM account as stored in the OSM vim
33 collection in Mongo
34
35 op_id: str
36 The operation (task) id for this workflow. This is used
37 by the workflow at the end to update the status of the
38 operation in Mongo vim collection.
39 """
Mark Beierla8d016d2023-03-23 10:24:59 +000040 vim_uuid: str
Gulsum Atici654c3772023-03-23 15:59:56 +030041 op_id: str
Mark Beierla8d016d2023-03-23 10:24:59 +000042
43
44# Activity Dataclasses
45
Mark Beierlb808fea2023-03-22 10:32:45 -040046
47@dataclass
48class TestVimConnectivityInput:
Gulsum Atici654c3772023-03-23 15:59:56 +030049 """
50 Input dataclass for the Test Vim Connectivity Ativity
Mark Beierlb808fea2023-03-22 10:32:45 -040051
Gulsum Atici654c3772023-03-23 15:59:56 +030052 Attributes:
53 -----------
54 vim_uuid : str
55 The UUID of the VIM account as stored in the OSM vim
56 collection in Mongo
57 """
Mark Beierlb808fea2023-03-22 10:32:45 -040058 vim_uuid: str
59
Mark Beierla8d016d2023-03-23 10:24:59 +000060
61@dataclass
Gulsum Atici654c3772023-03-23 15:59:56 +030062class UpdateVimStateInput:
63 """
64 Input dataclass for updating VIM state in the DB
65
66 Attributes:
67 -----------
68 vim_uuid : str
69 The UUID of the VIM account as stored in the OSM vim
70 collection in Mongo
71
72 operational_state : str
73 A representation of the operational state (ENABLED or ERROR)
74 of the VIM.
75
76 message : str
77 Human readable message providing additional details to the
78 operational state, such as the error message associated
79 with the ERROR operational_state.
80 """
81 vim_uuid: str
82 operational_state: str
83 message: str
84
85
86@dataclass
87class UpdateVimOperationStateInput:
88 """
89 Input dataclass for updating VIM Operations in the Mongo VIM
90 collection.
91
92 Attributes:
93 -----------
94 vim_uuid : str
95 The UUID of the VIM account as stored in the OSM vim
96 collection in Mongo
97
98 op_id: str
99 The operation (task) id for this workflow. This is used
100 to update the status of the operation in Mongo vim collection.
101
102 op_state : str
103 A representation of the state of the specified operation id,
104 such as COMPLETED, or FAILED.
105
106 message : str
107 Human readable message providing additional details to the
108 operation state, such as the error message explaining why
109 the operation failed.
110 """
111 vim_uuid: str
112 op_id: str
113 op_state: str
114 message: str