sts's profile - activity

2018-11-26 11:14:10 -0600 asked a question horizon plugin Tab Groups, empty request.session

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.

2018-11-26 11:14:10 -0600 asked a question devstack - horizon plugin inconsistent variable value and 'request.GET'

Hello,

i have been noticing a strange behavior in devstack when a custom dashboard plugin is run directly on devstack( ex, http://127.0.0.1:80/). The behavior is,

1) when a global variable (lets say, 'global_var = "This is global var"') is defined in 'views.py' and the same variable is accessed in 'workflow.py' by importing view and as 'view.globa_var', this variable is inconsistent in having the value "This is global var". 2) the inconsistency is also with 'self.request.GET.get('url_param')' when used in any workflow Actions class. it some times gets the url_param and sometimes dont.

And these behavior do not occur when i run horizon from './manage.py runserver' (http://127.0.0.1:9000) and works perfectly fine.

Kindly let me know if i have not expressed the issue properly and if there's a need to additional info.

Regards, Sharath TS

2018-11-26 11:14:09 -0600 asked a question devstack horizon plugin inconsistant 'request.GET'

Hello,

i have been noticing a strange behavior in devstack when a custom dashboard plugin is run directly on devstack( ex, http://127.0.0.1:80/). The behavior is,

1) when a global variable (lets say, 'global_var = "This is global var"') is defined in 'views.py' and the same variable is accessed in 'workflow.py' by importing view and as 'view.globa_var', this variable is inconsistent in having the value "This is global var". 2) the inconsistency is also with 'self.request.GET.get('url_param')' when used in any workflow Actions class. it some times gets the url_param and sometimes dont.

And these behavior do not occur when i run horizon from './manage.py runserver' (http://127.0.0.1:9000) and works perfectly fine.

Kindly let me know if i have not expressed the issue properly and if there's a need to additional info.

Regards, Sharath TS