horizon plugin Tab Groups, empty request.session

asked 2018-08-27 06:31:31 -0500

sts gravatar image

Hello,

i am developing horizon dashboard plugin on rocky devstack on ubuntu 16.04.04

Problem1: i am facing issue in tabs.py where the TabGroups is unable to read self.request.session['test'] which is set in either views.py or workflows.py.

Problem2: i have a Class in models.py which had data that is accessed by views, workflows and tabs. there is lot of inconsistency in reading the data whenever any models.py is accessed by tabs.py. i have also observed that the tabs.py runs on a different thread than views and it creates a different instances of classes in models(has classes ServiceOperations and Models). below is the part of log where we can observe different threads and instances

******models.py accessed from Views******

In ServiceOperations, current thread : <_MainThread(MainThread, started 140396649207552)> 
In get_service_operations_instance, has instance <openstack_dashboard.dashboards.microsemi.models.ServiceOperations instance at 0x7fb094348320>

In Models, current thread : <_MainThread(MainThread, started 140396649207552)> 
In get_models_instance, instance request from IndexView and has instance <openstack_dashboard.dashboards.microsemi.models.Models instance at 0x7fb094348368>

******models.py accessed from Tabs******
In ServiceOperations, current thread : <_DummyThread(Dummy-3, started daemon 140396573673216)> 
In get_service_operations_instance, has instance <openstack_dashboard.dashboards.microsemi.models.ServiceOperations instance at 0x7fb0824

In Models, current thread : <_DummyThread(Dummy-3, started daemon 140396573673216)> 
In get_models_instance, instance request from IndexView and has instance <openstack_dashboard.dashboards.microsemi.models.Models instance at 0x7fb0824feb48>

is there anything obvious that i am missing here? kindly let me know if any more information is required.

Regards.

edit retag flag offensive close merge delete