| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 1 | ####################################################################################### |
| 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 | |
| 18 | from dataclasses import dataclass |
| 19 | |
| Mark Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 20 | # Workflow Dataclasses |
| 21 | |
| 22 | |
| 23 | @dataclass |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame^] | 24 | class 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 Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 40 | vim_uuid: str |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame^] | 41 | op_id: str |
| Mark Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 42 | |
| 43 | |
| 44 | # Activity Dataclasses |
| 45 | |
| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 46 | |
| 47 | @dataclass |
| 48 | class TestVimConnectivityInput: |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame^] | 49 | """ |
| 50 | Input dataclass for the Test Vim Connectivity Ativity |
| Mark Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 51 | |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame^] | 52 | 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 Beierl | b808fea | 2023-03-22 10:32:45 -0400 | [diff] [blame] | 58 | vim_uuid: str |
| 59 | |
| Mark Beierl | a8d016d | 2023-03-23 10:24:59 +0000 | [diff] [blame] | 60 | |
| 61 | @dataclass |
| Gulsum Atici | 654c377 | 2023-03-23 15:59:56 +0300 | [diff] [blame^] | 62 | class 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 |
| 87 | class 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 |