-
Notifications
You must be signed in to change notification settings - Fork 4
descriptorgen architecture
The descriptor generator is implemented in a modular architecture with separate plugins for generating different kinds of descriptors. Currently, there is one plugin for generating 5GTANGO descriptors and another for generating OSM descriptors. In the future, further plugins may be added to support other descriptor types or new versions of these descriptors.
All plugins are called the same way:
from tngsdk.descriptorgen.plugins import plugin_name
descriptors = plugin_name.generate_descriptors(user_input, log)
print(descriptors['nsd']) # prints the generated NSD
user_inputs
is a dictionary containing the high-level user input, e.g., author, vendor, service name, description, etc. that are passed as CLI arguments.
log
is a reference to the logging object to be used inside the generation plugin.
The generated descriptors
dictionary contains a field 'nsd'
with the NSD and 'vnfds'
with a list of the generated VNFDs.
The generation is based on so-called default descriptors, i.e., typical descriptors with default values for all fields. These fields are then overwritten or adjusted by the high-level user input. The default descriptors are stored the src/tngsdk/descriptorgen/default-descriptors
directory and are loaded from there directly by the generation plugins.