mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-04-26 06:02:09 -04:00
Update go-cloudstack dependency
This commit is contained in:
10
vendor/github.com/xanzy/go-cloudstack/cloudstack/HypervisorService.go
generated
vendored
10
vendor/github.com/xanzy/go-cloudstack/cloudstack/HypervisorService.go
generated
vendored
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright 2014, Sander van Harmelen
|
||||
// Copyright 2016, Sander van Harmelen
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -236,12 +236,18 @@ func (s *HypervisorService) NewListHypervisorCapabilitiesParams() *ListHyperviso
|
||||
}
|
||||
|
||||
// This is a courtesy helper function, which in some cases may not work as expected!
|
||||
func (s *HypervisorService) GetHypervisorCapabilityByID(id string) (*HypervisorCapability, int, error) {
|
||||
func (s *HypervisorService) GetHypervisorCapabilityByID(id string, opts ...OptionFunc) (*HypervisorCapability, int, error) {
|
||||
p := &ListHypervisorCapabilitiesParams{}
|
||||
p.p = make(map[string]interface{})
|
||||
|
||||
p.p["id"] = id
|
||||
|
||||
for _, fn := range opts {
|
||||
if err := fn(s.cs, p); err != nil {
|
||||
return nil, -1, err
|
||||
}
|
||||
}
|
||||
|
||||
l, err := s.ListHypervisorCapabilities(p)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user