-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deeper context/username support #133
Comments
Hi @zdykstra!
This was my plan since the beginning, so yes! The contribution would absolutely be welcome :-)
Yes, same answer.
Yes but I would prefer to use a new key, Another option is to use an libvirt user session (
It sounds totally reasonable to me. You may have to play a bit with the Unix permission to be able to have several users writing their VM at the same location. It may be nice to have dynamic image pool, one per user. |
I've been playing with this just a bit, and the current structure of the virt-lightning.yaml file prevents me from making a trivial change to support this. The current format of a list of dictionaries means that I can't readily split top-level config options apart from the list of VMs to create.
To keep full backwards compatibility with existing virt-lightning.yaml files, I'll have to do something like this:
Then when the YAML is read in, look for specific configuration key names, extract the value and then remove them from the list. Otherwise, maybe do something like:
That route (for full backwards compatibility) would require being able to detect which YAML format is used and Do The Right Thing (tm) based on what was found. |
#147 checks off one |
First, I'd like to thank everybody involved with this project!
I'd like to use this on a hypervisor with multiple users. With use of the --context argument, this is generally possible. However, there are a few gotchas that I'd like to smooth over, if patches for these would be accepted.
Allow context to be more easily set. If I create two project directories, with two different virt-lightning.yaml configs in them, they both end up in the same
default
context, unless I explicitly pass --context to all operations. This means that if I'm not careful some day, I'llvl down
in the wrong place and nuke the wrong project. I'd like to add support to set context as a top-level key in virt-lightning.yaml, and use that to help limit the scope of operations more easily.Possibly update the output of
vl status
to show the context, since it can now be read from a config file.Add a config option to enable operating only on VMs that match our username, via vl:username. This way, even if I'm in the same context as another user, I won't be able to see their VMs. By default this would be disabled, but could be enabled via a config.ini flag.
Any additions would keep the current behavior as the default - you'd have to opt-in to these modifications via config.ini adjustments. Let me know your thoughts on this.
The text was updated successfully, but these errors were encountered: