Integrate nfdeployment api with event handler
[pti/o2.git] / o2dms / domain / events.py
similarity index 66%
rename from o2dms/views/__init__.py
rename to o2dms/domain/events.py
index 7a888a6..93af574 100644 (file)
@@ -1,25 +1,27 @@
-# Copyright (C) 2021 Wind River Systems, Inc.\r
-#\r
-#  Licensed under the Apache License, Version 2.0 (the "License");\r
-#  you may not use this file except in compliance with the License.\r
-#  You may obtain a copy of the License at\r
-#\r
-#      http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-#  Unless required by applicable law or agreed to in writing, software\r
-#  distributed under the License is distributed on an "AS IS" BASIS,\r
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-#  See the License for the specific language governing permissions and\r
-#  limitations under the License.\r
-\r
-from flask_restx import Namespace\r
-from o2common.config import config\r
-\r
-\r
-api_dms_lcm_v1 = Namespace(\r
-    "O2DMS_LCM", description='DMS LCM related operations.')\r
-apibase = config.get_o2dms_api_base()\r
-\r
-\r
-def configure_namespace(app):\r
-    app.add_namespace(api_dms_lcm_v1, path=apibase)\r
+# Copyright (C) 2021 Wind River Systems, 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.
+
+# pylint: disable=too-few-public-methods
+from dataclasses import dataclass
+from o2common.domain.events import Event
+
+
+@dataclass
+class NfDeploymentCreated(Event):
+    NfDeploymentId: str
+
+
+@dataclass
+class NfDeploymentDeleted(Event):
+    NfDeploymentId: str