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

Doc: Add API instructions to instances how-tos #12831

Merged
merged 12 commits into from Feb 21, 2024

Conversation

ru-fu
Copy link
Contributor

@ru-fu ru-fu commented Feb 7, 2024

Add API instructions for the different how-tos and clean up the ones that we already had.

@github-actions github-actions bot added the Documentation Documentation needs updating label Feb 7, 2024
@tomponline tomponline changed the title Add API instructions to instances how-tos Doc: Add API instructions to instances how-tos Feb 8, 2024
@tomponline
Copy link
Member

Needs a rebase please

Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
Exempt keys marked up with {kbd}`xxx`.

Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>

lxc query --request PATCH /1.0/instances/<instance_name> --data '{
"config": {
"cloud-init.user-data": "'"$(awk -v ORS='\\n' '1' cloud-init.txt)"'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this awk line do btw?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It replaces the line breaks with \n and thus converts the file into a one-line string.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the 1 bit for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to get some help on this one, since I got the line from Google ... seems to make sense. ;)

image

Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're going to be the go-to LXD API expert by the time you've finished this work. :)

@tomponline tomponline merged commit aee951a into canonical:main Feb 21, 2024
27 checks passed
@ru-fu ru-fu deleted the LXD-561-instances-API branch February 21, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation needs updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants