Skip to content

Make support of remote in command line optional#446

Merged
stgraber merged 2 commits intolxc:mainfrom
breml:admin-os-support-remote
Oct 28, 2025
Merged

Make support of remote in command line optional#446
stgraber merged 2 commits intolxc:mainfrom
breml:admin-os-support-remote

Conversation

@breml
Copy link
Copy Markdown
Contributor

@breml breml commented Oct 28, 2025

Currently, Operations Center cli does not support passing the remote as command line argument. One has to explicitly switch to the desired remote and then perform the respective commands.

Without the changes in this PR, the description of the admin os commands do look confusing for an Operations Center CLI user, since it mentions the remote argument, which is in fact without any effect.

IMPORTANT: the way, this is currently implemented, this would "break" the implementation in incus cli, since the default (zero) value for SupportsRemote is false and therefore it will remove the mention of remote in incus cli.

I prefer to have these flags with "positive" names, but if we can not do the "breaking" change, then we would need to rename SupportsRemote to something like WithoutRemote. Let me know, what you prefer.

@stgraber
Copy link
Copy Markdown
Member

@breml looks good but there's something missing I think.

We currently allow one optional argument with CheckArgs(0, 1) to the generated List commands as well as to the top level Show command. That argument is only allowed because of the remote, if remotes aren't enabled, all List commands and the top-level command should not allow any argument CheckArgs(0, 0).

@stgraber stgraber enabled auto-merge October 28, 2025 13:56
@stgraber stgraber merged commit a63ae19 into lxc:main Oct 28, 2025
6 of 7 checks passed
@breml breml deleted the admin-os-support-remote branch October 28, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants