"include/ck/utility/sequence.hpp" did not exist on "51884fc21412b1800bb85b28c0f5a0b651d23cef"
Unverified Commit 7d4fb123 authored by Jakob Görgen's avatar Jakob Görgen
Browse files

symphony/cli: runner id as optional cli parameter used by state

parent 8f883147
...@@ -41,8 +41,10 @@ app.add_typer(runners.app, name="runners") ...@@ -41,8 +41,10 @@ app.add_typer(runners.app, name="runners")
@async_cli() @async_cli()
async def amain( async def amain(
ns: Annotated[str, Option(help="Namespace to operate in.")] = "foo/bar/baz", ns: Annotated[str, Option(help="Namespace to operate in.")] = "foo/bar/baz",
runner_ident: Annotated[int, Option(help="Runner ident to operate on.")] = -1,
): ):
state.namespace = ns state.namespace = ns
state.runner_id = runner_ident
def main(): def main():
......
...@@ -27,6 +27,7 @@ from simbricks.client import BaseClient, AdminClient, NSClient, SimBricksClient, ...@@ -27,6 +27,7 @@ from simbricks.client import BaseClient, AdminClient, NSClient, SimBricksClient,
class State: class State:
def __init__(self): def __init__(self):
self.namespace = "" self.namespace = ""
self.runner_id: int = -1
self._base_client: BaseClient | None = None self._base_client: BaseClient | None = None
self._admin_client: AdminClient = None self._admin_client: AdminClient = None
self._ns_client: NSClient | None = None self._ns_client: NSClient | None = None
...@@ -60,7 +61,7 @@ class State: ...@@ -60,7 +61,7 @@ class State:
@property @property
def runner_client(self): def runner_client(self):
if self._runner_client is None: if self._runner_client is None:
self._runner_client = RunnerClient(self.ns_client, id=-1) self._runner_client = RunnerClient(self.ns_client, id=self.runner_id)
return self._runner_client return self._runner_client
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment