From fb84a647f6724931d8f37447ded16b98e3d58aeb Mon Sep 17 00:00:00 2001 From: Martin Skorupski Date: Tue, 10 Oct 2023 16:34:11 +0200 Subject: [PATCH] Create main to trigger the generation process - network_generator.py added to app controller Issue-ID: OAM-358 Change-Id: I150f38de098a83b31af8c9c6554ccc7a6f455128 Signed-off-by: Martin Skorupski --- code/network-generator/network_generator.py | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 code/network-generator/network_generator.py diff --git a/code/network-generator/network_generator.py b/code/network-generator/network_generator.py new file mode 100644 index 0000000..48fed59 --- /dev/null +++ b/code/network-generator/network_generator.py @@ -0,0 +1,37 @@ +# Copyright 2023 highstreet technologies GmbH +# +# 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. + +#!/usr/bin/python + +""" +Module as entry point to generate an ietf topology json +""" +import sys + +from model.python.Countries import Country +from model.python.TypeDefinitions import AddressType +from model.python.ORanFunction import ORanFunction +from controller.parameter_validator import ParameterValidator + +validator: ParameterValidator = ParameterValidator(sys.argv) + +if validator.is_valid(): + address: AddressType = { + "country": Country.Germany + } + o_ran_function = ORanFunction({"address":address}) + print(o_ran_function) + print("yippy") +else: + print(validator.error_message()) -- 2.16.6