X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2dms%2Fdomain%2Fevents.py;fp=o2dms%2Fviews%2F__init__.py;h=93af574b480324de82ca4c6f8f8da31faa641dfa;hb=5ad82f634e2f10aaeccf1d2420fafc63e2d0056e;hp=7a888a6e48f404b348036a149063a8a9d0520597;hpb=81cd55de0440dcbc8df4d788565295d051ca91ad;p=pti%2Fo2.git diff --git a/o2dms/views/__init__.py b/o2dms/domain/events.py similarity index 66% rename from o2dms/views/__init__.py rename to o2dms/domain/events.py index 7a888a6..93af574 100644 --- a/o2dms/views/__init__.py +++ b/o2dms/domain/events.py @@ -1,25 +1,27 @@ -# 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. - -from flask_restx import Namespace -from o2common.config import config - - -api_dms_lcm_v1 = Namespace( - "O2DMS_LCM", description='DMS LCM related operations.') -apibase = config.get_o2dms_api_base() - - -def configure_namespace(app): - app.add_namespace(api_dms_lcm_v1, path=apibase) +# 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