-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add QueryDisks #255
Add QueryDisks #255
Conversation
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
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.
Some minor corrections needed
govcd/disk.go
Outdated
func (vdc *Vdc) QueryDisks(diskName string) (*[]*types.DiskRecordType, error) { | ||
|
||
if diskName == "" { | ||
return nil, fmt.Errorf("disk name can not be empty") |
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.
"can not" => "can't"
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.
updated
govcd/disk.go
Outdated
|
||
results, err := vdc.QueryWithNotEncodedParams(nil, map[string]string{"type": typeMedia, "filter": "name==" + url.QueryEscape(diskName)}) | ||
if err != nil { | ||
return nil, fmt.Errorf("error querying disk %#v", err) |
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.
"%#v" => "%s"
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.
updated
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
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.
LGTM
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.
One comment not set as per go doc standard
Signed-off-by: Vaidotas Bauzys <vbauzys@vmware.com>
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.
LGTM and I think it's the first use case of *[]*
in our code base ;)
Add QueryDisks (vmware#255)
Function needed to handle independent disk read/import by Id