mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-04-25 21:01:12 -04:00
Update go-cloudstack dependency
This commit is contained in:
24
vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkOfferingService.go
generated
vendored
24
vendor/github.com/xanzy/go-cloudstack/cloudstack/NetworkOfferingService.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.
|
||||
@@ -808,12 +808,18 @@ func (s *NetworkOfferingService) NewListNetworkOfferingsParams() *ListNetworkOff
|
||||
}
|
||||
|
||||
// This is a courtesy helper function, which in some cases may not work as expected!
|
||||
func (s *NetworkOfferingService) GetNetworkOfferingID(name string) (string, error) {
|
||||
func (s *NetworkOfferingService) GetNetworkOfferingID(name string, opts ...OptionFunc) (string, error) {
|
||||
p := &ListNetworkOfferingsParams{}
|
||||
p.p = make(map[string]interface{})
|
||||
|
||||
p.p["name"] = name
|
||||
|
||||
for _, fn := range opts {
|
||||
if err := fn(s.cs, p); err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
l, err := s.ListNetworkOfferings(p)
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -838,13 +844,13 @@ func (s *NetworkOfferingService) GetNetworkOfferingID(name string) (string, erro
|
||||
}
|
||||
|
||||
// This is a courtesy helper function, which in some cases may not work as expected!
|
||||
func (s *NetworkOfferingService) GetNetworkOfferingByName(name string) (*NetworkOffering, int, error) {
|
||||
id, err := s.GetNetworkOfferingID(name)
|
||||
func (s *NetworkOfferingService) GetNetworkOfferingByName(name string, opts ...OptionFunc) (*NetworkOffering, int, error) {
|
||||
id, err := s.GetNetworkOfferingID(name, opts...)
|
||||
if err != nil {
|
||||
return nil, -1, err
|
||||
}
|
||||
|
||||
r, count, err := s.GetNetworkOfferingByID(id)
|
||||
r, count, err := s.GetNetworkOfferingByID(id, opts...)
|
||||
if err != nil {
|
||||
return nil, count, err
|
||||
}
|
||||
@@ -852,12 +858,18 @@ func (s *NetworkOfferingService) GetNetworkOfferingByName(name string) (*Network
|
||||
}
|
||||
|
||||
// This is a courtesy helper function, which in some cases may not work as expected!
|
||||
func (s *NetworkOfferingService) GetNetworkOfferingByID(id string) (*NetworkOffering, int, error) {
|
||||
func (s *NetworkOfferingService) GetNetworkOfferingByID(id string, opts ...OptionFunc) (*NetworkOffering, int, error) {
|
||||
p := &ListNetworkOfferingsParams{}
|
||||
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.ListNetworkOfferings(p)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), fmt.Sprintf(
|
||||
|
||||
Reference in New Issue
Block a user