Bug 1305042

Summary: [RFE] - Need an API to show users logged into a portal and also to show users logged into VMs
Product: Red Hat Enterprise Virtualization Manager Reporter: Greg Scott <gscott>
Component: RFEsAssignee: Rob Young <royoung>
Status: CLOSED WONTFIX QA Contact: Gil Klein <gklein>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5.7CC: dralhan, lsurette, mgoldboi, michal.skrivanek, mkalinin, rbalakri, srevivo, ykaul
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-05 16:00:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1523346    

Description Greg Scott 2016-02-05 12:27:37 UTC
Description of problem:
BZ number 1025796 is for a UI enhancement to the admin portal to show logged in users.  This RFE asks to take that another step and provide an API for it.  And also the ability to show users actually logged into VMs via a portal.

Comment 1 Dushyant Ralhan 2016-02-05 19:25:41 UTC
We'd like this capability to be available via a query API. Our use case requires us to query RHEVM via an API call to:

- get the count of users currently logged in. 
- should provide both active users (logged in to a VM) and
- Inactive users (logged in but locked the Windows session). 

We have an Operations portal where use this information to perform some logic. 

Currently the User API provide the user's Active/Inactive status as a derivative of their registration status as opposed to their current-logged-in status.

Thanks.

Comment 2 Oved Ourfali 2016-02-06 14:04:19 UTC
As far as I know, users logged into VMs are already exposed through the api. Michal?

Comment 3 Michal Skrivanek 2016-02-06 14:18:19 UTC
Yes, we have "logged into VM", we can perhaps use the engine console session locking to get the non-logged...not sure right now, might be exposed already as well

Comment 4 Dushyant Ralhan 2016-02-08 18:40:13 UTC
I had seen the Logged in attribute - but it's for the user API which would need to be called for each user to check their status. If we had to iterate over a few thousand active users to check their Logged on status, it will be a problem. 

Can RH provide/enhance the summary api, like the API entry point, where the attribute below indicates their registration status. We should expand this to include logged-in count. 

<users>
<total>1</total>
<active>1</active>
</users>

Could become: 

<users>
<total>20</total>
<active>15</active>
//enhance api as : 
<loggedin>10<loggedin>
<activeWINsession>6</activeWINsession>
<lockedWINsession>4</lockedWINsession>
</users>

Thanks,
Dushyant Ralhan.

Comment 5 Itamar Heim 2016-02-08 23:33:22 UTC
I'm not sure we should cover "logged into portal" - once connections are done via REST API (custom portal), or broker (CFME, etc.) - we can't track them.

Comment 10 Yaniv Kaul 2016-06-14 07:40:19 UTC
*** Bug 1339933 has been marked as a duplicate of this bug. ***

Comment 14 Franta Kust 2019-05-16 13:09:46 UTC
BZ<2>Jira Resync