3 # ============LICENSE_START=======================================================
4 # ORAN SMO PACKAGE - PYTHONSDK TESTS
5 # ================================================================================
6 # Copyright (C) 2021-2022 AT&T Intellectual Property. All rights
8 # ================================================================================
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
13 # http://www.apache.org/licenses/LICENSE-2.0
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 # ============LICENSE_END============================================
21 # ===================================================================
25 """A1Sim tests module."""
27 from onapsdk.configuration import settings
28 from oransdk.a1sim.a1sim import A1sim
29 from oransdk.utils.jinja import jinja_env
33 logging.config.dictConfig(settings.LOG_CONFIG)
34 logger = logging.getLogger("test DMAAP")
37 """Test the A1 sims."""
38 logger.info("Get ric version for ost")
40 a1sim.check_version(settings.A1SIM_OSC_URL)
41 a1sim.check_status(settings.A1SIM_OSC_URL)
42 a1sim.get_policy_number(settings.A1SIM_OSC_URL)
44 data = jinja_env().get_template("OSC/policy_type.json.j2").render()
45 a1sim.create_policy_type(settings.A1SIM_OSC_URL, 1, data)