3 # ============LICENSE_START===================================================
4 # ORAN SMO PACKAGE - PYTHONSDK TESTS
5 # ================================================================================
6 # Copyright (C) 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.
21 # SPDX-License-Identifier: Apache-2.0
22 # ============LICENSE_END=====================================================
25 """Configure AAI for Network Slicing option2 test."""
29 from onapsdk.aai.business.customer import Customer
30 from onapsdk.configuration import settings
32 logging.config.dictConfig(settings.LOG_CONFIG)
33 logger = logging.getLogger("####################### Start AAI Preparation")
35 class AaiPreparation():
36 """Can be used to prepare AAI for Network Slicing usecase option2."""
40 """Prepare AAI for network slicing use case."""
41 logger.info("####################### Start to prepare AAI")
42 aai = Customer("5GCustomer", "5GCustomer", "INFRA")
43 aai.create("5GCustomer", "5GCustomer", "INFRA")
44 aai.subscribe_service("5G")
48 """Clean up AAI settings."""
49 logger.info("####################### Start to clean up AAI settings")
50 aai = Customer.get_by_global_customer_id("5GCustomer")