Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
7d4fb123
Unverified
Commit
7d4fb123
authored
Jan 08, 2025
by
Jakob Görgen
Browse files
symphony/cli: runner id as optional cli parameter used by state
parent
8f883147
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
symphony/cli/simbricks/cli/__main__.py
symphony/cli/simbricks/cli/__main__.py
+2
-0
symphony/cli/simbricks/cli/state.py
symphony/cli/simbricks/cli/state.py
+2
-1
No files found.
symphony/cli/simbricks/cli/__main__.py
View file @
7d4fb123
...
...
@@ -41,8 +41,10 @@ app.add_typer(runners.app, name="runners")
@
async_cli
()
async
def
amain
(
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
.
runner_id
=
runner_ident
def
main
():
...
...
symphony/cli/simbricks/cli/state.py
View file @
7d4fb123
...
...
@@ -27,6 +27,7 @@ from simbricks.client import BaseClient, AdminClient, NSClient, SimBricksClient,
class
State
:
def
__init__
(
self
):
self
.
namespace
=
""
self
.
runner_id
:
int
=
-
1
self
.
_base_client
:
BaseClient
|
None
=
None
self
.
_admin_client
:
AdminClient
=
None
self
.
_ns_client
:
NSClient
|
None
=
None
...
...
@@ -60,7 +61,7 @@ class State:
@
property
def
runner_client
(
self
):
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment