Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSAF-Configuration tool: Move m8.json output code to generic Python modules #48

Open
davidjwbbc opened this issue Aug 9, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@davidjwbbc
Copy link
Contributor

Introduction

At present the msaf-configuration Python command-line tool is the only part of this repository that can publish the data that will be retrieved by the 5GMS Aware App via the M8 interface to the Application Provider. It is desirable for all tools in this repository to be able to publish data, for retrieval via M8, when the Application Providers' media model changes. This will require other tools such as the WebUI and m1-session tool to be able to publish M8 data files too.

This issue tracks the work to separate the M8 data publication from the msaf-configuration tool into a set of reusable Python classes. Other issues will cover the integration of these new classes into the other existing tools (i.e. at this time that would be the WebUI and m1-session tool).

This is based on the discussion in discussion thread #43.

Description

After this work msaf-configuration will just be a command line interface to the classes in the rt_media_configuration Python module.

To be done:

  1. Create rt_m8_output.M8Output as an interface class that can take a rt_media_configuration.MediaConfiguration object to be serialised.
  2. Create a rt_m8_output.M8JSONFormatter class which implements the rt_m8_output.M8Output interface and moves the logic from msaf-configuration.dump_m8_files().
  3. Create a MediaConfiguration class which will model the media configuration.
    1. Move the AF synchronisation routines from msaf-configuration into the MediaConfiguration class so that they will synchronise the model with the AF configuration by using rt_m1-client.M1Session and make this operation triggered by calling a sychronise() method.
    2. Add methods to register/deregister rt_m8_output.M8Output interface type objects (e.g rt_m8_output.M8JSONFormatter) to use when the configuration is synchronise()'d.
  4. Create an interface class rt_media_configuration.MediaConfigurationImporter for configuration imports (these will populate the MediaConfiguration model from a given source).
    1. Create a rt_media_configuration.M1SessionImporter to synchonise the MediaConfiguration with the current AF configuration (as seen by rt_m1_client.M1Session)
    2. Create a rt_media_configuration.StreamsJSONImporter to synchonise the MediaConfiguration with a streams.json file and move the logic for this from msaf-configuration.
  5. Update msaf-configuration to use the new importers, formatters and model based on its configuration file.
@davidjwbbc davidjwbbc converted this from a draft issue Aug 9, 2024
@davidjwbbc davidjwbbc self-assigned this Aug 9, 2024
@dsilhavy
Copy link
Contributor

dsilhavy commented Aug 9, 2024

Based on the discussion on 09.08:

  • @davidjwbbc : To start with task 3 to unblock WebUI related tasks.
  • @vuk: To look into WebUI related tasks to use the new Python class/module

@davidjwbbc davidjwbbc moved this from Todo to In Progress in 5GMS: Application Provider User Interface Aug 13, 2024
@davidjwbbc davidjwbbc added the enhancement New feature or request label Aug 13, 2024
@davidjwbbc
Copy link
Contributor Author

I've created the data model in the rt_media_configuration python module, now I have to add the output registration and synchronisation logic.

If you want a sneak peek then you can look at the development branch in my fork.

@dsilhavy dsilhavy added this to the Version 1.1.0 milestone Aug 20, 2024
@davidjwbbc
Copy link
Contributor Author

I've updated the model to fix a couple of issues and added most of the synchronisation code.

I've split the synchronisation code into 2 parts instead of just one monolithic chuck of code which did these two operations one after another. The first part analyses the changes between the current model and what the AF currently has configured and passes back a list of delta operation objects describing the various changes needed. These delta operations can then be applied to synchronise the AF with the new model. This also gives the option for a UI to present the user with a readable list of changes for approval before the changes are committed.

Once this part is complete then the rt_media_configuration python module should be in a suitable state for integration into the WebUI and m1-session tool to begin. I'll then continue to work on the background M8 publication parts that go along with the synchronisation operation.

@dsilhavy
Copy link
Contributor

dsilhavy commented Sep 6, 2024

@stojkovicv This is now in a state that is ready for checking and starting the integration into the WebUI

@davidjwbbc
Copy link
Contributor Author

New model now merged by PR #51, this just leaves the updates to the m1-session command line tool and the WebUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants