[lxc-users] Config settings and Python LXC Api calls

Kevin LaTona lists at studiosola.com
Fri Aug 29 03:25:23 UTC 2014



Yes… of course… I was verfying I did not miss it ……… as I was walking thru the Plugin code looking around.

I tend to read and parse what is in a file vs looping thru 50 Key name options to figure what is in a file vs not.

Guess it's not a big deal….. just another way to get at what is in there.

Some days one just has to ask to verify.

Nice work on this Python plugin by the way…. hard to believe more folks are not using it.

-Kevin



On Aug 28, 2014, at 6:10 PM, Stéphane Graber <stgraber at ubuntu.com> wrote:
> On Thu, Aug 28, 2014 at 05:56:29PM -0700, Kevin LaTona wrote:
>> 
>> On Aug 27, 2014, at 7:20 PM, Stéphane Graber <stgraber at ubuntu.com> wrote:
>>> On Wed, Aug 27, 2014 at 06:36:20PM -0700, Kevin LaTona wrote:
>>>> Question 2……Python LXC Api calls
>>>> Does any one know if the Python API has a call that parse's all the key names from a container's config file?
>>>> I see a getter and setter for them, but that means I need to know ahead of time what config settings are in a file.
>>>> VS 
>>>> Wanting to be able to read a config file's Keys on the fly and reacting based on that?
>>> load_config
>> 
>> So far not what I am looking for as this returns a boolean saying if a config file is loaded or not.
>> I was looking to see if there was an exisiting API call that would return just the Key names from an existing user's container file.
>> Not sounding like there is anything like that in the Python API yet… time to do a little loop.
> 
> Ah right, there's get_keys() which will get you the full list but that's
> not limited to what you currently have in your config, so you indeed
> need to iterate through those afterwards.






More information about the lxc-users mailing list