Declare Daemon Resources

This tutorial uses DaemonResources.add to declare one local workstation resource, list the matching resource, and remove it. It does not start the daemon.

Run the tutorial from the tutorial root:

python execution_runtime/daemon/02_resources/run.py

Python File

"""Declare, inspect, and remove a local workstation resource."""

import jcmsuite
from jcmsuite.daemon import Workstation

daemon = jcmsuite.daemon.handler()
workstation = Workstation(hostname="localhost")

daemon.resources.add(workstation)

print(daemon.resources.list())
print(daemon.resources.delete(kind="workstation", hostname="localhost"))
print(daemon.resources.list())