On Thu, Aug 28, 2014 at 05:56:29PM -0700, Kevin LaTona wrote:
> 
> On Aug 27, 2014, at 7:20 PM, Stéphane Graber <[email protected]> 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.

> 
> Thanks
> -Kevin
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> lxc-users mailing list
> [email protected]
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

Attachment: signature.asc
Description: Digital signature

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to