-
Notifications
You must be signed in to change notification settings - Fork 866
Closed
Labels
DEV: backendPython, databases, networking, filesystem...Python, databases, networking, filesystem...P1 - importantPriority: High impact on UXPriority: High impact on UXTAG: tech update / debtChange not visible to userChange not visible to user
Milestone
Description
Summary
As a developer, in support of remote content browsing and pursuit of leveraging existing functionality, I would like to use the NetworkLocation models and associated architecture to interact with Studio and KDP. We can also leverage functionality added with the is_local attribute to generalize interacting with devices on the internet.
Note: KDP doesn't currently respond to the info endpoint, so we should prevent requests to KDP until we update KDP.
Deliverables
The task helper _enqueue_network_location_update_with_backoff
- It should prevent enqueuing new tasks when
is_local is False
The model NetworkLocation
- A new
typefield should be added with choices ofstatic,dynamic, andreserved - A django migration should migrate all models with
dynamic = Falseto havetypeofstatic(alldynamic = Truecan be deleted) - The field
dynamicshould be removed from the model oncetypehas been set - The
typefield should beNOT NULLonce migrated - The existing
DynamicNetworkLocationandStaticNetworkLocationmodels should be migrated to use the newtypefield
The task reset_connection_states
- It should update or create
reservednetwork locations for Studio and KDP, using the URLs defined in Kolibri'soptions.ini - The
reservednetwork locations should use hardcoded IDs - The connection state for the locations should be reset like
staticlocations - It should not enqueue a
perform_network_location_updatetask for KDP, but should set itsapplicationtoKolibri Data Portal
The viewsets for NetworkLocations
It should annotate adynamicattribute on the response which is true whentypeisdynamic- Only
staticmodels should be allowed to be created and it should set thetypetostaticwhen creating them - It should have a new
syncablefilter, which should include KDP'sreservedlocation when1and Studio when0 - If
syncablefilter is not provided, always exclude both KDP and Studio - Its method
update_connection_statusshould prevent making requests to KDP's location for the time being
Metadata
Metadata
Assignees
Labels
DEV: backendPython, databases, networking, filesystem...Python, databases, networking, filesystem...P1 - importantPriority: High impact on UXPriority: High impact on UXTAG: tech update / debtChange not visible to userChange not visible to user