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

PR for Issue 78 #107

Merged
merged 12 commits into from
Oct 11, 2016
Merged

PR for Issue 78 #107

merged 12 commits into from
Oct 11, 2016

Conversation

robertojrojas
Copy link
Contributor

I added 3 examples. Let me know if you'd like to change anything.

Copy link
Contributor

@mdlayher mdlayher left a comment

Choose a reason for hiding this comment

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

Thanks for this, I really appreciate the time and effort you have put in.

A lot of what I added are stylistic comments. Should be fairly easy to clean up though.

@@ -0,0 +1,125 @@
# go-qemu examples
Copy link
Contributor

Choose a reason for hiding this comment

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

Mind breaking the long lines in this file to ~80 characters each?

Makes it easier to edit for those of us who use vim and such.


This folder contains example applications that demonstrate the use of the go-qemu and go-qemu/hypervisor packages.

If the program is executed using the **"unix"** named network (i.e locally from the hypervisor host), the user under which the program executes on needs belong to 'libvirtd' group
Copy link
Contributor

@mdlayher mdlayher Oct 10, 2016

Choose a reason for hiding this comment

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

Use backticks (`) to wrap the bolded portion instead of bold with quotes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Add a period at the end of the sentence.

This folder contains example applications that demonstrate the use of the go-qemu and go-qemu/hypervisor packages.

If the program is executed using the **"unix"** named network (i.e locally from the hypervisor host), the user under which the program executes on needs belong to 'libvirtd' group
so the account has access to **'/var/run/libvirt/libvirt-sock'**
Copy link
Contributor

@mdlayher mdlayher Oct 10, 2016

Choose a reason for hiding this comment

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

Use backticks (`) to wrap the bolded portion instead of bold with quotes.

If the program is executed using the **"unix"** named network (i.e locally from the hypervisor host), the user under which the program executes on needs belong to 'libvirtd' group
so the account has access to **'/var/run/libvirt/libvirt-sock'**

In case of executing the program remotely and connecting thru **"tcp"**, you could configure libvirtd on the hypervisor host to allow tcp connections. Of course, this is not secured.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use backticks (`) to wrap the bolded portion instead of bold with quotes.


In case of executing the program remotely and connecting thru **"tcp"**, you could configure libvirtd on the hypervisor host to allow tcp connections. Of course, this is not secured.

To see the list of posible arguments for each program, use **--help**
Copy link
Contributor

Choose a reason for hiding this comment

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

Use backticks (`) to wrap the bolded portion instead of bold with quotes.

Add a period at the end of this sentence.

flag.Parse()

fmt.Printf("\nConnecting to %s://%s\n", *network, *address)
connGenerator := func() (net.Conn, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's call this newConn to match the godocs.

}

fmt.Println("Domain should be Shut off now")

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove empty line.

fmt.Printf("%s\n", dom.Name)
}
fmt.Printf("\n***************************\n")

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove empty line.

flag.Parse()

fmt.Printf("\nConnecting to %s://%s\n", *network, *address)
connGenerator := func() (net.Conn, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's call this newConn to match the godocs.

log.Fatalf("Unable to power down domain: %v\n", err)
}

fmt.Println("Domain should be Shut off now")
Copy link
Contributor

Choose a reason for hiding this comment

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

Lowercase: "shut"

@robertojrojas
Copy link
Contributor Author

You're welcome! It was fun working on this. In fact, it encouraged me to look at issue 30. I'll probably have some questions about it.

@mdlayher mdlayher merged commit a98f5f6 into digitalocean:master Oct 11, 2016
@robertojrojas robertojrojas deleted the issue_78 branch October 11, 2016 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants