Skip to content
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

Updated example of profile updating and saving #372

Merged
merged 1 commit into from
Aug 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions doc/source/profiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ methods:
Profile attributes
------------------

- `config` - config options for containers
- `description` - The description of the profile
- `devices` - device options for containers
- `name` - The name of the profile
- `used_by` - A list of containers using this profile
- `config` - (dict) config options for containers
- `description` - (str) The description of the profile
- `devices` - (dict) device options for containers
- `name` - (str) name of the profile
- `used_by` - (list) containers using this profile


Profile methods
Expand All @@ -51,8 +51,9 @@ Containers and Images. Profiles are keyed on a unique name.

The profile can then be modified and saved.

>>> profile.config = profile.config.update({'security.nesting': 'true'})
>>> profile.update()
>>> profile.config.update({'security.nesting': 'true'})
>>> profile.devices.update({"eth0": {"parent": "lxdbr0", "nictype": "bridged", "type": "nic", "name": "eth0"}})
>>> profile.save()


To create a new profile, use `create` with a name, and optional `config`
Expand Down