1 # ==================================================================================
3 # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # ==================================================================================
20 from ricxappframe.xapp_frame import RMRXapp, rmr
21 from ..utils.constants import Constants
22 from ._BaseManager import _BaseManager
25 class A1PolicyManager(_BaseManager):
27 def __init__(self, rmr_xapp: RMRXapp):
28 super().__init__(rmr_xapp)
31 policy_query = '{"policy_type_id":"' + str(Constants.HELLOWORLD_POLICY_ID) + '"}'
32 self._rmr_xapp.rmr_send(policy_query.encode(), Constants.A1_POLICY_QUERY)
33 self.logger.info("A1PolicyManager.startup:: Sent A1 policy query = " + policy_query)