Skip to content

Add support for overriding config/devices on import#2475

Merged
stgraber merged 5 commits intolxc:mainfrom
heldergomes:feat/enable-config-on-backup
Sep 16, 2025
Merged

Add support for overriding config/devices on import#2475
stgraber merged 5 commits intolxc:mainfrom
heldergomes:feat/enable-config-on-backup

Conversation

@heldergomes
Copy link
Contributor

No description provided.

@heldergomes
Copy link
Contributor Author

well, I'd like to add few key points here.

  • I read on incus documentation the following sentence: When updating strings in the CLI tool (cmd/), you may need a commit to update the templates, so I assumed that I should run make i18n, is it right?

  • The device/config parser, which transform string[] into map[string], are basically the same as copy feature, is there any place on the project where can I move on, in order to reuse the code?

  • Wasn't clear for me if is there any unit test which I have to implement, if so, let me know!

@heldergomes heldergomes force-pushed the feat/enable-config-on-backup branch from 9f09c79 to c6d4104 Compare September 15, 2025 12:59
@stgraber stgraber force-pushed the feat/enable-config-on-backup branch 2 times, most recently from d393cb4 to 91ba22c Compare September 16, 2025 21:01
@heldergomes
Copy link
Contributor Author

I was thinking, what if we add a new file = /shared/util/cmd.go and move the configMap/deviceMap parser, which is shared in incus/copy and incusd/instances_post, is it reasonable?

@stgraber stgraber changed the title Feat/enable override config and device for import backup Add support for overriding config/devices on import Sep 16, 2025
stgraber and others added 5 commits September 16, 2025 18:45
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Helder Ardachnikoff Gomes <helder.versatti@gmail.com>
Closes lxc#1928

Signed-off-by: Helder Ardachnikoff Gomes <helder.versatti@gmail.com>
Signed-off-by: Helder Ardachnikoff Gomes <helder.versatti@gmail.com>
Signed-off-by: Helder Ardachnikoff Gomes <helder.versatti@gmail.com>
@stgraber stgraber force-pushed the feat/enable-config-on-backup branch from 91ba22c to c6b6045 Compare September 16, 2025 22:45
@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Sep 16, 2025
@stgraber
Copy link
Member

I was thinking, what if we add a new file = /shared/util/cmd.go and move the configMap/deviceMap parser, which is shared in incus/copy and incusd/instances_post, is it reasonable?

I missed that comment. Yeah, we can do that.
I'm happy with the PR as it is now so we can merge it, but removing the duplication in a follow-up would be good.

Package wise that may make more sense in internal/instance.

@stgraber stgraber merged commit ffbb9bf into lxc:main Sep 16, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Changes to the REST API Documentation Documentation needs updating

Development

Successfully merging this pull request may close these issues.

2 participants