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.
20 # ============LICENSE_END============================================
21 # ===================================================================
24 """Onap AAI model module."""
25 from onapsdk.aai.service_design_and_creation import Model
26 from oransdk.utils.jinja import jinja_env
28 class AaiModel(Model):
29 """Model resource class."""
33 model_version_id: str,
34 invariant_id: str) -> None:
38 model_name (str): model name
39 model_version_id (str): model version id
44 "Create A&AI service",
45 f"{self.base_url}{self.api_version}/service-design-and-creation/"
46 f"models/model/{invariant_id}",
47 data=jinja_env().get_template("aai_model_create.json.j2")
49 model_version=self.resource_version,
50 model_name=model_name,
51 version_id=model_version_id,
52 model_invariant_id=invariant_id