Create main to trigger the generation process 05/11905/1
authorMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Tue, 10 Oct 2023 14:34:11 +0000 (16:34 +0200)
committerMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Tue, 10 Oct 2023 14:34:16 +0000 (16:34 +0200)
- network_generator.py added to app controller

Issue-ID: OAM-358
Change-Id: I150f38de098a83b31af8c9c6554ccc7a6f455128
Signed-off-by: Martin Skorupski <martin.skorupski@highstreet-technologies.com>
code/network-generator/network_generator.py [new file with mode: 0644]

diff --git a/code/network-generator/network_generator.py b/code/network-generator/network_generator.py
new file mode 100644 (file)
index 0000000..48fed59
--- /dev/null
@@ -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())