Create main to trigger the generation process
[oam.git] / code / network-generator / network_generator.py
1 # Copyright 2023 highstreet technologies GmbH
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 #!/usr/bin/python
16
17 """
18 Module as entry point to generate an ietf topology json
19 """
20 import sys
21
22 from model.python.Countries import Country
23 from model.python.TypeDefinitions import AddressType
24 from model.python.ORanFunction import ORanFunction
25 from controller.parameter_validator import ParameterValidator
26
27 validator: ParameterValidator = ParameterValidator(sys.argv)
28
29 if validator.is_valid():
30     address: AddressType = {
31         "country": Country.Germany
32     }
33     o_ran_function = ORanFunction({"address":address})
34     print(o_ran_function)
35     print("yippy")
36 else:
37     print(validator.error_message())