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

Web User Interface | Integration of new Python module #61

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

stojkovicv
Copy link
Member

Description

This PR expands 5G-MAG RT Application Provider Web User Interface, with server endpoints to integrate and process new Media Configuration module in order to create m8.json file for the overall 5GMS architecture.

Related discussion: #43
Related issue: #52

Comment on lines 38 to 43
from rt_media_configuration.media_configuration import MediaConfiguration
from rt_media_configuration.importers.m1_importer import M1SessionImporter
from rt_media_configuration.media_entry import MediaEntry
from rt_media_configuration.media_distribution import MediaDistribution
from rt_media_configuration.media_entry_point import MediaEntryPoint
from rt_media_configuration.media_app_distribution import MediaAppDistribution
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not wrong, but I thought I'd point out that those classes are replicated in the top level rt_media_configuration module. So you can just do: from rt_media_configuration import MediaConfiguration, M1SessionImporter, MediaEntry, MediaDistribution, MediaEntryPoint, MediaAppDistribution

management-ui/server.py Show resolved Hide resolved
else:
data_store = None
if _media_configuration is None:
_media_configuration = await MediaConfiguration(persistent_data_store=data_store)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get MediaConfiguration to use your M1Session object for its synchronisation by providing it in the m1_session argument to the MediaConfiguration initialisation. So this line would become:

_media_configuration = await MediaConfiguration(persistent_data_store=data_store, m1_session=session)

Comment on lines +97 to +98
importer = M1SessionImporter(session)
await importer.import_to(_media_configuration)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be equivalent to:

_media_configuration.restoreModel()

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

Successfully merging this pull request may close these issues.

2 participants