import json
import subprocess
def handler(context, inputs):
result = subprocess.run(
["cat", "/etc/os-release"],
capture_output = True,
text = True
)
"""
result = subprocess.run(
["cat", "/etc/photon-release"],
capture_output = True,
text = True
)
# Prints basic information about the os name and system hardware
result = subprocess.run(
["uname", "-a"],
capture_output = True,
text = True
)
result = subprocess.run(
["/lib/libc.so.6", "--version"],
capture_output = True,
text = True
)
"""
outputs = {
"status": "done",
"result": result.stdout
}
return outputs
|