Add the command that registers to the SMO; Make the create registration and create...
[pti/o2.git] / o2ims / domain / commands.py
1 # Copyright (C) 2021 Wind River Systems, Inc.
2 #
3 #  Licensed under the Apache License, Version 2.0 (the "License");
4 #  you may not use this file except in compliance with the License.
5 #  You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #  Unless required by applicable law or agreed to in writing, software
10 #  distributed under the License is distributed on an "AS IS" BASIS,
11 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #  See the License for the specific language governing permissions and
13 #  limitations under the License.
14
15 # pylint: disable=too-few-public-methods
16 # from datetime import date
17 # from typing import Optional
18 from dataclasses import dataclass
19 # from datetime import datetime
20 # from o2ims.domain.resource_type import ResourceTypeEnum
21 from o2ims.domain.stx_object import StxGenericModel
22 from o2ims.domain.subscription_obj import Message2SMO, RegistrationMessage
23 from o2common.domain.commands import Command
24
25
26 @dataclass
27 class UpdateStxObject(Command):
28     data: StxGenericModel
29
30
31 @dataclass
32 class PubMessage2SMO(Command):
33     data: Message2SMO
34
35
36 @dataclass
37 class Register2SMO(Command):
38     data: RegistrationMessage
39
40
41 @dataclass
42 class UpdateOCloud(UpdateStxObject):
43     pass
44
45
46 @dataclass
47 class UpdateDms(UpdateStxObject):
48     parentid: str
49
50
51 @dataclass
52 class UpdateResourcePool(UpdateStxObject):
53     parentid: str
54
55
56 @dataclass
57 class UpdateResourceType(UpdateStxObject):
58     parentid: str
59
60
61 @dataclass
62 class UpdateResource(UpdateStxObject):
63     parentid: str
64
65
66 @dataclass
67 class UpdatePserver(UpdateResource):
68     pass
69
70
71 @dataclass
72 class UpdatePserverCpu(UpdateResource):
73     pass
74
75
76 @dataclass
77 class UpdatePserverMem(UpdateResource):
78     pass
79
80
81 @dataclass
82 class UpdatePserverEth(UpdateResource):
83     pass
84
85
86 @dataclass
87 class UpdatePserverIf(UpdateResource):
88     pass
89
90
91 @dataclass
92 class UpdatePserverIfPort(UpdateResource):
93     pass