Skip to content

Commit

Permalink
test commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhil-vr committed Aug 19, 2024
1 parent 35853d4 commit a8505b1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ui/tui/ecsapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,26 @@
ECS Python SDK Interface Class
"""
from ui.ecsmgmt import *


//write function tools here


def find_process_summary():
"""
Get the ECS OS process summary.
:returns: a dictionary of the process summary.
:rtype: dict
"""

summary = {}
data = get_ecs_process_summary()
root = ElementTree.fromstring(data)
for item in root.findall('service-statistics'):
for stats in item.findall('process-summary-stat'):
for data in stats.findall('data'):
summary[data.attrib['key']] = data.attrib['value']

return summary

0 comments on commit a8505b1

Please sign in to comment.