change module names
This commit is contained in:
parent
1b56982e22
commit
8594332784
|
@ -1,11 +0,0 @@
|
|||
from __future__ import absolute_import
|
||||
import psutil
|
||||
|
||||
|
||||
def get_services():
|
||||
try:
|
||||
svc = [x.as_dict() for x in psutil.win_service_iter()]
|
||||
except Exception:
|
||||
svc = {"error": "error getting services"}
|
||||
finally:
|
||||
return svc
|
|
@ -1,6 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
import psutil
|
||||
import os
|
||||
|
||||
|
||||
def get_services():
|
||||
return [svc.as_dict() for svc in psutil.win_service_iter()]
|
||||
|
||||
|
||||
def run_python_script(filename, timeout):
|
||||
python_bin = os.path.join("c:\\salt\\bin", "python.exe")
|
||||
file_path = os.path.join("c:\\windows\\temp", filename)
|
|
@ -29,7 +29,7 @@ def get_refreshed_services(request, pk):
|
|||
agent = get_object_or_404(Agent, pk=pk)
|
||||
try:
|
||||
resp = agent.salt_api_cmd(
|
||||
hostname=agent.salt_id, timeout=30, func="get_services.get_services"
|
||||
hostname=agent.salt_id, timeout=30, func="win_agent.get_services"
|
||||
)
|
||||
data = resp.json()
|
||||
except Exception:
|
||||
|
|
Loading…
Reference in New Issue