-
Notifications
You must be signed in to change notification settings - Fork 86
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
PR for Issue 78 #107
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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'** |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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** |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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") | ||
|
There was a problem hiding this comment.
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") | ||
|
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lowercase: "shut"
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. |
I added 3 examples. Let me know if you'd like to change anything.