From 88ce3a9a43052aa5324d1e1fe48aa4c7629ed42c Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Wed, 7 Feb 2024 17:14:45 -0600 Subject: [PATCH 1/7] Trying out adding some Iter() style functions to make this SDK faster #170 --- examples/cmd/virtual_iter.go | 61 ++++++++++++++++++++++++++++++++++++ services/account.go | 41 ++++++++++++++++++++++++ session/rest.go | 8 +++++ session/session.go | 6 +++- sl/options.go | 15 +++++++-- 5 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 examples/cmd/virtual_iter.go diff --git a/examples/cmd/virtual_iter.go b/examples/cmd/virtual_iter.go new file mode 100644 index 0000000..dea05da --- /dev/null +++ b/examples/cmd/virtual_iter.go @@ -0,0 +1,61 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" + + "github.com/softlayer/softlayer-go/filter" + "github.com/softlayer/softlayer-go/services" + "github.com/softlayer/softlayer-go/session" +) + +func init() { + rootCmd.AddCommand(listVirtCmd) +} + +var listVirtCmd = &cobra.Command{ + Use: "virt-list", + Short: "Lists all VSI on the account", + Long: `Lists all VSI on the account using an iterative aproach.`, + RunE: func(cmd *cobra.Command, args []string) error { + return RunListVirtCmd(cmd, args) + }, +} + +func RunListVirtCmd(cmd *cobra.Command, args []string) error { + + objectMask := "mask[id,hostname,domain,primaryIpAddress,primaryBackendIpAddress]" + // When using a result Limit to break up your API request, its important to include an orderBy objectFilter + // to enforce an order on the query, as the database might not always return results in the same order between + // queries otherwise + filters := filter.New() + filters = append(filters, filter.Path("virtualGuests.id").OrderBy("ASC")) + objectFilter := filters.Build() + // Sets up the session with authentication headers. + sess := session.New() + // uncomment to output API calls as they are made. + sess.Debug = true + + // creates a reference to the service object (SoftLayer_Account) + service := services.GetAccountService(sess) + + // Sets the mask, filter, result limit, and then makes the API call SoftLayer_Account::getHardware() + servers, err := service.Mask(objectMask).Filter(objectFilter).GetVirtualGuestsIter() + if err != nil { + return err + } + fmt.Printf("Id, Hostname, Domain, IP Address\n") + + for _, server := range servers { + ipAddress := "-" + // Servers with a private only connection will not have a primary IP + if server.PrimaryIpAddress != nil { + ipAddress = *server.PrimaryIpAddress + } + fmt.Printf("%v, %v, %v, %v\n", *server.Id, *server.Hostname, *server.Domain, ipAddress) + } + + + return nil +} diff --git a/services/account.go b/services/account.go index d962b41..7e5641b 100644 --- a/services/account.go +++ b/services/account.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -1897,6 +1898,46 @@ func (r Account) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) return } +// Retrieve An account's associated virtual guest objects in pages +func (r Account) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + + limit := 2 + // r.Session.Debug = true + if r.Options.Limit == nil { + r = r.Limit(limit) + } + // Get the first result set to find out how many total results we have to get through. + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + // how many api calls we have to make still. + apicalls := r.Options.GetRemainingAPICalls() + fmt.Printf(" (%v -%v) / %v = %v \n", r.Options.TotalItems, limit, limit, apicalls) + // First call returned all items (or none) and we are done. + if apicalls < 1 { + return + } + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + // Makes a copy of the options, because doing a go routine will have &r.Optoins all be the same. + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return + +} + // Retrieve An account's associated virtual guest objects currently over bandwidth allocation. func (r Account) GetVirtualGuestsOverBandwidthAllocation() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsOverBandwidthAllocation", nil, &r.Options, &resp) diff --git a/session/rest.go b/session/rest.go index 856a475..a269f7b 100644 --- a/session/rest.go +++ b/session/rest.go @@ -283,9 +283,17 @@ func makeHTTPRequest( defer resp.Body.Close() responseBody, err := ioutil.ReadAll(resp.Body) + if err != nil { return nil, resp.StatusCode, err } + if resp.Header["Softlayer-Total-Items"] != nil && len(resp.Header["Softlayer-Total-Items"]) == 1 { + var str_err error + options.TotalItems, str_err = strconv.Atoi(resp.Header["Softlayer-Total-Items"][0]) + if str_err != nil { + log.Println("[Error] Unable to convert Softlayer-Total-Items to int: ", str_err) + } + } if session.Debug { log.Println("[DEBUG] Status Code: ", resp.StatusCode) diff --git a/session/session.go b/session/session.go index 6b3697c..49e43de 100644 --- a/session/session.go +++ b/session/session.go @@ -262,7 +262,11 @@ func (r *Session) DoRequest(service string, method string, args []interface{}, o r.TransportHandler = getDefaultTransport(r.Endpoint) } - return r.TransportHandler.DoRequest(r, service, method, args, options, pResult) + err := r.TransportHandler.DoRequest(r, service, method, args, options, pResult) + if err != nil { + return err + } + return err } // SetTimeout creates a copy of the session and sets the passed timeout into it diff --git a/sl/options.go b/sl/options.go index 5d1dd0a..394fb8e 100644 --- a/sl/options.go +++ b/sl/options.go @@ -16,12 +16,23 @@ package sl -// Options contains the individual query parameters that can be applied to -// a request. +import ( + "math" +) + +// Options contains the individual query parameters that can be applied to a request. type Options struct { Id *int Mask string Filter string Limit *int Offset *int + TotalItems int +} + +// returns Math.Ciel((TotalItems - Limit) / Limit) +func (opt Options) GetRemainingAPICalls() int { + Total := float64(opt.TotalItems) + Limit := float64(*opt.Limit) + return int(math.Ceil((Total - Limit) / Limit )) } From d5885b7ae214c9993b9aac7af1ff4b930acf6ff3 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Thu, 8 Feb 2024 14:45:43 -0600 Subject: [PATCH 2/7] An Expiremental branch for adding an Iter type call to every method that supports it. --- examples/go.mod | 3 + examples/go.sum | 2 + generator/templates.go | 31 +- go.mod | 1 + go.sum | 1 + services/account.go | 6133 +++++++++++++++++- services/auxiliary.go | 100 + services/billing.go | 2014 +++++- services/brand.go | 394 ++ services/catalyst.go | 145 + services/compliance.go | 25 + services/configuration.go | 265 + services/dns.go | 238 + services/email.go | 73 + services/event.go | 100 + services/flexiblecredit.go | 52 + services/hardware.go | 11275 ++++++++++++++++++++++++++++++++- services/layout.go | 223 + services/locale.go | 220 + services/location.go | 1105 ++++ services/marketplace.go | 103 + services/metric.go | 114 + services/network.go | 11895 ++++++++++++++++++++++++++++++++++- services/notification.go | 577 ++ services/product.go | 2401 +++++++ services/provisioning.go | 235 + services/resource.go | 367 ++ services/sales.go | 49 + services/search.go | 79 + services/security.go | 250 + services/software.go | 505 ++ services/survey.go | 25 + services/tag.go | 151 + services/ticket.go | 608 ++ services/user.go | 3089 ++++++++- services/verify.go | 49 + services/virtual.go | 2250 ++++++- sl/options.go | 12 +- 38 files changed, 45003 insertions(+), 156 deletions(-) diff --git a/examples/go.mod b/examples/go.mod index 4cd8eb9..e62da07 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,6 +2,8 @@ module github.com/softlayer/softlayer-go/examples go 1.21 +replace github.com/softlayer/softlayer-go => ../ + require ( github.com/jarcoal/httpmock v1.0.5 github.com/jedib0t/go-pretty/v6 v6.5.4 @@ -26,6 +28,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.20.0 // indirect + golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/examples/go.sum b/examples/go.sum index a6225fd..f95d294 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -54,6 +54,8 @@ golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= diff --git a/generator/templates.go b/generator/templates.go index e32594f..6851165 100644 --- a/generator/templates.go +++ b/generator/templates.go @@ -120,7 +120,36 @@ import ( {{end}}err = r.Session.DoRequest("{{$rawBase}}", "{{.Name}}", {{if len .Parameters | lt 0}}params{{else}}nil{{end}}, &r.Options, &resp) return } - {{end}} + {{if .TypeArray}} + func (r {{$base}}) {{.Name|titleCase}}Iter({{range .Parameters}}{{phraseMethodArg $methodName .Name .TypeArray .Type}}{{end}}) ({{if .Type|ne "void"}}resp {{if .TypeArray}}[]{{end}}{{convertType .Type "services"}}, {{end}}err error) { + {{if len .Parameters | lt 0}}params := []interface{}{ + {{range .Parameters}}{{.Name|removeReserved}}, + {{end}} + } + {{end}}limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("{{$rawBase}}", "{{.Name}}", {{if len .Parameters | lt 0}}params{{else}}nil{{end}}, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []{{convertType .Type "services"}}{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("{{$rawBase}}", "{{.Name}}", {{if len .Parameters | lt 0}}params{{else}}nil{{end}}, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return + } + {{end }} + {{end }} {{end}} `, license, codegenWarning) diff --git a/go.mod b/go.mod index c322f4d..5ec977a 100644 --- a/go.mod +++ b/go.mod @@ -22,6 +22,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.20.0 // indirect + golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 25e65cb..3c3f033 100644 --- a/go.sum +++ b/go.sum @@ -51,6 +51,7 @@ golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= diff --git a/services/account.go b/services/account.go index 7e5641b..10decb4 100644 --- a/services/account.go +++ b/services/account.go @@ -190,6 +190,30 @@ func (r Account) GetAbuseEmails() (resp []datatypes.Account_AbuseEmail, err erro return } +func (r Account) GetAbuseEmailsIter() (resp []datatypes.Account_AbuseEmail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAbuseEmails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_AbuseEmail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAbuseEmails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns an array of SoftLayer_Container_Network_Storage_Evault_WebCc_JobDetails objects for the given start and end dates. Start and end dates should be be valid ISO 8601 dates. The backupStatus can be one of null, 'success', 'failed', or 'conflict'. The 'success' backupStatus returns jobs with a status of 'COMPLETED', the 'failed' backupStatus returns jobs with a status of 'FAILED', while the 'conflict' backupStatus will return jobs that are not 'COMPLETED' or 'FAILED'. func (r Account) GetAccountBackupHistory(startDate *datatypes.Time, endDate *datatypes.Time, backupStatus *string) (resp []datatypes.Container_Network_Storage_Evault_WebCc_JobDetails, err error) { params := []interface{}{ @@ -201,24 +225,125 @@ func (r Account) GetAccountBackupHistory(startDate *datatypes.Time, endDate *dat return } +func (r Account) GetAccountBackupHistoryIter(startDate *datatypes.Time, endDate *datatypes.Time, backupStatus *string) (resp []datatypes.Container_Network_Storage_Evault_WebCc_JobDetails, err error) { + params := []interface{}{ + startDate, + endDate, + backupStatus, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAccountBackupHistory", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Evault_WebCc_JobDetails{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAccountBackupHistory", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The account contacts on an account. func (r Account) GetAccountContacts() (resp []datatypes.Account_Contact, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAccountContacts", nil, &r.Options, &resp) return } +func (r Account) GetAccountContactsIter() (resp []datatypes.Account_Contact, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAccountContacts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Contact{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAccountContacts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The account software licenses owned by an account func (r Account) GetAccountLicenses() (resp []datatypes.Software_AccountLicense, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAccountLicenses", nil, &r.Options, &resp) return } +func (r Account) GetAccountLicensesIter() (resp []datatypes.Software_AccountLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAccountLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_AccountLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAccountLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetAccountLinks() (resp []datatypes.Account_Link, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAccountLinks", nil, &r.Options, &resp) return } +func (r Account) GetAccountLinksIter() (resp []datatypes.Account_Link, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAccountLinks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Link{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAccountLinks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's status presented in a more detailed data type. func (r Account) GetAccountStatus() (resp datatypes.Account_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAccountStatus", nil, &r.Options, &resp) @@ -246,24 +371,120 @@ func (r Account) GetActiveAccountLicenses() (resp []datatypes.Software_AccountLi return } +func (r Account) GetActiveAccountLicensesIter() (resp []datatypes.Software_AccountLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveAccountLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_AccountLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveAccountLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The active address(es) that belong to an account. func (r Account) GetActiveAddresses() (resp []datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveAddresses", nil, &r.Options, &resp) return } +func (r Account) GetActiveAddressesIter() (resp []datatypes.Account_Address, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Address{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All active agreements for an account func (r Account) GetActiveAgreements() (resp []datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveAgreements", nil, &r.Options, &resp) return } +func (r Account) GetActiveAgreementsIter() (resp []datatypes.Account_Agreement, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveAgreements", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Agreement{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveAgreements", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All billing agreements for an account func (r Account) GetActiveBillingAgreements() (resp []datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveBillingAgreements", nil, &r.Options, &resp) return } +func (r Account) GetActiveBillingAgreementsIter() (resp []datatypes.Account_Agreement, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveBillingAgreements", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Agreement{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveBillingAgreements", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetActiveCatalystEnrollment() (resp datatypes.Catalyst_Enrollment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveCatalystEnrollment", nil, &r.Options, &resp) @@ -276,6 +497,30 @@ func (r Account) GetActiveColocationContainers() (resp []datatypes.Billing_Item, return } +func (r Account) GetActiveColocationContainersIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveColocationContainers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveColocationContainers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [Deprecated] Please use SoftLayer_Account::activeFlexibleCreditEnrollments. func (r Account) GetActiveFlexibleCreditEnrollment() (resp datatypes.FlexibleCredit_Enrollment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveFlexibleCreditEnrollment", nil, &r.Options, &resp) @@ -288,12 +533,60 @@ func (r Account) GetActiveFlexibleCreditEnrollments() (resp []datatypes.Flexible return } +func (r Account) GetActiveFlexibleCreditEnrollmentsIter() (resp []datatypes.FlexibleCredit_Enrollment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveFlexibleCreditEnrollments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.FlexibleCredit_Enrollment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveFlexibleCreditEnrollments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetActiveNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveNotificationSubscribers", nil, &r.Options, &resp) return } +func (r Account) GetActiveNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveNotificationSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveNotificationSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This is deprecated and will not return any results. // Deprecated: This function has been marked as deprecated. func (r Account) GetActiveOutletPackages() (resp []datatypes.Product_Package, err error) { @@ -301,17 +594,65 @@ func (r Account) GetActiveOutletPackages() (resp []datatypes.Product_Package, er return } -// This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information. -// -// Packages that have been retired will not appear in this result set. -func (r Account) GetActivePackages() (resp []datatypes.Product_Package, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getActivePackages", nil, &r.Options, &resp) - return -} - -// This method is deprecated and should not be used in production code. -// -// This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software filtered by an attribute type associated with the package. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information. +func (r Account) GetActiveOutletPackagesIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveOutletPackages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveOutletPackages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information. +// +// Packages that have been retired will not appear in this result set. +func (r Account) GetActivePackages() (resp []datatypes.Product_Package, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getActivePackages", nil, &r.Options, &resp) + return +} + +func (r Account) GetActivePackagesIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActivePackages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActivePackages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// This method is deprecated and should not be used in production code. +// +// This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software filtered by an attribute type associated with the package. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information. // Deprecated: This function has been marked as deprecated. func (r Account) GetActivePackagesByAttribute(attributeKeyName *string) (resp []datatypes.Product_Package, err error) { params := []interface{}{ @@ -321,6 +662,33 @@ func (r Account) GetActivePackagesByAttribute(attributeKeyName *string) (resp [] return } +func (r Account) GetActivePackagesByAttributeIter(attributeKeyName *string) (resp []datatypes.Product_Package, err error) { + params := []interface{}{ + attributeKeyName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActivePackagesByAttribute", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActivePackagesByAttribute", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // [DEPRECATED] This method pulls all the active private hosted cloud packages. This will give you a basic description of the packages that are currently active and from which you can order private hosted cloud configurations. // Deprecated: This function has been marked as deprecated. func (r Account) GetActivePrivateHostedCloudPackages() (resp []datatypes.Product_Package, err error) { @@ -328,36 +696,180 @@ func (r Account) GetActivePrivateHostedCloudPackages() (resp []datatypes.Product return } +func (r Account) GetActivePrivateHostedCloudPackagesIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActivePrivateHostedCloudPackages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActivePrivateHostedCloudPackages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's non-expired quotes. func (r Account) GetActiveQuotes() (resp []datatypes.Billing_Order_Quote, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveQuotes", nil, &r.Options, &resp) return } +func (r Account) GetActiveQuotesIter() (resp []datatypes.Billing_Order_Quote, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveQuotes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Quote{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveQuotes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Active reserved capacity agreements for an account func (r Account) GetActiveReservedCapacityAgreements() (resp []datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveReservedCapacityAgreements", nil, &r.Options, &resp) return } +func (r Account) GetActiveReservedCapacityAgreementsIter() (resp []datatypes.Account_Agreement, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveReservedCapacityAgreements", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Agreement{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveReservedCapacityAgreements", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The virtual software licenses controlled by an account func (r Account) GetActiveVirtualLicenses() (resp []datatypes.Software_VirtualLicense, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveVirtualLicenses", nil, &r.Options, &resp) return } +func (r Account) GetActiveVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getActiveVirtualLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_VirtualLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getActiveVirtualLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated load balancers. func (r Account) GetAdcLoadBalancers() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAdcLoadBalancers", nil, &r.Options, &resp) return } +func (r Account) GetAdcLoadBalancersIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAdcLoadBalancers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAdcLoadBalancers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All the address(es) that belong to an account. func (r Account) GetAddresses() (resp []datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAddresses", nil, &r.Options, &resp) return } +func (r Account) GetAddressesIter() (resp []datatypes.Account_Address, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Address{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An affiliate identifier associated with the customer account. func (r Account) GetAffiliateId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAffiliateId", nil, &r.Options, &resp) @@ -370,27 +882,147 @@ func (r Account) GetAllBillingItems() (resp []datatypes.Billing_Item, err error) return } +func (r Account) GetAllBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAllBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAllBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing items that will be on an account's next invoice. func (r Account) GetAllCommissionBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllCommissionBillingItems", nil, &r.Options, &resp) return } +func (r Account) GetAllCommissionBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAllCommissionBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAllCommissionBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing items that will be on an account's next invoice. func (r Account) GetAllRecurringTopLevelBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItems", nil, &r.Options, &resp) return } +func (r Account) GetAllRecurringTopLevelBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing items that will be on an account's next invoice. Does not consider associated items. func (r Account) GetAllRecurringTopLevelBillingItemsUnfiltered() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItemsUnfiltered", nil, &r.Options, &resp) return } -// Retrieve The billing items that will be on an account's next invoice. -func (r Account) GetAllSubnetBillingItems() (resp []datatypes.Billing_Item, err error) { +func (r Account) GetAllRecurringTopLevelBillingItemsUnfilteredIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItemsUnfiltered", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItemsUnfiltered", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve The billing items that will be on an account's next invoice. +func (r Account) GetAllSubnetBillingItems() (resp []datatypes.Billing_Item, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getAllSubnetBillingItems", nil, &r.Options, &resp) + return +} + +func (r Account) GetAllSubnetBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Account", "getAllSubnetBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAllSubnetBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -400,12 +1032,60 @@ func (r Account) GetAllTopLevelBillingItems() (resp []datatypes.Billing_Item, er return } +func (r Account) GetAllTopLevelBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing items that will be on an account's next invoice. Does not consider associated items. func (r Account) GetAllTopLevelBillingItemsUnfiltered() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItemsUnfiltered", nil, &r.Options, &resp) return } +func (r Account) GetAllTopLevelBillingItemsUnfilteredIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItemsUnfiltered", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItemsUnfiltered", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Indicates whether this account is allowed to silently migrate to use IBMid Authentication. func (r Account) GetAllowIbmIdSilentMigrationFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllowIbmIdSilentMigrationFlag", nil, &r.Options, &resp) @@ -430,6 +1110,30 @@ func (r Account) GetApplicationDeliveryControllers() (resp []datatypes.Network_A return } +func (r Account) GetApplicationDeliveryControllersIter() (resp []datatypes.Network_Application_Delivery_Controller, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getApplicationDeliveryControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getApplicationDeliveryControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a single [[SoftLayer_Account_Attribute]] record by its [[SoftLayer_Account_Attribute_Type|types's]] key name. func (r Account) GetAttributeByType(attributeType *string) (resp datatypes.Account_Attribute, err error) { params := []interface{}{ @@ -445,18 +1149,90 @@ func (r Account) GetAttributes() (resp []datatypes.Account_Attribute, err error) return } +func (r Account) GetAttributesIter() (resp []datatypes.Account_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account) GetAuxiliaryNotifications() (resp []datatypes.Container_Utility_Message, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAuxiliaryNotifications", nil, &r.Options, &resp) return } +func (r Account) GetAuxiliaryNotificationsIter() (resp []datatypes.Container_Utility_Message, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAuxiliaryNotifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_Message{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAuxiliaryNotifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The public network VLANs assigned to an account. func (r Account) GetAvailablePublicNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAvailablePublicNetworkVlans", nil, &r.Options, &resp) return } +func (r Account) GetAvailablePublicNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getAvailablePublicNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getAvailablePublicNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns the average disk space usage for all archive repositories. func (r Account) GetAverageArchiveUsageMetricDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -489,18 +1265,90 @@ func (r Account) GetBandwidthAllotments() (resp []datatypes.Network_Bandwidth_Ve return } +func (r Account) GetBandwidthAllotmentsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The bandwidth allotments for an account currently over allocation. func (r Account) GetBandwidthAllotmentsOverAllocation() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsOverAllocation", nil, &r.Options, &resp) return } +func (r Account) GetBandwidthAllotmentsOverAllocationIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsOverAllocation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsOverAllocation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The bandwidth allotments for an account projected to go over allocation. func (r Account) GetBandwidthAllotmentsProjectedOverAllocation() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsProjectedOverAllocation", nil, &r.Options, &resp) return } +func (r Account) GetBandwidthAllotmentsProjectedOverAllocationIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsProjectedOverAllocation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsProjectedOverAllocation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account) GetBandwidthList(networkType *string, direction *string, startDate *string, endDate *string, serverIds []int) (resp []datatypes.Container_Bandwidth_Usage, err error) { params := []interface{}{ @@ -514,19 +1362,98 @@ func (r Account) GetBandwidthList(networkType *string, direction *string, startD return } -// Retrieve An account's associated bare metal server objects. -func (r Account) GetBareMetalInstances() (resp []datatypes.Hardware, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getBareMetalInstances", nil, &r.Options, &resp) +func (r Account) GetBandwidthListIter(networkType *string, direction *string, startDate *string, endDate *string, serverIds []int) (resp []datatypes.Container_Bandwidth_Usage, err error) { + params := []interface{}{ + networkType, + direction, + startDate, + endDate, + serverIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Bandwidth_Usage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } -// Retrieve All billing agreements for an account -func (r Account) GetBillingAgreements() (resp []datatypes.Account_Agreement, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getBillingAgreements", nil, &r.Options, &resp) +// Retrieve An account's associated bare metal server objects. +func (r Account) GetBareMetalInstances() (resp []datatypes.Hardware, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getBareMetalInstances", nil, &r.Options, &resp) return } -// Retrieve An account's billing information. +func (r Account) GetBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getBareMetalInstances", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getBareMetalInstances", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve All billing agreements for an account +func (r Account) GetBillingAgreements() (resp []datatypes.Account_Agreement, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getBillingAgreements", nil, &r.Options, &resp) + return +} + +func (r Account) GetBillingAgreementsIter() (resp []datatypes.Account_Agreement, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getBillingAgreements", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Agreement{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getBillingAgreements", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve An account's billing information. func (r Account) GetBillingInfo() (resp datatypes.Billing_Info, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBillingInfo", nil, &r.Options, &resp) return @@ -538,6 +1465,30 @@ func (r Account) GetBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_ return } +func (r Account) GetBlockDeviceTemplateGroupsIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getBlockDeviceTemplateGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getBlockDeviceTemplateGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetBluemixAccountId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBluemixAccountId", nil, &r.Options, &resp) @@ -592,18 +1543,90 @@ func (r Account) GetCarts() (resp []datatypes.Billing_Order_Quote, err error) { return } +func (r Account) GetCartsIter() (resp []datatypes.Billing_Order_Quote, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getCarts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Quote{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getCarts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetCatalystEnrollments() (resp []datatypes.Catalyst_Enrollment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getCatalystEnrollments", nil, &r.Options, &resp) return } +func (r Account) GetCatalystEnrollmentsIter() (resp []datatypes.Catalyst_Enrollment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getCatalystEnrollments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Catalyst_Enrollment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getCatalystEnrollments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All closed tickets associated with an account. func (r Account) GetClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getClosedTickets", nil, &r.Options, &resp) return } +func (r Account) GetClosedTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getClosedTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getClosedTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the user record of the user calling the SoftLayer API. func (r Account) GetCurrentUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getCurrentUser", nil, &r.Options, &resp) @@ -616,12 +1639,60 @@ func (r Account) GetDatacentersWithSubnetAllocations() (resp []datatypes.Locatio return } +func (r Account) GetDatacentersWithSubnetAllocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getDatacentersWithSubnetAllocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getDatacentersWithSubnetAllocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated virtual dedicated host objects. func (r Account) GetDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHosts", nil, &r.Options, &resp) return } +func (r Account) GetDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_DedicatedHost{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This returns a collection of dedicated hosts that are valid for a given image template. func (r Account) GetDedicatedHostsForImageTemplate(imageTemplateId *int) (resp []datatypes.Virtual_DedicatedHost, err error) { params := []interface{}{ @@ -631,6 +1702,33 @@ func (r Account) GetDedicatedHostsForImageTemplate(imageTemplateId *int) (resp [ return } +func (r Account) GetDedicatedHostsForImageTemplateIter(imageTemplateId *int) (resp []datatypes.Virtual_DedicatedHost, err error) { + params := []interface{}{ + imageTemplateId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHostsForImageTemplate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_DedicatedHost{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHostsForImageTemplate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating whether payments are processed for this account. func (r Account) GetDisablePaymentProcessingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getDisablePaymentProcessingFlag", nil, &r.Options, &resp) @@ -643,18 +1741,90 @@ func (r Account) GetDisplaySupportRepresentativeAssignments() (resp []datatypes. return } +func (r Account) GetDisplaySupportRepresentativeAssignmentsIter() (resp []datatypes.Account_Attachment_Employee, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getDisplaySupportRepresentativeAssignments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Attachment_Employee{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getDisplaySupportRepresentativeAssignments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The DNS domains associated with an account. func (r Account) GetDomains() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getDomains", nil, &r.Options, &resp) return } +func (r Account) GetDomainsIter() (resp []datatypes.Dns_Domain, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getDomains", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getDomains", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The DNS domains associated with an account that were not created as a result of a secondary DNS zone transfer. func (r Account) GetDomainsWithoutSecondaryDnsRecords() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getDomainsWithoutSecondaryDnsRecords", nil, &r.Options, &resp) return } +func (r Account) GetDomainsWithoutSecondaryDnsRecordsIter() (resp []datatypes.Dns_Domain, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getDomainsWithoutSecondaryDnsRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getDomainsWithoutSecondaryDnsRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Boolean flag dictating whether or not this account has the EU Supported flag. This flag indicates that this account uses IBM Cloud services to process EU citizen's personal data. func (r Account) GetEuSupportedFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getEuSupportedFlag", nil, &r.Options, &resp) @@ -673,24 +1843,120 @@ func (r Account) GetEvaultMasterUsers() (resp []datatypes.Account_Password, err return } -// Retrieve An account's associated EVault storage volumes. -func (r Account) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getEvaultNetworkStorage", nil, &r.Options, &resp) - return -} - +func (r Account) GetEvaultMasterUsersIter() (resp []datatypes.Account_Password, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getEvaultMasterUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Password{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getEvaultMasterUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve An account's associated EVault storage volumes. +func (r Account) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getEvaultNetworkStorage", nil, &r.Options, &resp) + return +} + +func (r Account) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getEvaultNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getEvaultNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Stored security certificates that are expired (ie. SSL) func (r Account) GetExpiredSecurityCertificates() (resp []datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getExpiredSecurityCertificates", nil, &r.Options, &resp) return } +func (r Account) GetExpiredSecurityCertificatesIter() (resp []datatypes.Security_Certificate, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getExpiredSecurityCertificates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Certificate{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getExpiredSecurityCertificates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Logs of who entered a colocation area which is assigned to this account, or when a user under this account enters a datacenter. func (r Account) GetFacilityLogs() (resp []datatypes.User_Access_Facility_Log, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getFacilityLogs", nil, &r.Options, &resp) return } +func (r Account) GetFacilityLogsIter() (resp []datatypes.User_Access_Facility_Log, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getFacilityLogs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Access_Facility_Log{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getFacilityLogs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetFileBlockBetaAccessFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getFileBlockBetaAccessFlag", nil, &r.Options, &resp) @@ -703,6 +1969,30 @@ func (r Account) GetFlexibleCreditEnrollments() (resp []datatypes.FlexibleCredit return } +func (r Account) GetFlexibleCreditEnrollmentsIter() (resp []datatypes.FlexibleCredit_Enrollment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getFlexibleCreditEnrollments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.FlexibleCredit_Enrollment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getFlexibleCreditEnrollments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // [DEPRECATED] Please use SoftLayer_Account::getFlexibleCreditProgramsInfo. // // This method will return a [[SoftLayer_Container_Account_Discount_Program]] object containing the Flexible Credit Program information for this account. To be considered an active participant, the account must have an enrollment record with a monthly credit amount set and the current date must be within the range defined by the enrollment and graduation date. The forNextBillCycle parameter can be set to true to return a SoftLayer_Container_Account_Discount_Program object with information with relation to the next bill cycle. The forNextBillCycle parameter defaults to false. Please note that all discount amount entries are reported as pre-tax amounts and the legacy tax fields in the [[SoftLayer_Container_Account_Discount_Program]] are deprecated. @@ -736,58 +2026,298 @@ func (r Account) GetGlobalIpRecords() (resp []datatypes.Network_Subnet_IpAddress return } +func (r Account) GetGlobalIpRecordsIter() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress_Global{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetGlobalIpv4Records() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv4Records", nil, &r.Options, &resp) return } +func (r Account) GetGlobalIpv4RecordsIter() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv4Records", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress_Global{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv4Records", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetGlobalIpv6Records() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv6Records", nil, &r.Options, &resp) return } +func (r Account) GetGlobalIpv6RecordsIter() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv6Records", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress_Global{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv6Records", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [Deprecated] The global load balancer accounts for a softlayer customer account. func (r Account) GetGlobalLoadBalancerAccounts() (resp []datatypes.Network_LoadBalancer_Global_Account, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getGlobalLoadBalancerAccounts", nil, &r.Options, &resp) return } +func (r Account) GetGlobalLoadBalancerAccountsIter() (resp []datatypes.Network_LoadBalancer_Global_Account, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getGlobalLoadBalancerAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LoadBalancer_Global_Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getGlobalLoadBalancerAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated hardware objects. func (r Account) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardware", nil, &r.Options, &resp) return } +func (r Account) GetHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated hardware objects currently over bandwidth allocation. func (r Account) GetHardwareOverBandwidthAllocation() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareOverBandwidthAllocation", nil, &r.Options, &resp) return } +func (r Account) GetHardwareOverBandwidthAllocationIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareOverBandwidthAllocation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareOverBandwidthAllocation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Return a collection of managed hardware pools. func (r Account) GetHardwarePools() (resp []datatypes.Container_Hardware_Pool_Details, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwarePools", nil, &r.Options, &resp) return } -// Retrieve An account's associated hardware objects projected to go over bandwidth allocation. -func (r Account) GetHardwareProjectedOverBandwidthAllocation() (resp []datatypes.Hardware, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareProjectedOverBandwidthAllocation", nil, &r.Options, &resp) +func (r Account) GetHardwarePoolsIter() (resp []datatypes.Container_Hardware_Pool_Details, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwarePools", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Pool_Details{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwarePools", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } -// Retrieve All hardware associated with an account that has the cPanel web hosting control panel installed. -func (r Account) GetHardwareWithCpanel() (resp []datatypes.Hardware, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithCpanel", nil, &r.Options, &resp) +// Retrieve An account's associated hardware objects projected to go over bandwidth allocation. +func (r Account) GetHardwareProjectedOverBandwidthAllocation() (resp []datatypes.Hardware, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareProjectedOverBandwidthAllocation", nil, &r.Options, &resp) return } -// Retrieve All hardware associated with an account that has the Helm web hosting control panel installed. -func (r Account) GetHardwareWithHelm() (resp []datatypes.Hardware, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithHelm", nil, &r.Options, &resp) - return +func (r Account) GetHardwareProjectedOverBandwidthAllocationIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareProjectedOverBandwidthAllocation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareProjectedOverBandwidthAllocation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve All hardware associated with an account that has the cPanel web hosting control panel installed. +func (r Account) GetHardwareWithCpanel() (resp []datatypes.Hardware, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithCpanel", nil, &r.Options, &resp) + return +} + +func (r Account) GetHardwareWithCpanelIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithCpanel", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithCpanel", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve All hardware associated with an account that has the Helm web hosting control panel installed. +func (r Account) GetHardwareWithHelm() (resp []datatypes.Hardware, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithHelm", nil, &r.Options, &resp) + return +} + +func (r Account) GetHardwareWithHelmIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithHelm", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithHelm", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return } // Retrieve All hardware associated with an account that has McAfee Secure software components. @@ -796,48 +2326,240 @@ func (r Account) GetHardwareWithMcafee() (resp []datatypes.Hardware, err error) return } +func (r Account) GetHardwareWithMcafeeIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafee", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafee", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware associated with an account that has McAfee Secure AntiVirus for Redhat software components. func (r Account) GetHardwareWithMcafeeAntivirusRedhat() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusRedhat", nil, &r.Options, &resp) return } +func (r Account) GetHardwareWithMcafeeAntivirusRedhatIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusRedhat", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusRedhat", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware associated with an account that has McAfee Secure AntiVirus for Windows software components. func (r Account) GetHardwareWithMcafeeAntivirusWindows() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusWindows", nil, &r.Options, &resp) return } +func (r Account) GetHardwareWithMcafeeAntivirusWindowsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusWindows", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusWindows", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware associated with an account that has McAfee Secure Intrusion Detection System software components. func (r Account) GetHardwareWithMcafeeIntrusionDetectionSystem() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeIntrusionDetectionSystem", nil, &r.Options, &resp) return } +func (r Account) GetHardwareWithMcafeeIntrusionDetectionSystemIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeIntrusionDetectionSystem", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeIntrusionDetectionSystem", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware associated with an account that has the Plesk web hosting control panel installed. func (r Account) GetHardwareWithPlesk() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithPlesk", nil, &r.Options, &resp) return } +func (r Account) GetHardwareWithPleskIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithPlesk", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithPlesk", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware associated with an account that has the QuantaStor storage system installed. func (r Account) GetHardwareWithQuantastor() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithQuantastor", nil, &r.Options, &resp) return } +func (r Account) GetHardwareWithQuantastorIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithQuantastor", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithQuantastor", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware associated with an account that has the Urchin web traffic analytics package installed. func (r Account) GetHardwareWithUrchin() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithUrchin", nil, &r.Options, &resp) return } +func (r Account) GetHardwareWithUrchinIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithUrchin", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithUrchin", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware associated with an account that is running a version of the Microsoft Windows operating system. func (r Account) GetHardwareWithWindows() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithWindows", nil, &r.Options, &resp) return } +func (r Account) GetHardwareWithWindowsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithWindows", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithWindows", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Return 1 if one of the account's hardware has the EVault Bare Metal Server Restore Plugin otherwise 0. func (r Account) GetHasEvaultBareMetalRestorePluginFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHasEvaultBareMetalRestorePluginFlag", nil, &r.Options, &resp) @@ -868,15 +2590,87 @@ func (r Account) GetHourlyBareMetalInstances() (resp []datatypes.Hardware, err e return } -// Retrieve Hourly service billing items that will be on an account's next invoice. -func (r Account) GetHourlyServiceBillingItems() (resp []datatypes.Billing_Item, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getHourlyServiceBillingItems", nil, &r.Options, &resp) +func (r Account) GetHourlyBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHourlyBareMetalInstances", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHourlyBareMetalInstances", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } -// Retrieve An account's associated hourly virtual guest objects. -func (r Account) GetHourlyVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getHourlyVirtualGuests", nil, &r.Options, &resp) +// Retrieve Hourly service billing items that will be on an account's next invoice. +func (r Account) GetHourlyServiceBillingItems() (resp []datatypes.Billing_Item, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getHourlyServiceBillingItems", nil, &r.Options, &resp) + return +} + +func (r Account) GetHourlyServiceBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHourlyServiceBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHourlyServiceBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve An account's associated hourly virtual guest objects. +func (r Account) GetHourlyVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getHourlyVirtualGuests", nil, &r.Options, &resp) + return +} + +func (r Account) GetHourlyVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHourlyVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHourlyVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -886,6 +2680,30 @@ func (r Account) GetHubNetworkStorage() (resp []datatypes.Network_Storage, err e return } +func (r Account) GetHubNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getHubNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getHubNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Unique identifier for a customer used throughout IBM. func (r Account) GetIbmCustomerNumber() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getIbmCustomerNumber", nil, &r.Options, &resp) @@ -928,6 +2746,30 @@ func (r Account) GetInternalNotes() (resp []datatypes.Account_Note, err error) { return } +func (r Account) GetInternalNotesIter() (resp []datatypes.Account_Note, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getInternalNotes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Note{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getInternalNotes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Account attribute flag indicating restricted account. func (r Account) GetInternalRestrictionFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getInternalRestrictionFlag", nil, &r.Options, &resp) @@ -940,12 +2782,60 @@ func (r Account) GetInvoices() (resp []datatypes.Billing_Invoice, err error) { return } +func (r Account) GetInvoicesIter() (resp []datatypes.Billing_Invoice, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getInvoices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getInvoices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getIpAddresses", nil, &r.Options, &resp) return } +func (r Account) GetIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetIscsiIsolationDisabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getIscsiIsolationDisabled", nil, &r.Options, &resp) @@ -958,6 +2848,30 @@ func (r Account) GetIscsiNetworkStorage() (resp []datatypes.Network_Storage, err return } +func (r Account) GetIscsiNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getIscsiNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getIscsiNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Computes the number of available public secondary IP addresses, aligned to a subnet size. func (r Account) GetLargestAllowedSubnetCidr(numberOfHosts *int, locationId *int) (resp int, err error) { params := []interface{}{ @@ -986,45 +2900,189 @@ func (r Account) GetLastFiveClosedAbuseTickets() (resp []datatypes.Ticket, err e return } +func (r Account) GetLastFiveClosedAbuseTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAbuseTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAbuseTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The five most recently closed accounting tickets associated with an account. func (r Account) GetLastFiveClosedAccountingTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAccountingTickets", nil, &r.Options, &resp) return } +func (r Account) GetLastFiveClosedAccountingTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAccountingTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAccountingTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The five most recently closed tickets that do not belong to the abuse, accounting, sales, or support groups associated with an account. func (r Account) GetLastFiveClosedOtherTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedOtherTickets", nil, &r.Options, &resp) return } +func (r Account) GetLastFiveClosedOtherTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedOtherTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedOtherTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The five most recently closed sales tickets associated with an account. func (r Account) GetLastFiveClosedSalesTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSalesTickets", nil, &r.Options, &resp) return } +func (r Account) GetLastFiveClosedSalesTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSalesTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSalesTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The five most recently closed support tickets associated with an account. func (r Account) GetLastFiveClosedSupportTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSupportTickets", nil, &r.Options, &resp) return } -// Retrieve The five most recently closed tickets associated with an account. -func (r Account) GetLastFiveClosedTickets() (resp []datatypes.Ticket, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedTickets", nil, &r.Options, &resp) +func (r Account) GetLastFiveClosedSupportTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSupportTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSupportTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } -// Retrieve An account's most recent billing date. -func (r Account) GetLatestBillDate() (resp datatypes.Time, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getLatestBillDate", nil, &r.Options, &resp) +// Retrieve The five most recently closed tickets associated with an account. +func (r Account) GetLastFiveClosedTickets() (resp []datatypes.Ticket, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedTickets", nil, &r.Options, &resp) return } -// Retrieve An account's latest recurring invoice. -func (r Account) GetLatestRecurringInvoice() (resp datatypes.Billing_Invoice, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getLatestRecurringInvoice", nil, &r.Options, &resp) +func (r Account) GetLastFiveClosedTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve An account's most recent billing date. +func (r Account) GetLatestBillDate() (resp datatypes.Time, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getLatestBillDate", nil, &r.Options, &resp) + return +} + +// Retrieve An account's latest recurring invoice. +func (r Account) GetLatestRecurringInvoice() (resp datatypes.Billing_Invoice, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getLatestRecurringInvoice", nil, &r.Options, &resp) return } @@ -1040,6 +3098,30 @@ func (r Account) GetLegacyBandwidthAllotments() (resp []datatypes.Network_Bandwi return } +func (r Account) GetLegacyBandwidthAllotmentsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLegacyBandwidthAllotments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLegacyBandwidthAllotments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The total capacity of Legacy iSCSI Volumes on an account, in GB. func (r Account) GetLegacyIscsiCapacityGB() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLegacyIscsiCapacityGB", nil, &r.Options, &resp) @@ -1052,6 +3134,30 @@ func (r Account) GetLoadBalancers() (resp []datatypes.Network_LoadBalancer_Virtu return } +func (r Account) GetLoadBalancersIter() (resp []datatypes.Network_LoadBalancer_VirtualIpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLoadBalancers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LoadBalancer_VirtualIpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLoadBalancers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The total capacity of Legacy lockbox Volumes on an account, in GB. func (r Account) GetLockboxCapacityGB() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLockboxCapacityGB", nil, &r.Options, &resp) @@ -1064,12 +3170,60 @@ func (r Account) GetLockboxNetworkStorage() (resp []datatypes.Network_Storage, e return } +func (r Account) GetLockboxNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getLockboxNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getLockboxNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetManualPaymentsUnderReview() (resp []datatypes.Billing_Payment_Card_ManualPayment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getManualPaymentsUnderReview", nil, &r.Options, &resp) return } +func (r Account) GetManualPaymentsUnderReviewIter() (resp []datatypes.Billing_Payment_Card_ManualPayment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getManualPaymentsUnderReview", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Payment_Card_ManualPayment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getManualPaymentsUnderReview", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's master user. func (r Account) GetMasterUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getMasterUser", nil, &r.Options, &resp) @@ -1082,6 +3236,30 @@ func (r Account) GetMediaDataTransferRequests() (resp []datatypes.Account_Media_ return } +func (r Account) GetMediaDataTransferRequestsIter() (resp []datatypes.Account_Media_Data_Transfer_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getMediaDataTransferRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Media_Data_Transfer_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getMediaDataTransferRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [DEPRECATED] - An accounts metric tracking object. This object records all periodic polled data available to this account. func (r Account) GetMetricTrackingObject() (resp datatypes.Metric_Tracking_Object, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getMetricTrackingObject", nil, &r.Options, &resp) @@ -1100,24 +3278,120 @@ func (r Account) GetMonthlyBareMetalInstances() (resp []datatypes.Hardware, err return } +func (r Account) GetMonthlyBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyBareMetalInstances", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyBareMetalInstances", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated monthly virtual guest objects. func (r Account) GetMonthlyVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyVirtualGuests", nil, &r.Options, &resp) return } +func (r Account) GetMonthlyVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated NAS storage volumes. func (r Account) GetNasNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNasNetworkStorage", nil, &r.Options, &resp) return } +func (r Account) GetNasNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNasNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNasNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This returns a collection of active NetApp software account license keys. func (r Account) GetNetAppActiveAccountLicenseKeys() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetAppActiveAccountLicenseKeys", nil, &r.Options, &resp) return } +func (r Account) GetNetAppActiveAccountLicenseKeysIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetAppActiveAccountLicenseKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetAppActiveAccountLicenseKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [Deprecated] Whether or not this account can define their own networks. func (r Account) GetNetworkCreationFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkCreationFlag", nil, &r.Options, &resp) @@ -1130,21 +3404,117 @@ func (r Account) GetNetworkGateways() (resp []datatypes.Network_Gateway, err err return } +func (r Account) GetNetworkGatewaysIter() (resp []datatypes.Network_Gateway, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkGateways", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkGateways", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated network hardware. func (r Account) GetNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkHardware", nil, &r.Options, &resp) return } -// Retrieve -func (r Account) GetNetworkMessageDeliveryAccounts() (resp []datatypes.Network_Message_Delivery, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMessageDeliveryAccounts", nil, &r.Options, &resp) +func (r Account) GetNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } -// Retrieve Hardware which is currently experiencing a service failure. -func (r Account) GetNetworkMonitorDownHardware() (resp []datatypes.Hardware, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownHardware", nil, &r.Options, &resp) +// Retrieve +func (r Account) GetNetworkMessageDeliveryAccounts() (resp []datatypes.Network_Message_Delivery, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMessageDeliveryAccounts", nil, &r.Options, &resp) + return +} + +func (r Account) GetNetworkMessageDeliveryAccountsIter() (resp []datatypes.Network_Message_Delivery, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMessageDeliveryAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Message_Delivery{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMessageDeliveryAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve Hardware which is currently experiencing a service failure. +func (r Account) GetNetworkMonitorDownHardware() (resp []datatypes.Hardware, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownHardware", nil, &r.Options, &resp) + return +} + +func (r Account) GetNetworkMonitorDownHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -1154,48 +3524,240 @@ func (r Account) GetNetworkMonitorDownVirtualGuests() (resp []datatypes.Virtual_ return } +func (r Account) GetNetworkMonitorDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Hardware which is currently recovering from a service failure. func (r Account) GetNetworkMonitorRecoveringHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringHardware", nil, &r.Options, &resp) return } +func (r Account) GetNetworkMonitorRecoveringHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Virtual guest which is currently recovering from a service failure. func (r Account) GetNetworkMonitorRecoveringVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringVirtualGuests", nil, &r.Options, &resp) return } +func (r Account) GetNetworkMonitorRecoveringVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Hardware which is currently online. func (r Account) GetNetworkMonitorUpHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpHardware", nil, &r.Options, &resp) return } +func (r Account) GetNetworkMonitorUpHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Virtual guest which is currently online. func (r Account) GetNetworkMonitorUpVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpVirtualGuests", nil, &r.Options, &resp) return } +func (r Account) GetNetworkMonitorUpVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated storage volumes. This includes Lockbox, NAS, EVault, and iSCSI volumes. func (r Account) GetNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorage", nil, &r.Options, &resp) return } +func (r Account) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's Network Storage groups. func (r Account) GetNetworkStorageGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorageGroups", nil, &r.Options, &resp) return } +func (r Account) GetNetworkStorageGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve IPSec network tunnels for an account. func (r Account) GetNetworkTunnelContexts() (resp []datatypes.Network_Tunnel_Module_Context, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkTunnelContexts", nil, &r.Options, &resp) return } +func (r Account) GetNetworkTunnelContextsIter() (resp []datatypes.Network_Tunnel_Module_Context, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkTunnelContexts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Tunnel_Module_Context{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkTunnelContexts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not an account has automatic private VLAN spanning enabled. func (r Account) GetNetworkVlanSpan() (resp datatypes.Account_Network_Vlan_Span, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkVlanSpan", nil, &r.Options, &resp) @@ -1208,12 +3770,60 @@ func (r Account) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { return } +func (r Account) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve DEPRECATED - This information can be pulled directly through tapping keys now - DEPRECATED. The allotments for this account and their servers for the next billing cycle. The public inbound and outbound bandwidth is calculated for each server in addition to the daily average network traffic since the last billing date. func (r Account) GetNextBillingPublicAllotmentHardwareBandwidthDetails() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNextBillingPublicAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) return } +func (r Account) GetNextBillingPublicAllotmentHardwareBandwidthDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNextBillingPublicAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNextBillingPublicAllotmentHardwareBandwidthDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Return an account's next invoice in a Microsoft excel format. The "next invoice" is what a customer will be billed on their next invoice, assuming no changes are made. Currently this does not include Bandwidth Pooling charges. func (r Account) GetNextInvoiceExcel(documentCreateDate *datatypes.Time) (resp []byte, err error) { params := []interface{}{ @@ -1259,13 +3869,37 @@ func (r Account) GetNextInvoiceTopLevelBillingItems() (resp []datatypes.Billing_ return } -// Retrieve The pre-tax total amount of an account's next invoice measured in US Dollars ($USD), assuming no changes or charges occur between now and time of billing. -func (r Account) GetNextInvoiceTotalAmount() (resp datatypes.Float64, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceTotalAmount", nil, &r.Options, &resp) - return -} - -// Retrieve The total one-time charge amount of an account's next invoice measured in US Dollars ($USD), assuming no changes or charges occur between now and time of billing. +func (r Account) GetNextInvoiceTopLevelBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceTopLevelBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceTopLevelBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve The pre-tax total amount of an account's next invoice measured in US Dollars ($USD), assuming no changes or charges occur between now and time of billing. +func (r Account) GetNextInvoiceTotalAmount() (resp datatypes.Float64, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceTotalAmount", nil, &r.Options, &resp) + return +} + +// Retrieve The total one-time charge amount of an account's next invoice measured in US Dollars ($USD), assuming no changes or charges occur between now and time of billing. func (r Account) GetNextInvoiceTotalOneTimeAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceTotalOneTimeAmount", nil, &r.Options, &resp) return @@ -1307,12 +3941,60 @@ func (r Account) GetNextInvoiceZeroFeeItemCounts() (resp []datatypes.Container_P return } +func (r Account) GetNextInvoiceZeroFeeItemCountsIter() (resp []datatypes.Container_Product_Item_Category_ZeroFee_Count, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceZeroFeeItemCounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Product_Item_Category_ZeroFee_Count{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceZeroFeeItemCounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNotificationSubscribers", nil, &r.Options, &resp) return } +func (r Account) GetNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getNotificationSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getNotificationSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Account object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Account service. You can only retrieve the account that your portal user is assigned to. func (r Account) GetObject() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getObject", nil, &r.Options, &resp) @@ -1325,69 +4007,357 @@ func (r Account) GetOpenAbuseTickets() (resp []datatypes.Ticket, err error) { return } +func (r Account) GetOpenAbuseTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenAbuseTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenAbuseTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The open accounting tickets associated with an account. func (r Account) GetOpenAccountingTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenAccountingTickets", nil, &r.Options, &resp) return } +func (r Account) GetOpenAccountingTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenAccountingTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenAccountingTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The open billing tickets associated with an account. func (r Account) GetOpenBillingTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenBillingTickets", nil, &r.Options, &resp) return } +func (r Account) GetOpenBillingTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenBillingTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenBillingTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An open ticket requesting cancellation of this server, if one exists. func (r Account) GetOpenCancellationRequests() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenCancellationRequests", nil, &r.Options, &resp) return } +func (r Account) GetOpenCancellationRequestsIter() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenCancellationRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Cancellation_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenCancellationRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The open tickets that do not belong to the abuse, accounting, sales, or support groups associated with an account. func (r Account) GetOpenOtherTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenOtherTickets", nil, &r.Options, &resp) return } +func (r Account) GetOpenOtherTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenOtherTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenOtherTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's recurring invoices. func (r Account) GetOpenRecurringInvoices() (resp []datatypes.Billing_Invoice, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenRecurringInvoices", nil, &r.Options, &resp) return } +func (r Account) GetOpenRecurringInvoicesIter() (resp []datatypes.Billing_Invoice, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenRecurringInvoices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenRecurringInvoices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The open sales tickets associated with an account. func (r Account) GetOpenSalesTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenSalesTickets", nil, &r.Options, &resp) return } +func (r Account) GetOpenSalesTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenSalesTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenSalesTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetOpenStackAccountLinks() (resp []datatypes.Account_Link, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackAccountLinks", nil, &r.Options, &resp) return } +func (r Account) GetOpenStackAccountLinksIter() (resp []datatypes.Account_Link, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackAccountLinks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Link{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackAccountLinks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated Openstack related Object Storage accounts. func (r Account) GetOpenStackObjectStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackObjectStorage", nil, &r.Options, &resp) return } +func (r Account) GetOpenStackObjectStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackObjectStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackObjectStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The open support tickets associated with an account. func (r Account) GetOpenSupportTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenSupportTickets", nil, &r.Options, &resp) return } -// Retrieve All open tickets associated with an account. -func (r Account) GetOpenTickets() (resp []datatypes.Ticket, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getOpenTickets", nil, &r.Options, &resp) +func (r Account) GetOpenSupportTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenSupportTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenSupportTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve All open tickets associated with an account. +func (r Account) GetOpenTickets() (resp []datatypes.Ticket, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getOpenTickets", nil, &r.Options, &resp) + return +} + +func (r Account) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOpenTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve All open tickets associated with an account last edited by an employee. +func (r Account) GetOpenTicketsWaitingOnCustomer() (resp []datatypes.Ticket, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getOpenTicketsWaitingOnCustomer", nil, &r.Options, &resp) return } -// Retrieve All open tickets associated with an account last edited by an employee. -func (r Account) GetOpenTicketsWaitingOnCustomer() (resp []datatypes.Ticket, err error) { +func (r Account) GetOpenTicketsWaitingOnCustomerIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Account", "getOpenTicketsWaitingOnCustomer", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOpenTicketsWaitingOnCustomer", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -1397,42 +4367,210 @@ func (r Account) GetOrders() (resp []datatypes.Billing_Order, err error) { return } +func (r Account) GetOrdersIter() (resp []datatypes.Billing_Order, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOrders", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOrders", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing items that have no parent billing item. These are items that don't necessarily belong to a single server. func (r Account) GetOrphanBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOrphanBillingItems", nil, &r.Options, &resp) return } +func (r Account) GetOrphanBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOrphanBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOrphanBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetOwnedBrands() (resp []datatypes.Brand, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOwnedBrands", nil, &r.Options, &resp) return } +func (r Account) GetOwnedBrandsIter() (resp []datatypes.Brand, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOwnedBrands", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Brand{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOwnedBrands", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetOwnedHardwareGenericComponentModels() (resp []datatypes.Hardware_Component_Model_Generic, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOwnedHardwareGenericComponentModels", nil, &r.Options, &resp) return } +func (r Account) GetOwnedHardwareGenericComponentModelsIter() (resp []datatypes.Hardware_Component_Model_Generic, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getOwnedHardwareGenericComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model_Generic{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getOwnedHardwareGenericComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetPaymentProcessors() (resp []datatypes.Billing_Payment_Processor, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPaymentProcessors", nil, &r.Options, &resp) return } +func (r Account) GetPaymentProcessorsIter() (resp []datatypes.Billing_Payment_Processor, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPaymentProcessors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Payment_Processor{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPaymentProcessors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Before being approved for general use, a credit card must be approved by a SoftLayer agent. Once a credit card change request has been either approved or denied, the change request will no longer appear in the list of pending change requests. This method will return a list of all pending change requests as well as a portion of the data from the original request. func (r Account) GetPendingCreditCardChangeRequestData() (resp []datatypes.Container_Account_Payment_Method_CreditCard, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPendingCreditCardChangeRequestData", nil, &r.Options, &resp) return } +func (r Account) GetPendingCreditCardChangeRequestDataIter() (resp []datatypes.Container_Account_Payment_Method_CreditCard, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPendingCreditCardChangeRequestData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Account_Payment_Method_CreditCard{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPendingCreditCardChangeRequestData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetPendingEvents() (resp []datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPendingEvents", nil, &r.Options, &resp) return } +func (r Account) GetPendingEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPendingEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPendingEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's latest open (pending) invoice. func (r Account) GetPendingInvoice() (resp datatypes.Billing_Invoice, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPendingInvoice", nil, &r.Options, &resp) @@ -1445,6 +4583,30 @@ func (r Account) GetPendingInvoiceTopLevelItems() (resp []datatypes.Billing_Invo return } +func (r Account) GetPendingInvoiceTopLevelItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPendingInvoiceTopLevelItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPendingInvoiceTopLevelItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The total amount of an account's pending invoice, if one exists. func (r Account) GetPendingInvoiceTotalAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPendingInvoiceTotalAmount", nil, &r.Options, &resp) @@ -1481,21 +4643,117 @@ func (r Account) GetPermissionGroups() (resp []datatypes.User_Permission_Group, return } +func (r Account) GetPermissionGroupsIter() (resp []datatypes.User_Permission_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPermissionGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPermissionGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's user roles. func (r Account) GetPermissionRoles() (resp []datatypes.User_Permission_Role, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPermissionRoles", nil, &r.Options, &resp) return } +func (r Account) GetPermissionRolesIter() (resp []datatypes.User_Permission_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPermissionRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPermissionRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated virtual placement groups. func (r Account) GetPlacementGroups() (resp []datatypes.Virtual_PlacementGroup, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPlacementGroups", nil, &r.Options, &resp) return } -// Retrieve -func (r Account) GetPortableStorageVolumes() (resp []datatypes.Virtual_Disk_Image, err error) { +func (r Account) GetPlacementGroupsIter() (resp []datatypes.Virtual_PlacementGroup, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPlacementGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_PlacementGroup{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPlacementGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve +func (r Account) GetPortableStorageVolumes() (resp []datatypes.Virtual_Disk_Image, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getPortableStorageVolumes", nil, &r.Options, &resp) + return +} + +func (r Account) GetPortableStorageVolumesIter() (resp []datatypes.Virtual_Disk_Image, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Account", "getPortableStorageVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Disk_Image{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPortableStorageVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -1505,6 +4763,30 @@ func (r Account) GetPostProvisioningHooks() (resp []datatypes.Provisioning_Hook, return } +func (r Account) GetPostProvisioningHooksIter() (resp []datatypes.Provisioning_Hook, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPostProvisioningHooks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Hook{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPostProvisioningHooks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve (Deprecated) Boolean flag dictating whether or not this account supports PPTP VPN Access. func (r Account) GetPptpVpnAllowedFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPptpVpnAllowedFlag", nil, &r.Options, &resp) @@ -1517,6 +4799,30 @@ func (r Account) GetPptpVpnUsers() (resp []datatypes.User_Customer, err error) { return } +func (r Account) GetPptpVpnUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPptpVpnUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPptpVpnUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The total recurring amount for an accounts previous revenue. func (r Account) GetPreviousRecurringRevenue() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPreviousRecurringRevenue", nil, &r.Options, &resp) @@ -1529,42 +4835,210 @@ func (r Account) GetPriceRestrictions() (resp []datatypes.Product_Item_Price_Acc return } +func (r Account) GetPriceRestrictionsIter() (resp []datatypes.Product_Item_Price_Account_Restriction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPriceRestrictions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price_Account_Restriction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPriceRestrictions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All priority one tickets associated with an account. func (r Account) GetPriorityOneTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPriorityOneTickets", nil, &r.Options, &resp) return } +func (r Account) GetPriorityOneTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPriorityOneTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPriorityOneTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve DEPRECATED - This information can be pulled directly through tapping keys now - DEPRECATED. The allotments for this account and their servers. The private inbound and outbound bandwidth is calculated for each server in addition to the daily average network traffic since the last billing date. func (r Account) GetPrivateAllotmentHardwareBandwidthDetails() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) return } +func (r Account) GetPrivateAllotmentHardwareBandwidthDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateAllotmentHardwareBandwidthDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Private and shared template group objects (parent only) for an account. func (r Account) GetPrivateBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateBlockDeviceTemplateGroups", nil, &r.Options, &resp) return } +func (r Account) GetPrivateBlockDeviceTemplateGroupsIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateBlockDeviceTemplateGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateBlockDeviceTemplateGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetPrivateIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateIpAddresses", nil, &r.Options, &resp) return } +func (r Account) GetPrivateIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The private network VLANs assigned to an account. func (r Account) GetPrivateNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateNetworkVlans", nil, &r.Options, &resp) return } +func (r Account) GetPrivateNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All private subnets associated with an account. func (r Account) GetPrivateSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateSubnets", nil, &r.Options, &resp) return } +func (r Account) GetPrivateSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPrivateSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Boolean flag indicating whether or not this account is a Proof of Concept account. func (r Account) GetProofOfConceptAccountFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getProofOfConceptAccountFlag", nil, &r.Options, &resp) @@ -1577,21 +5051,117 @@ func (r Account) GetPublicAllotmentHardwareBandwidthDetails() (resp []datatypes. return } +func (r Account) GetPublicAllotmentHardwareBandwidthDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPublicAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPublicAllotmentHardwareBandwidthDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetPublicIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPublicIpAddresses", nil, &r.Options, &resp) return } -// Retrieve The public network VLANs assigned to an account. -func (r Account) GetPublicNetworkVlans() (resp []datatypes.Network_Vlan, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getPublicNetworkVlans", nil, &r.Options, &resp) +func (r Account) GetPublicIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPublicIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPublicIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve The public network VLANs assigned to an account. +func (r Account) GetPublicNetworkVlans() (resp []datatypes.Network_Vlan, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getPublicNetworkVlans", nil, &r.Options, &resp) + return +} + +func (r Account) GetPublicNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getPublicNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPublicNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve All public network subnets associated with an account. +func (r Account) GetPublicSubnets() (resp []datatypes.Network_Subnet, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getPublicSubnets", nil, &r.Options, &resp) return } -// Retrieve All public network subnets associated with an account. -func (r Account) GetPublicSubnets() (resp []datatypes.Network_Subnet, err error) { +func (r Account) GetPublicSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Account", "getPublicSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getPublicSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -1601,12 +5171,60 @@ func (r Account) GetQuotes() (resp []datatypes.Billing_Order_Quote, err error) { return } +func (r Account) GetQuotesIter() (resp []datatypes.Billing_Order_Quote, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getQuotes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Quote{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getQuotes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetRecentEvents() (resp []datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRecentEvents", nil, &r.Options, &resp) return } +func (r Account) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getRecentEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getRecentEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Referral Partner for this account, if any. func (r Account) GetReferralPartner() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartner", nil, &r.Options, &resp) @@ -1619,18 +5237,90 @@ func (r Account) GetReferralPartnerCommissionForecast() (resp []datatypes.Contai return } +func (r Account) GetReferralPartnerCommissionForecastIter() (resp []datatypes.Container_Referral_Partner_Commission, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionForecast", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Referral_Partner_Commission{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionForecast", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account) GetReferralPartnerCommissionHistory() (resp []datatypes.Container_Referral_Partner_Commission, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionHistory", nil, &r.Options, &resp) return } +func (r Account) GetReferralPartnerCommissionHistoryIter() (resp []datatypes.Container_Referral_Partner_Commission, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Referral_Partner_Commission{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account) GetReferralPartnerCommissionPending() (resp []datatypes.Container_Referral_Partner_Commission, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionPending", nil, &r.Options, &resp) return } +func (r Account) GetReferralPartnerCommissionPendingIter() (resp []datatypes.Container_Referral_Partner_Commission, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionPending", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Referral_Partner_Commission{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionPending", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Flag indicating if the account was referred. func (r Account) GetReferredAccountFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReferredAccountFlag", nil, &r.Options, &resp) @@ -1643,24 +5333,120 @@ func (r Account) GetReferredAccounts() (resp []datatypes.Account, err error) { return } +func (r Account) GetReferredAccountsIter() (resp []datatypes.Account, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getReferredAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getReferredAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetRegulatedWorkloads() (resp []datatypes.Legal_RegulatedWorkload, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRegulatedWorkloads", nil, &r.Options, &resp) return } +func (r Account) GetRegulatedWorkloadsIter() (resp []datatypes.Legal_RegulatedWorkload, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getRegulatedWorkloads", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Legal_RegulatedWorkload{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getRegulatedWorkloads", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Remote management command requests for an account func (r Account) GetRemoteManagementCommandRequests() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRemoteManagementCommandRequests", nil, &r.Options, &resp) return } +func (r Account) GetRemoteManagementCommandRequestsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getRemoteManagementCommandRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getRemoteManagementCommandRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Replication events for all Network Storage volumes on an account. func (r Account) GetReplicationEvents() (resp []datatypes.Network_Storage_Event, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReplicationEvents", nil, &r.Options, &resp) return } +func (r Account) GetReplicationEventsIter() (resp []datatypes.Network_Storage_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getReplicationEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getReplicationEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Indicates whether newly created users under this account will be associated with IBMid via an email requiring a response, or not. func (r Account) GetRequireSilentIBMidUserCreation() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRequireSilentIBMidUserCreation", nil, &r.Options, &resp) @@ -1673,24 +5459,120 @@ func (r Account) GetReservedCapacityAgreements() (resp []datatypes.Account_Agree return } +func (r Account) GetReservedCapacityAgreementsIter() (resp []datatypes.Account_Agreement, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityAgreements", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Agreement{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityAgreements", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The reserved capacity groups owned by this account. func (r Account) GetReservedCapacityGroups() (resp []datatypes.Virtual_ReservedCapacityGroup, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityGroups", nil, &r.Options, &resp) return } +func (r Account) GetReservedCapacityGroupsIter() (resp []datatypes.Virtual_ReservedCapacityGroup, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_ReservedCapacityGroup{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All Routers that an accounts VLANs reside on func (r Account) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRouters", nil, &r.Options, &resp) return } +func (r Account) GetRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve DEPRECATED func (r Account) GetRwhoisData() (resp []datatypes.Network_Subnet_Rwhois_Data, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRwhoisData", nil, &r.Options, &resp) return } +func (r Account) GetRwhoisDataIter() (resp []datatypes.Network_Subnet_Rwhois_Data, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getRwhoisData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Rwhois_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getRwhoisData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SAML configuration for this account. func (r Account) GetSamlAuthentication() (resp datatypes.Account_Authentication_Saml, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSamlAuthentication", nil, &r.Options, &resp) @@ -1703,18 +5585,90 @@ func (r Account) GetSecondaryDomains() (resp []datatypes.Dns_Secondary, err erro return } +func (r Account) GetSecondaryDomainsIter() (resp []datatypes.Dns_Secondary, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSecondaryDomains", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Secondary{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSecondaryDomains", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Stored security certificates (ie. SSL) func (r Account) GetSecurityCertificates() (resp []datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSecurityCertificates", nil, &r.Options, &resp) return } +func (r Account) GetSecurityCertificatesIter() (resp []datatypes.Security_Certificate, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSecurityCertificates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Certificate{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSecurityCertificates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The security groups belonging to this account. func (r Account) GetSecurityGroups() (resp []datatypes.Network_SecurityGroup, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSecurityGroups", nil, &r.Options, &resp) return } +func (r Account) GetSecurityGroupsIter() (resp []datatypes.Network_SecurityGroup, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSecurityGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_SecurityGroup{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSecurityGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetSecurityLevel() (resp datatypes.Security_Level, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSecurityLevel", nil, &r.Options, &resp) @@ -1727,51 +5681,267 @@ func (r Account) GetSecurityScanRequests() (resp []datatypes.Network_Security_Sc return } +func (r Account) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSecurityScanRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Security_Scanner_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSecurityScanRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The service billing items that will be on an account's next invoice. func (r Account) GetServiceBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getServiceBillingItems", nil, &r.Options, &resp) return } +func (r Account) GetServiceBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getServiceBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getServiceBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns the [[SoftLayer_Virtual_Guest_Block_Device_Template_Group]] objects that have been shared with this account func (r Account) GetSharedBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSharedBlockDeviceTemplateGroups", nil, &r.Options, &resp) return } +func (r Account) GetSharedBlockDeviceTemplateGroupsIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSharedBlockDeviceTemplateGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSharedBlockDeviceTemplateGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Shipments that belong to the customer's account. func (r Account) GetShipments() (resp []datatypes.Account_Shipment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getShipments", nil, &r.Options, &resp) return } +func (r Account) GetShipmentsIter() (resp []datatypes.Account_Shipment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getShipments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Shipment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getShipments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Customer specified SSH keys that can be implemented onto a newly provisioned or reloaded server. func (r Account) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSshKeys", nil, &r.Options, &resp) return } +func (r Account) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated portal users with SSL VPN access. func (r Account) GetSslVpnUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSslVpnUsers", nil, &r.Options, &resp) return } +func (r Account) GetSslVpnUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSslVpnUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSslVpnUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's virtual guest objects that are hosted on a user provisioned hypervisor. func (r Account) GetStandardPoolVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getStandardPoolVirtualGuests", nil, &r.Options, &resp) return } +func (r Account) GetStandardPoolVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getStandardPoolVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getStandardPoolVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve +func (r Account) GetSubnetRegistrationDetails() (resp []datatypes.Account_Regional_Registry_Detail, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrationDetails", nil, &r.Options, &resp) + return +} + +func (r Account) GetSubnetRegistrationDetailsIter() (resp []datatypes.Account_Regional_Registry_Detail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrationDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Regional_Registry_Detail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrationDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve -func (r Account) GetSubnetRegistrationDetails() (resp []datatypes.Account_Regional_Registry_Detail, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrationDetails", nil, &r.Options, &resp) +func (r Account) GetSubnetRegistrations() (resp []datatypes.Network_Subnet_Registration, err error) { + err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrations", nil, &r.Options, &resp) return } -// Retrieve -func (r Account) GetSubnetRegistrations() (resp []datatypes.Network_Subnet_Registration, err error) { +func (r Account) GetSubnetRegistrationsIter() (resp []datatypes.Network_Subnet_Registration, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Registration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -1781,18 +5951,90 @@ func (r Account) GetSubnets() (resp []datatypes.Network_Subnet, err error) { return } +func (r Account) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer employees that an account is assigned to. func (r Account) GetSupportRepresentatives() (resp []datatypes.User_Employee, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSupportRepresentatives", nil, &r.Options, &resp) return } +func (r Account) GetSupportRepresentativesIter() (resp []datatypes.User_Employee, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSupportRepresentatives", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Employee{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSupportRepresentatives", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The active support subscriptions for this account. func (r Account) GetSupportSubscriptions() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSupportSubscriptions", nil, &r.Options, &resp) return } +func (r Account) GetSupportSubscriptionsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getSupportSubscriptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getSupportSubscriptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetSupportTier() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSupportTier", nil, &r.Options, &resp) @@ -1811,6 +6053,30 @@ func (r Account) GetTags() (resp []datatypes.Tag, err error) { return } +func (r Account) GetTagsIter() (resp []datatypes.Tag, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getTags", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getTags", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return a SoftLayer_Container_Account_Discount_Program object containing the Technology Incubator Program information for this account. To be considered an active participant, the account must have an enrollment record with a monthly credit amount set and the current date must be within the range defined by the enrollment and graduation date. The forNextBillCycle parameter can be set to true to return a SoftLayer_Container_Account_Discount_Program object with information with relation to the next bill cycle. The forNextBillCycle parameter defaults to false. func (r Account) GetTechIncubatorProgramInfo(forNextBillCycle *bool) (resp datatypes.Container_Account_Discount_Program, err error) { params := []interface{}{ @@ -1832,48 +6098,240 @@ func (r Account) GetThirdPartyPoliciesAcceptanceStatus() (resp []datatypes.Conta return } +func (r Account) GetThirdPartyPoliciesAcceptanceStatusIter() (resp []datatypes.Container_Policy_Acceptance, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getThirdPartyPoliciesAcceptanceStatus", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Policy_Acceptance{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getThirdPartyPoliciesAcceptanceStatus", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated tickets. func (r Account) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getTickets", nil, &r.Options, &resp) return } +func (r Account) GetTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Tickets closed within the last 72 hours or last 10 tickets, whichever is less, associated with an account. func (r Account) GetTicketsClosedInTheLastThreeDays() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedInTheLastThreeDays", nil, &r.Options, &resp) return } +func (r Account) GetTicketsClosedInTheLastThreeDaysIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedInTheLastThreeDays", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedInTheLastThreeDays", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Tickets closed today associated with an account. func (r Account) GetTicketsClosedToday() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedToday", nil, &r.Options, &resp) return } +func (r Account) GetTicketsClosedTodayIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedToday", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedToday", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated upgrade requests. func (r Account) GetUpgradeRequests() (resp []datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getUpgradeRequests", nil, &r.Options, &resp) return } +func (r Account) GetUpgradeRequestsIter() (resp []datatypes.Product_Upgrade_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getUpgradeRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Upgrade_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getUpgradeRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's portal users. func (r Account) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getUsers", nil, &r.Options, &resp) return } +func (r Account) GetUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a list of valid (non-expired) security certificates without the sensitive certificate information. This allows non-privileged users to view and select security certificates when configuring associated services. func (r Account) GetValidSecurityCertificateEntries() (resp []datatypes.Security_Certificate_Entry, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificateEntries", nil, &r.Options, &resp) return } +func (r Account) GetValidSecurityCertificateEntriesIter() (resp []datatypes.Security_Certificate_Entry, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificateEntries", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Certificate_Entry{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificateEntries", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Stored security certificates that are not expired (ie. SSL) func (r Account) GetValidSecurityCertificates() (resp []datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificates", nil, &r.Options, &resp) return } +func (r Account) GetValidSecurityCertificatesIter() (resp []datatypes.Security_Certificate, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Certificate{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve DEPRECATED - Return 0 if VDR updates are currently in progress on this account otherwise 1. func (r Account) GetVdrUpdatesInProgressFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVdrUpdatesInProgressFlag", nil, &r.Options, &resp) @@ -1886,47 +6344,80 @@ func (r Account) GetVirtualDedicatedRacks() (resp []datatypes.Network_Bandwidth_ return } +func (r Account) GetVirtualDedicatedRacksIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDedicatedRacks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDedicatedRacks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated virtual server virtual disk images. func (r Account) GetVirtualDiskImages() (resp []datatypes.Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDiskImages", nil, &r.Options, &resp) return } +func (r Account) GetVirtualDiskImagesIter() (resp []datatypes.Virtual_Disk_Image, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDiskImages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Disk_Image{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDiskImages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated virtual guest objects. func (r Account) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, &r.Options, &resp) return } -// Retrieve An account's associated virtual guest objects in pages func (r Account) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - - limit := 2 - // r.Session.Debug = true - if r.Options.Limit == nil { - r = r.Limit(limit) - } - // Get the first result set to find out how many total results we have to get through. + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, &r.Options, &resp) if err != nil { return } - // how many api calls we have to make still. apicalls := r.Options.GetRemainingAPICalls() - fmt.Printf(" (%v -%v) / %v = %v \n", r.Options.TotalItems, limit, limit, apicalls) - // First call returned all items (or none) and we are done. - if apicalls < 1 { - return - } var wg sync.WaitGroup for x := 1; x <= apicalls; x++ { wg.Add(1) - go func(i int) { defer wg.Done() offset := i * limit this_resp := []datatypes.Virtual_Guest{} - // Makes a copy of the options, because doing a go routine will have &r.Optoins all be the same. options := r.Options options.Offset = &offset err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, &options, &this_resp) @@ -1934,8 +6425,7 @@ func (r Account) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err err }(x) } wg.Wait() - return - + return } // Retrieve An account's associated virtual guest objects currently over bandwidth allocation. @@ -1944,60 +6434,300 @@ func (r Account) GetVirtualGuestsOverBandwidthAllocation() (resp []datatypes.Vir return } +func (r Account) GetVirtualGuestsOverBandwidthAllocationIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsOverBandwidthAllocation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsOverBandwidthAllocation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated virtual guest objects currently over bandwidth allocation. func (r Account) GetVirtualGuestsProjectedOverBandwidthAllocation() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsProjectedOverBandwidthAllocation", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsProjectedOverBandwidthAllocationIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsProjectedOverBandwidthAllocation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsProjectedOverBandwidthAllocation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All virtual guests associated with an account that has the cPanel web hosting control panel installed. func (r Account) GetVirtualGuestsWithCpanel() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithCpanel", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsWithCpanelIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithCpanel", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithCpanel", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All virtual guests associated with an account that have McAfee Secure software components. func (r Account) GetVirtualGuestsWithMcafee() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafee", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsWithMcafeeIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafee", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafee", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All virtual guests associated with an account that have McAfee Secure AntiVirus for Redhat software components. func (r Account) GetVirtualGuestsWithMcafeeAntivirusRedhat() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusRedhat", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsWithMcafeeAntivirusRedhatIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusRedhat", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusRedhat", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All virtual guests associated with an account that has McAfee Secure AntiVirus for Windows software components. func (r Account) GetVirtualGuestsWithMcafeeAntivirusWindows() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusWindows", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsWithMcafeeAntivirusWindowsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusWindows", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusWindows", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All virtual guests associated with an account that has McAfee Secure Intrusion Detection System software components. func (r Account) GetVirtualGuestsWithMcafeeIntrusionDetectionSystem() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeIntrusionDetectionSystem", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsWithMcafeeIntrusionDetectionSystemIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeIntrusionDetectionSystem", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeIntrusionDetectionSystem", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All virtual guests associated with an account that has the Plesk web hosting control panel installed. func (r Account) GetVirtualGuestsWithPlesk() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithPlesk", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsWithPleskIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithPlesk", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithPlesk", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All virtual guests associated with an account that have the QuantaStor storage system installed. func (r Account) GetVirtualGuestsWithQuantastor() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithQuantastor", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsWithQuantastorIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithQuantastor", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithQuantastor", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All virtual guests associated with an account that has the Urchin web traffic analytics package installed. func (r Account) GetVirtualGuestsWithUrchin() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithUrchin", nil, &r.Options, &resp) return } +func (r Account) GetVirtualGuestsWithUrchinIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithUrchin", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithUrchin", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The bandwidth pooling for this account. func (r Account) GetVirtualPrivateRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualPrivateRack", nil, &r.Options, &resp) @@ -2010,24 +6740,120 @@ func (r Account) GetVirtualStorageArchiveRepositories() (resp []datatypes.Virtua return } +func (r Account) GetVirtualStorageArchiveRepositoriesIter() (resp []datatypes.Virtual_Storage_Repository, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStorageArchiveRepositories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Storage_Repository{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStorageArchiveRepositories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated virtual server public storage repositories. func (r Account) GetVirtualStoragePublicRepositories() (resp []datatypes.Virtual_Storage_Repository, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStoragePublicRepositories", nil, &r.Options, &resp) return } +func (r Account) GetVirtualStoragePublicRepositoriesIter() (resp []datatypes.Virtual_Storage_Repository, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStoragePublicRepositories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Storage_Repository{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStoragePublicRepositories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This returns a collection of active VMware software account license keys. func (r Account) GetVmWareActiveAccountLicenseKeys() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVmWareActiveAccountLicenseKeys", nil, &r.Options, &resp) return } +func (r Account) GetVmWareActiveAccountLicenseKeysIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVmWareActiveAccountLicenseKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVmWareActiveAccountLicenseKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated VPC configured virtual guest objects. func (r Account) GetVpcVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVpcVirtualGuests", nil, &r.Options, &resp) return } +func (r Account) GetVpcVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getVpcVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getVpcVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account) GetVpnConfigRequiresVPNManageFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVpnConfigRequiresVPNManageFlag", nil, &r.Options, &resp) @@ -2040,6 +6866,30 @@ func (r Account) GetWindowsUpdateStatus() (resp []datatypes.Container_Utility_Mi return } +func (r Account) GetWindowsUpdateStatusIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "getWindowsUpdateStatus", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "getWindowsUpdateStatus", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Determine if an account has an [[SoftLayer_Account_Attribute|attribute]] associated with it. hasAttribute() returns false if the attribute does not exist or if it does not have a value. func (r Account) HasAttribute(attributeType *string) (resp bool, err error) { params := []interface{}{ @@ -2212,6 +7062,33 @@ func (r Account) Validate(account *datatypes.Account) (resp []string, err error) return } +func (r Account) ValidateIter(account *datatypes.Account) (resp []string, err error) { + params := []interface{}{ + account, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account", "validate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account", "validate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method checks global and account specific requirements and returns true if the dollar amount entered is acceptable for this account and false otherwise. Please note the dollar amount is in USD. func (r Account) ValidateManualPaymentAmount(amount *string) (resp bool, err error) { params := []interface{}{ @@ -2291,6 +7168,30 @@ func (r Account_Address) GetAllDataCenters() (resp []datatypes.Account_Address, return } +func (r Account_Address) GetAllDataCentersIter() (resp []datatypes.Account_Address, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Address", "getAllDataCenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Address{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Address", "getAllDataCenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The customer user who created this address. func (r Account_Address) GetCreateUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account_Address", "getCreateUser", nil, &r.Options, &resp) @@ -2324,6 +7225,33 @@ func (r Account_Address) GetNetworkAddress(name *string) (resp []datatypes.Accou return } +func (r Account_Address) GetNetworkAddressIter(name *string) (resp []datatypes.Account_Address, err error) { + params := []interface{}{ + name, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Address", "getNetworkAddress", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Address{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Address", "getNetworkAddress", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Address) GetObject() (resp datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Account_Address", "getObject", nil, &r.Options, &resp) @@ -2461,6 +7389,33 @@ func (r Account_Affiliation) GetAccountAffiliationsByAffiliateId(affiliateId *st return } +func (r Account_Affiliation) GetAccountAffiliationsByAffiliateIdIter(affiliateId *string) (resp []datatypes.Account_Affiliation, err error) { + params := []interface{}{ + affiliateId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Affiliation", "getAccountAffiliationsByAffiliateId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Affiliation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Affiliation", "getAccountAffiliationsByAffiliateId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Affiliation) GetObject() (resp datatypes.Account_Affiliation, err error) { err = r.Session.DoRequest("SoftLayer_Account_Affiliation", "getObject", nil, &r.Options, &resp) @@ -2525,12 +7480,60 @@ func (r Account_Agreement) GetAttachedBillingAgreementFiles() (resp []datatypes. return } +func (r Account_Agreement) GetAttachedBillingAgreementFilesIter() (resp []datatypes.Account_MasterServiceAgreement, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getAttachedBillingAgreementFiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_MasterServiceAgreement{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getAttachedBillingAgreementFiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing items associated with an agreement. func (r Account_Agreement) GetBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getBillingItems", nil, &r.Options, &resp) return } +func (r Account_Agreement) GetBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Agreement) GetObject() (resp datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getObject", nil, &r.Options, &resp) @@ -2549,6 +7552,30 @@ func (r Account_Agreement) GetTopLevelBillingItems() (resp []datatypes.Billing_I return } +func (r Account_Agreement) GetTopLevelBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getTopLevelBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getTopLevelBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Account authentication has many different settings that can be set. This class allows the customer or employee to set these settings. type Account_Authentication_Attribute struct { Session session.SLSession @@ -2659,6 +7686,30 @@ func (r Account_Authentication_Attribute_Type) GetAllObjects() (resp []datatypes return } +func (r Account_Authentication_Attribute_Type) GetAllObjectsIter() (resp []datatypes.Account_Attribute_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Authentication_Attribute_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Attribute_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Authentication_Attribute_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Authentication_Attribute_Type) GetObject() (resp datatypes.Account_Authentication_Attribute_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Authentication_Attribute_Type", "getObject", nil, &r.Options, &resp) @@ -2741,6 +7792,30 @@ func (r Account_Authentication_Saml) GetAttributes() (resp []datatypes.Account_A return } +func (r Account_Authentication_Saml) GetAttributesIter() (resp []datatypes.Account_Authentication_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Authentication_Saml", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Authentication_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Authentication_Saml", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return the service provider metadata in XML format. func (r Account_Authentication_Saml) GetMetadata() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account_Authentication_Saml", "getMetadata", nil, &r.Options, &resp) @@ -2972,6 +8047,30 @@ func (r Account_Contact) GetAllContactTypes() (resp []datatypes.Account_Contact_ return } +func (r Account_Contact) GetAllContactTypesIter() (resp []datatypes.Account_Contact_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Contact", "getAllContactTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Contact_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Contact", "getAllContactTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Contact) GetObject() (resp datatypes.Account_Contact, err error) { err = r.Session.DoRequest("SoftLayer_Account_Contact", "getObject", nil, &r.Options, &resp) @@ -3201,6 +8300,30 @@ func (r Account_Internal_Ibm) GetAccountTypes() (resp []string, err error) { return } +func (r Account_Internal_Ibm) GetAccountTypesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getAccountTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getAccountTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Gets the URL used to perform manager validation. func (r Account_Internal_Ibm) GetAuthorizationUrl(requestId *int) (resp string, err error) { params := []interface{}{ @@ -3216,12 +8339,60 @@ func (r Account_Internal_Ibm) GetBmsCountries() (resp []datatypes.BMS_Container_ return } +func (r Account_Internal_Ibm) GetBmsCountriesIter() (resp []datatypes.BMS_Container_Country, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountries", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.BMS_Container_Country{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountries", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Internal_Ibm) GetBmsCountryList() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountryList", nil, &r.Options, &resp) return } +func (r Account_Internal_Ibm) GetBmsCountryListIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountryList", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountryList", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Exchanges a code for a token during manager validation. func (r Account_Internal_Ibm) GetEmployeeAccessToken(unverifiedAuthenticationCode *string) (resp string, err error) { params := []interface{}{ @@ -3498,6 +8669,30 @@ func (r Account_Link_OpenStack) ListOSProjects() (resp []datatypes.Account_Link_ return } +func (r Account_Link_OpenStack) ListOSProjectsIter() (resp []datatypes.Account_Link_OpenStack_ProjectDetails, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Link_OpenStack", "listOSProjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Link_OpenStack_ProjectDetails{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Link_OpenStack", "listOSProjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Account_Lockdown_Request data type holds information on API requests from brand customers. type Account_Lockdown_Request struct { Session session.SLSession @@ -3573,6 +8768,33 @@ func (r Account_Lockdown_Request) GetAccountHistory(accountId *int) (resp []data return } +func (r Account_Lockdown_Request) GetAccountHistoryIter(accountId *int) (resp []datatypes.Account_Lockdown_Request, err error) { + params := []interface{}{ + accountId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Lockdown_Request", "getAccountHistory", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Lockdown_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Lockdown_Request", "getAccountHistory", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Lockdown_Request) GetObject() (resp datatypes.Account_Lockdown_Request, err error) { err = r.Session.DoRequest("SoftLayer_Account_Lockdown_Request", "getObject", nil, &r.Options, &resp) @@ -3707,6 +8929,30 @@ func (r Account_Media) GetAllMediaTypes() (resp []datatypes.Account_Media_Type, return } +func (r Account_Media) GetAllMediaTypesIter() (resp []datatypes.Account_Media_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Media", "getAllMediaTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Media_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Media", "getAllMediaTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The customer user who created the media object. func (r Account_Media) GetCreateUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account_Media", "getCreateUser", nil, &r.Options, &resp) @@ -3825,12 +9071,60 @@ func (r Account_Media_Data_Transfer_Request) GetActiveTickets() (resp []datatype return } +func (r Account_Media_Data_Transfer_Request) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getActiveTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getActiveTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of all the possible statuses to which a request may be set. func (r Account_Media_Data_Transfer_Request) GetAllRequestStatuses() (resp []datatypes.Account_Media_Data_Transfer_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getAllRequestStatuses", nil, &r.Options, &resp) return } +func (r Account_Media_Data_Transfer_Request) GetAllRequestStatusesIter() (resp []datatypes.Account_Media_Data_Transfer_Request_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getAllRequestStatuses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Media_Data_Transfer_Request_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getAllRequestStatuses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item for the original request. func (r Account_Media_Data_Transfer_Request) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getBillingItem", nil, &r.Options, &resp) @@ -3873,6 +9167,30 @@ func (r Account_Media_Data_Transfer_Request) GetShipments() (resp []datatypes.Ac return } +func (r Account_Media_Data_Transfer_Request) GetShipmentsIter() (resp []datatypes.Account_Shipment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getShipments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Shipment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getShipments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of the request. func (r Account_Media_Data_Transfer_Request) GetStatus() (resp datatypes.Account_Media_Data_Transfer_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getStatus", nil, &r.Options, &resp) @@ -3885,6 +9203,30 @@ func (r Account_Media_Data_Transfer_Request) GetTickets() (resp []datatypes.Tick return } +func (r Account_Media_Data_Transfer_Request) GetTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Account_Note struct { Session session.SLSession @@ -3967,6 +9309,30 @@ func (r Account_Note) GetNoteHistory() (resp []datatypes.Account_Note_History, e return } +func (r Account_Note) GetNoteHistoryIter() (resp []datatypes.Account_Note_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Note", "getNoteHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Note_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Note", "getNoteHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Note) GetObject() (resp datatypes.Account_Note, err error) { err = r.Session.DoRequest("SoftLayer_Account_Note", "getObject", nil, &r.Options, &resp) @@ -4035,6 +9401,30 @@ func (r Account_Partner_Referral_Prospect) GetSurveyQuestions() (resp []datatype return } +func (r Account_Partner_Referral_Prospect) GetSurveyQuestionsIter() (resp []datatypes.Survey_Question, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Partner_Referral_Prospect", "getSurveyQuestions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Survey_Question{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Partner_Referral_Prospect", "getSurveyQuestions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Account_Password contains username, passwords and notes for services that may require for external applications such the Webcc interface for the EVault Storage service. type Account_Password struct { Session session.SLSession @@ -4183,6 +9573,33 @@ func (r Account_ProofOfConcept) GetRequestsPendingIntegratedOfferingTeamReview(a return } +func (r Account_ProofOfConcept) GetRequestsPendingIntegratedOfferingTeamReviewIter(accessToken *string) (resp []datatypes.Container_Account_ProofOfConcept_Review_Summary, err error) { + params := []interface{}{ + accessToken, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getRequestsPendingIntegratedOfferingTeamReview", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Account_ProofOfConcept_Review_Summary{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getRequestsPendingIntegratedOfferingTeamReview", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of requests that are pending over threshold review func (r Account_ProofOfConcept) GetRequestsPendingOverThresholdReview(accessToken *string) (resp []datatypes.Container_Account_ProofOfConcept_Review_Summary, err error) { params := []interface{}{ @@ -4192,6 +9609,33 @@ func (r Account_ProofOfConcept) GetRequestsPendingOverThresholdReview(accessToke return } +func (r Account_ProofOfConcept) GetRequestsPendingOverThresholdReviewIter(accessToken *string) (resp []datatypes.Container_Account_ProofOfConcept_Review_Summary, err error) { + params := []interface{}{ + accessToken, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getRequestsPendingOverThresholdReview", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Account_ProofOfConcept_Review_Summary{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getRequestsPendingOverThresholdReview", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Exchanges a code for a token during reviewer validation. func (r Account_ProofOfConcept) GetReviewerAccessToken(unverifiedAuthenticationCode *string) (resp string, err error) { params := []interface{}{ @@ -4232,6 +9676,34 @@ func (r Account_ProofOfConcept) GetSubmittedRequests(email *string, sortOrder *s return } +func (r Account_ProofOfConcept) GetSubmittedRequestsIter(email *string, sortOrder *string) (resp []datatypes.Container_Account_ProofOfConcept_Review_Summary, err error) { + params := []interface{}{ + email, + sortOrder, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getSubmittedRequests", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Account_ProofOfConcept_Review_Summary{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getSubmittedRequests", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Gets email address users can use to ask for help/support func (r Account_ProofOfConcept) GetSupportEmailAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getSupportEmailAddress", nil, &r.Options, &resp) @@ -4360,6 +9832,30 @@ func (r Account_ProofOfConcept_Approver) GetAllObjects() (resp []datatypes.Accou return } +func (r Account_ProofOfConcept_Approver) GetAllObjectsIter() (resp []datatypes.Account_ProofOfConcept_Approver, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_ProofOfConcept_Approver{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_ProofOfConcept_Approver) GetObject() (resp datatypes.Account_ProofOfConcept_Approver, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver", "getObject", nil, &r.Options, &resp) @@ -4470,6 +9966,30 @@ func (r Account_ProofOfConcept_Approver_Type) GetApprovers() (resp []datatypes.A return } +func (r Account_ProofOfConcept_Approver_Type) GetApproversIter() (resp []datatypes.Account_ProofOfConcept_Approver, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver_Type", "getApprovers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_ProofOfConcept_Approver{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver_Type", "getApprovers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_ProofOfConcept_Approver_Type) GetObject() (resp datatypes.Account_ProofOfConcept_Approver_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver_Type", "getObject", nil, &r.Options, &resp) @@ -4522,6 +10042,30 @@ func (r Account_ProofOfConcept_Campaign_Code) GetAllObjects() (resp []datatypes. return } +func (r Account_ProofOfConcept_Campaign_Code) GetAllObjectsIter() (resp []datatypes.Account_ProofOfConcept_Campaign_Code, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Campaign_Code", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_ProofOfConcept_Campaign_Code{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Campaign_Code", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_ProofOfConcept_Campaign_Code) GetObject() (resp datatypes.Account_ProofOfConcept_Campaign_Code, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Campaign_Code", "getObject", nil, &r.Options, &resp) @@ -4574,18 +10118,90 @@ func (r Account_ProofOfConcept_Funding_Type) GetAllObjects() (resp []datatypes.A return } +func (r Account_ProofOfConcept_Funding_Type) GetAllObjectsIter() (resp []datatypes.Account_ProofOfConcept_Funding_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_ProofOfConcept_Funding_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account_ProofOfConcept_Funding_Type) GetApproverTypes() (resp []datatypes.Account_ProofOfConcept_Approver_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApproverTypes", nil, &r.Options, &resp) return } +func (r Account_ProofOfConcept_Funding_Type) GetApproverTypesIter() (resp []datatypes.Account_ProofOfConcept_Approver_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApproverTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_ProofOfConcept_Approver_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApproverTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Account_ProofOfConcept_Funding_Type) GetApprovers() (resp []datatypes.Account_ProofOfConcept_Approver, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApprovers", nil, &r.Options, &resp) return } +func (r Account_ProofOfConcept_Funding_Type) GetApproversIter() (resp []datatypes.Account_ProofOfConcept_Approver, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApprovers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_ProofOfConcept_Approver{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApprovers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_ProofOfConcept_Funding_Type) GetObject() (resp datatypes.Account_ProofOfConcept_Funding_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getObject", nil, &r.Options, &resp) @@ -4687,6 +10303,30 @@ func (r Account_Regional_Registry_Detail) GetDetails() (resp []datatypes.Network return } +func (r Account_Regional_Registry_Detail) GetDetailsIter() (resp []datatypes.Network_Subnet_Registration_Details, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Registration_Details{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Regional_Registry_Detail) GetObject() (resp datatypes.Account_Regional_Registry_Detail, err error) { err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getObject", nil, &r.Options, &resp) @@ -4699,6 +10339,30 @@ func (r Account_Regional_Registry_Detail) GetProperties() (resp []datatypes.Acco return } +func (r Account_Regional_Registry_Detail) GetPropertiesIter() (resp []datatypes.Account_Regional_Registry_Detail_Property, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getProperties", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Regional_Registry_Detail_Property{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getProperties", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [Deprecated] The associated RWhois handle of this detail object. Used only when detailed reassignments are necessary. func (r Account_Regional_Registry_Detail) GetRegionalInternetRegistryHandle() (resp datatypes.Account_Rwhois_Handle, err error) { err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getRegionalInternetRegistryHandle", nil, &r.Options, &resp) @@ -4729,6 +10393,30 @@ func (r Account_Regional_Registry_Detail) ValidatePersonForAllRegistrars() (resp return } +func (r Account_Regional_Registry_Detail) ValidatePersonForAllRegistrarsIter() (resp []datatypes.Container_Message, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "validatePersonForAllRegistrars", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Message{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "validatePersonForAllRegistrars", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The subnet registration detail property type has been deprecated. // // Subnet registration properties are used to define various attributes of the [[SoftLayer_Account_Regional_Registry_Detail|detail objects]]. These properties are defined by the [[SoftLayer_Account_Regional_Registry_Detail_Property_Type]] objects, which describe the available value formats. @@ -4798,6 +10486,33 @@ func (r Account_Regional_Registry_Detail_Property) CreateObjects(templateObjects return } +func (r Account_Regional_Registry_Detail_Property) CreateObjectsIter(templateObjects []datatypes.Account_Regional_Registry_Detail_Property) (resp []datatypes.Account_Regional_Registry_Detail_Property, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Regional_Registry_Detail_Property{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The subnet registration detail property service has been deprecated. // // This method will delete an existing SoftLayer_Account_Regional_Registry_Detail_Property object. @@ -4899,6 +10614,30 @@ func (r Account_Regional_Registry_Detail_Property_Type) GetAllObjects() (resp [] return } +func (r Account_Regional_Registry_Detail_Property_Type) GetAllObjectsIter() (resp []datatypes.Account_Regional_Registry_Detail_Property_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Regional_Registry_Detail_Property_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Regional_Registry_Detail_Property_Type) GetObject() (resp datatypes.Account_Regional_Registry_Detail_Property_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property_Type", "getObject", nil, &r.Options, &resp) @@ -4957,6 +10696,30 @@ func (r Account_Regional_Registry_Detail_Type) GetAllObjects() (resp []datatypes return } +func (r Account_Regional_Registry_Detail_Type) GetAllObjectsIter() (resp []datatypes.Account_Regional_Registry_Detail_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Regional_Registry_Detail_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Account_Regional_Registry_Detail_Type) GetObject() (resp datatypes.Account_Regional_Registry_Detail_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Type", "getObject", nil, &r.Options, &resp) @@ -5151,6 +10914,30 @@ func (r Account_Shipment) GetAllCouriers() (resp []datatypes.Auxiliary_Shipping_ return } +func (r Account_Shipment) GetAllCouriersIter() (resp []datatypes.Auxiliary_Shipping_Courier, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllCouriers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Auxiliary_Shipping_Courier{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllCouriers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a list of available shipping couriers. func (r Account_Shipment) GetAllCouriersByType(courierTypeKeyName *string) (resp []datatypes.Auxiliary_Shipping_Courier, err error) { params := []interface{}{ @@ -5160,18 +10947,93 @@ func (r Account_Shipment) GetAllCouriersByType(courierTypeKeyName *string) (resp return } +func (r Account_Shipment) GetAllCouriersByTypeIter(courierTypeKeyName *string) (resp []datatypes.Auxiliary_Shipping_Courier, err error) { + params := []interface{}{ + courierTypeKeyName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllCouriersByType", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Auxiliary_Shipping_Courier{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllCouriersByType", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a a list of shipment statuses. func (r Account_Shipment) GetAllShipmentStatuses() (resp []datatypes.Account_Shipment_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentStatuses", nil, &r.Options, &resp) return } +func (r Account_Shipment) GetAllShipmentStatusesIter() (resp []datatypes.Account_Shipment_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentStatuses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Shipment_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentStatuses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a a list of shipment types. func (r Account_Shipment) GetAllShipmentTypes() (resp []datatypes.Account_Shipment_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentTypes", nil, &r.Options, &resp) return } +func (r Account_Shipment) GetAllShipmentTypesIter() (resp []datatypes.Account_Shipment_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Shipment_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The courier handling the shipment. func (r Account_Shipment) GetCourier() (resp datatypes.Auxiliary_Shipping_Courier, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getCourier", nil, &r.Options, &resp) @@ -5238,6 +11100,30 @@ func (r Account_Shipment) GetShipmentItems() (resp []datatypes.Account_Shipment_ return } +func (r Account_Shipment) GetShipmentItemsIter() (resp []datatypes.Account_Shipment_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getShipmentItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Shipment_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getShipmentItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of the shipment. func (r Account_Shipment) GetStatus() (resp datatypes.Account_Shipment_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getStatus", nil, &r.Options, &resp) @@ -5250,6 +11136,30 @@ func (r Account_Shipment) GetTrackingData() (resp []datatypes.Account_Shipment_T return } +func (r Account_Shipment) GetTrackingDataIter() (resp []datatypes.Account_Shipment_Tracking_Data, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getTrackingData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Shipment_Tracking_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getTrackingData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type of shipment (e.g. for Data Transfer Service or Colocation Service). func (r Account_Shipment) GetType() (resp datatypes.Account_Shipment_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getType", nil, &r.Options, &resp) @@ -5525,6 +11435,33 @@ func (r Account_Shipment_Tracking_Data) CreateObjects(templateObjects []datatype return } +func (r Account_Shipment_Tracking_Data) CreateObjectsIter(templateObjects []datatypes.Account_Shipment_Tracking_Data) (resp []datatypes.Account_Shipment_Tracking_Data, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Account_Shipment_Tracking_Data", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Shipment_Tracking_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Account_Shipment_Tracking_Data", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // deleteObject permanently removes a shipment tracking datum (number) func (r Account_Shipment_Tracking_Data) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment_Tracking_Data", "deleteObject", nil, &r.Options, &resp) diff --git a/services/auxiliary.go b/services/auxiliary.go index bbf0f76..274068b 100644 --- a/services/auxiliary.go +++ b/services/auxiliary.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -72,6 +73,33 @@ func (r Auxiliary_Network_Status) GetNetworkStatus(target *string) (resp []datat return } +func (r Auxiliary_Network_Status) GetNetworkStatusIter(target *string) (resp []datatypes.Container_Auxiliary_Network_Status_Reading, err error) { + params := []interface{}{ + target, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Auxiliary_Network_Status", "getNetworkStatus", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Auxiliary_Network_Status_Reading{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Auxiliary_Network_Status", "getNetworkStatus", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // A SoftLayer_Auxiliary_Notification_Emergency data object represents a notification event being broadcast to the SoftLayer customer base. It is used to provide information regarding outages or current known issues. type Auxiliary_Notification_Emergency struct { Session session.SLSession @@ -118,12 +146,60 @@ func (r Auxiliary_Notification_Emergency) GetAllObjects() (resp []datatypes.Auxi return } +func (r Auxiliary_Notification_Emergency) GetAllObjectsIter() (resp []datatypes.Auxiliary_Notification_Emergency, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Auxiliary_Notification_Emergency{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve an array of SoftLayer_Auxiliary_Notification_Emergency data types, which contain all current notification events. func (r Auxiliary_Notification_Emergency) GetCurrentNotifications() (resp []datatypes.Auxiliary_Notification_Emergency, err error) { err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getCurrentNotifications", nil, &r.Options, &resp) return } +func (r Auxiliary_Notification_Emergency) GetCurrentNotificationsIter() (resp []datatypes.Auxiliary_Notification_Emergency, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getCurrentNotifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Auxiliary_Notification_Emergency{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getCurrentNotifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Auxiliary_Notification_Emergency object, it can be used to check for current notifications being broadcast by SoftLayer. func (r Auxiliary_Notification_Emergency) GetObject() (resp datatypes.Auxiliary_Notification_Emergency, err error) { err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getObject", nil, &r.Options, &resp) @@ -188,6 +264,30 @@ func (r Auxiliary_Shipping_Courier_Type) GetCourier() (resp []datatypes.Auxiliar return } +func (r Auxiliary_Shipping_Courier_Type) GetCourierIter() (resp []datatypes.Auxiliary_Shipping_Courier, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getCourier", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Auxiliary_Shipping_Courier{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getCourier", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Auxiliary_Shipping_Courier_Type) GetObject() (resp datatypes.Auxiliary_Shipping_Courier_Type, err error) { err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getObject", nil, &r.Options, &resp) diff --git a/services/billing.go b/services/billing.go index 4ee7522..291da4c 100644 --- a/services/billing.go +++ b/services/billing.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,6 +69,30 @@ func (r Billing_Currency) GetAllObjects() (resp []datatypes.Billing_Currency, er return } +func (r Billing_Currency) GetAllObjectsIter() (resp []datatypes.Billing_Currency, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Currency{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current exchange rate func (r Billing_Currency) GetCurrentExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getCurrentExchangeRate", nil, &r.Options, &resp) @@ -136,6 +161,30 @@ func (r Billing_Currency_Country) GetCountriesWithListOfEligibleCurrencies() (re return } +func (r Billing_Currency_Country) GetCountriesWithListOfEligibleCurrenciesIter() (resp []datatypes.Container_Billing_Currency_Country, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Currency_Country", "getCountriesWithListOfEligibleCurrencies", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Billing_Currency_Country{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Currency_Country", "getCountriesWithListOfEligibleCurrencies", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Currency_Country) GetObject() (resp datatypes.Billing_Currency_Country, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Currency_Country", "getObject", nil, &r.Options, &resp) @@ -191,12 +240,63 @@ func (r Billing_Currency_ExchangeRate) GetAllCurrencyExchangeRates(stringDate *s return } +func (r Billing_Currency_ExchangeRate) GetAllCurrencyExchangeRatesIter(stringDate *string) (resp []datatypes.Billing_Currency_ExchangeRate, err error) { + params := []interface{}{ + stringDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getAllCurrencyExchangeRates", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Currency_ExchangeRate{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getAllCurrencyExchangeRates", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Currency_ExchangeRate) GetCurrencies() (resp []datatypes.Billing_Currency, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getCurrencies", nil, &r.Options, &resp) return } +func (r Billing_Currency_ExchangeRate) GetCurrenciesIter() (resp []datatypes.Billing_Currency, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getCurrencies", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Currency{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getCurrencies", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Currency_ExchangeRate) GetExchangeRate(to *string, from *string, effectiveDate *datatypes.Time) (resp datatypes.Billing_Currency_ExchangeRate, err error) { params := []interface{}{ @@ -288,6 +388,30 @@ func (r Billing_Info) GetAchInformation() (resp []datatypes.Billing_Info_Ach, er return } +func (r Billing_Info) GetAchInformationIter() (resp []datatypes.Billing_Info_Ach, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Info", "getAchInformation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Info_Ach{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Info", "getAchInformation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Currency to be used by this customer account. func (r Billing_Info) GetCurrency() (resp datatypes.Billing_Currency, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Info", "getCurrency", nil, &r.Options, &resp) @@ -410,6 +534,30 @@ func (r Billing_Invoice) GetInvoiceTopLevelItems() (resp []datatypes.Billing_Inv return } +func (r Billing_Invoice) GetInvoiceTopLevelItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTopLevelItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTopLevelItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The total amount of this invoice. func (r Billing_Invoice) GetInvoiceTotalAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTotalAmount", nil, &r.Options, &resp) @@ -452,6 +600,30 @@ func (r Billing_Invoice) GetItems() (resp []datatypes.Billing_Invoice_Item, err return } +func (r Billing_Invoice) GetItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Exchange rate used for billing this invoice. func (r Billing_Invoice) GetLocalCurrencyExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getLocalCurrencyExchangeRate", nil, &r.Options, &resp) @@ -476,6 +648,30 @@ func (r Billing_Invoice) GetPayments() (resp []datatypes.Billing_Invoice_Receiva return } +func (r Billing_Invoice) GetPaymentsIter() (resp []datatypes.Billing_Invoice_Receivable_Payment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPayments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Receivable_Payment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPayments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a PDF record of a SoftLayer invoice. SoftLayer keeps PDF records of all closed invoices for customer retrieval from the portal and API. You must have a PDF reader installed in order to view these invoice files. func (r Billing_Invoice) GetPdf() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPdf", nil, &r.Options, &resp) @@ -542,6 +738,30 @@ func (r Billing_Invoice) GetTaxInfoHistory() (resp []datatypes.Billing_Invoice_T return } +func (r Billing_Invoice) GetTaxInfoHistoryIter() (resp []datatypes.Billing_Invoice_Tax_Info, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxInfoHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Tax_Info{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxInfoHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This is a message explaining the tax treatment for this invoice. func (r Billing_Invoice) GetTaxMessage() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxMessage", nil, &r.Options, &resp) @@ -566,6 +786,30 @@ func (r Billing_Invoice) GetZeroFeeItemCounts() (resp []datatypes.Container_Prod return } +func (r Billing_Invoice) GetZeroFeeItemCountsIter() (resp []datatypes.Container_Product_Item_Category_ZeroFee_Count, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getZeroFeeItemCounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Product_Item_Category_ZeroFee_Count{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getZeroFeeItemCounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Each billing invoice item makes up a record within an invoice. This provides you with a detailed record of everything related to an invoice item. When you are billed, our system takes active billing items and creates an invoice. These invoice items are a copy of your active billing items, and make up the contents of your invoice. type Billing_Invoice_Item struct { Session session.SLSession @@ -612,6 +856,30 @@ func (r Billing_Invoice_Item) GetAssociatedChildren() (resp []datatypes.Billing_ return } +func (r Billing_Invoice_Item) GetAssociatedChildrenIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getAssociatedChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getAssociatedChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An Invoice Item's associated invoice item. If this is populated, it means this is an orphaned invoice item, but logically belongs to the associated invoice item. func (r Billing_Invoice_Item) GetAssociatedInvoiceItem() (resp datatypes.Billing_Invoice_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getAssociatedInvoiceItem", nil, &r.Options, &resp) @@ -636,6 +904,30 @@ func (r Billing_Invoice_Item) GetChildren() (resp []datatypes.Billing_Invoice_It return } +func (r Billing_Invoice_Item) GetChildrenIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This is the DPart for invoice item. func (r Billing_Invoice_Item) GetDPart() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getDPart", nil, &r.Options, &resp) @@ -648,6 +940,30 @@ func (r Billing_Invoice_Item) GetFilteredAssociatedChildren() (resp []datatypes. return } +func (r Billing_Invoice_Item) GetFilteredAssociatedChildrenIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getFilteredAssociatedChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getFilteredAssociatedChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Indicating whether this invoice item is billed on an hourly basis. func (r Billing_Invoice_Item) GetHourlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getHourlyFlag", nil, &r.Options, &resp) @@ -672,6 +988,30 @@ func (r Billing_Invoice_Item) GetNonZeroAssociatedChildren() (resp []datatypes.B return } +func (r Billing_Invoice_Item) GetNonZeroAssociatedChildrenIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getNonZeroAssociatedChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getNonZeroAssociatedChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Billing_Invoice_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Invoice_Item service. You can only retrieve the items tied to the account that your portal user is assigned to. func (r Billing_Invoice_Item) GetObject() (resp datatypes.Billing_Invoice_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getObject", nil, &r.Options, &resp) @@ -839,6 +1179,30 @@ func (r Billing_Invoice_Tax_Status) GetAllObjects() (resp []datatypes.Billing_In return } +func (r Billing_Invoice_Tax_Status) GetAllObjectsIter() (resp []datatypes.Billing_Invoice_Tax_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Status", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Tax_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Status", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Invoice_Tax_Status) GetObject() (resp datatypes.Billing_Invoice_Tax_Status, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Status", "getObject", nil, &r.Options, &resp) @@ -891,6 +1255,30 @@ func (r Billing_Invoice_Tax_Type) GetAllObjects() (resp []datatypes.Billing_Invo return } +func (r Billing_Invoice_Tax_Type) GetAllObjectsIter() (resp []datatypes.Billing_Invoice_Tax_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Tax_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Invoice_Tax_Type) GetObject() (resp datatypes.Billing_Invoice_Tax_Type, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Type", "getObject", nil, &r.Options, &resp) @@ -999,18 +1387,90 @@ func (r Billing_Item) GetActiveAssociatedChildren() (resp []datatypes.Billing_It return } +func (r Billing_Item) GetActiveAssociatedChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Billing_Item) GetActiveAssociatedGuestDiskBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) return } +func (r Billing_Item) GetActiveAssociatedGuestDiskBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedGuestDiskBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's active bundled billing items. func (r Billing_Item) GetActiveBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveBundledItems", nil, &r.Options, &resp) return } +func (r Billing_Item) GetActiveBundledItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveBundledItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveBundledItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A service cancellation request item that corresponds to the billing item. func (r Billing_Item) GetActiveCancellationItem() (resp datatypes.Billing_Item_Cancellation_Request_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveCancellationItem", nil, &r.Options, &resp) @@ -1023,6 +1483,30 @@ func (r Billing_Item) GetActiveChildren() (resp []datatypes.Billing_Item, err er return } +func (r Billing_Item) GetActiveChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Billing_Item) GetActiveFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveFlag", nil, &r.Options, &resp) @@ -1035,12 +1519,60 @@ func (r Billing_Item) GetActiveSparePoolAssociatedGuestDiskBillingItems() (resp return } +func (r Billing_Item) GetActiveSparePoolAssociatedGuestDiskBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's spare pool bundled billing items. func (r Billing_Item) GetActiveSparePoolBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolBundledItems", nil, &r.Options, &resp) return } +func (r Billing_Item) GetActiveSparePoolBundledItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolBundledItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolBundledItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A billing item's associated parent. This is to be used for billing items that are "floating", and therefore are not child items of any parent billing item. If it is desired to associate an item to another, populate this with the SoftLayer_Billing_Item ID of that associated parent item. func (r Billing_Item) GetAssociatedBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedBillingItem", nil, &r.Options, &resp) @@ -1053,24 +1585,120 @@ func (r Billing_Item) GetAssociatedBillingItemHistory() (resp []datatypes.Billin return } +func (r Billing_Item) GetAssociatedBillingItemHistoryIter() (resp []datatypes.Billing_Item_Association_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedBillingItemHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Association_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedBillingItemHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's associated child billing items. This includes "floating" items that are not necessarily child billing items of this billing item. func (r Billing_Item) GetAssociatedChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedChildren", nil, &r.Options, &resp) return } +func (r Billing_Item) GetAssociatedChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A billing item's associated parent billing item. This object will be the same as the parent billing item if parentId is set. func (r Billing_Item) GetAssociatedParent() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedParent", nil, &r.Options, &resp) return } +func (r Billing_Item) GetAssociatedParentIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedParent", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedParent", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Billing_Item) GetAvailableMatchingVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAvailableMatchingVlans", nil, &r.Options, &resp) return } +func (r Billing_Item) GetAvailableMatchingVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAvailableMatchingVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAvailableMatchingVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The bandwidth allocation for a billing item. func (r Billing_Item) GetBandwidthAllocation() (resp datatypes.Network_Bandwidth_Version1_Allocation, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -1083,18 +1711,90 @@ func (r Billing_Item) GetBillableChildren() (resp []datatypes.Billing_Item, err return } +func (r Billing_Item) GetBillableChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBillableChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBillableChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's bundled billing items. func (r Billing_Item) GetBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBundledItems", nil, &r.Options, &resp) return } +func (r Billing_Item) GetBundledItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBundledItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBundledItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's active child billing items. func (r Billing_Item) GetCanceledChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCanceledChildren", nil, &r.Options, &resp) return } +func (r Billing_Item) GetCanceledChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCanceledChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCanceledChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item's cancellation reason. func (r Billing_Item) GetCancellationReason() (resp datatypes.Billing_Item_Cancellation_Reason, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCancellationReason", nil, &r.Options, &resp) @@ -1107,6 +1807,30 @@ func (r Billing_Item) GetCancellationRequests() (resp []datatypes.Billing_Item_C return } +func (r Billing_Item) GetCancellationRequestsIter() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCancellationRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Cancellation_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCancellationRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The item category to which the billing item's item belongs. func (r Billing_Item) GetCategory() (resp datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCategory", nil, &r.Options, &resp) @@ -1119,17 +1843,89 @@ func (r Billing_Item) GetChildren() (resp []datatypes.Billing_Item, err error) { return } +func (r Billing_Item) GetChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's active child billing items. func (r Billing_Item) GetChildrenWithActiveAgreement() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildrenWithActiveAgreement", nil, &r.Options, &resp) return } -// Retrieve For product items which have a downgrade path defined, this will return those product items. -func (r Billing_Item) GetDowngradeItems() (resp []datatypes.Product_Item, err error) { - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getDowngradeItems", nil, &r.Options, &resp) - return -} +func (r Billing_Item) GetChildrenWithActiveAgreementIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildrenWithActiveAgreement", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildrenWithActiveAgreement", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve For product items which have a downgrade path defined, this will return those product items. +func (r Billing_Item) GetDowngradeItems() (resp []datatypes.Product_Item, err error) { + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getDowngradeItems", nil, &r.Options, &resp) + return +} + +func (r Billing_Item) GetDowngradeItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getDowngradeItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getDowngradeItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} // Retrieve A Billing Item's associated child billing items, excluding some items with a $0.00 recurring fee. func (r Billing_Item) GetFilteredNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) { @@ -1137,6 +1933,30 @@ func (r Billing_Item) GetFilteredNextInvoiceChildren() (resp []datatypes.Billing return } +func (r Billing_Item) GetFilteredNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getFilteredNextInvoiceChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag that will reflect whether this billing item is billed on an hourly basis or not. func (r Billing_Item) GetHourlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getHourlyFlag", nil, &r.Options, &resp) @@ -1155,6 +1975,30 @@ func (r Billing_Item) GetInvoiceItems() (resp []datatypes.Billing_Invoice_Item, return } +func (r Billing_Item) GetInvoiceItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getInvoiceItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getInvoiceItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The entry in the SoftLayer product catalog that a billing item is based upon. func (r Billing_Item) GetItem() (resp datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getItem", nil, &r.Options, &resp) @@ -1173,6 +2017,30 @@ func (r Billing_Item) GetNextInvoiceChildren() (resp []datatypes.Billing_Item, e return } +func (r Billing_Item) GetNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's total, including any child billing items if they exist.' func (r Billing_Item) GetNextInvoiceTotalOneTimeAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceTotalOneTimeAmount", nil, &r.Options, &resp) @@ -1203,6 +2071,30 @@ func (r Billing_Item) GetNonZeroNextInvoiceChildren() (resp []datatypes.Billing_ return } +func (r Billing_Item) GetNonZeroNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNonZeroNextInvoiceChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNonZeroNextInvoiceChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Billing_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item service. You can only retrieve billing items tied to the account that your portal user is assigned to. Billing items are an account's items of billable items. There are "parent" billing items and "child" billing items. The server billing item is generally referred to as a parent billing item. The items tied to a server, such as ram, harddrives, and operating systems are considered "child" billing items. func (r Billing_Item) GetObject() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getObject", nil, &r.Options, &resp) @@ -1269,6 +2161,34 @@ func (r Billing_Item) GetServiceBillingItemsByCategory(categoryCode *string, inc return } +func (r Billing_Item) GetServiceBillingItemsByCategoryIter(categoryCode *string, includeZeroRecurringFee *bool) (resp []datatypes.Billing_Item, err error) { + params := []interface{}{ + categoryCode, + includeZeroRecurringFee, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getServiceBillingItemsByCategory", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getServiceBillingItemsByCategory", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A friendly description of software component func (r Billing_Item) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getSoftwareDescription", nil, &r.Options, &resp) @@ -1287,6 +2207,30 @@ func (r Billing_Item) GetUpgradeItems() (resp []datatypes.Product_Item, err erro return } +func (r Billing_Item) GetUpgradeItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getUpgradeItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item", "getUpgradeItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Remove the association from a billing item. func (r Billing_Item) RemoveAssociationId() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "removeAssociationId", nil, &r.Options, &resp) @@ -1354,6 +2298,30 @@ func (r Billing_Item_Cancellation_Reason) GetAllCancellationReasons() (resp []da return } +func (r Billing_Item_Cancellation_Reason) GetAllCancellationReasonsIter() (resp []datatypes.Billing_Item_Cancellation_Reason, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getAllCancellationReasons", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Cancellation_Reason{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getAllCancellationReasons", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An billing cancellation reason category. func (r Billing_Item_Cancellation_Reason) GetBillingCancellationReasonCategory() (resp datatypes.Billing_Item_Cancellation_Reason_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getBillingCancellationReasonCategory", nil, &r.Options, &resp) @@ -1366,6 +2334,30 @@ func (r Billing_Item_Cancellation_Reason) GetBillingItems() (resp []datatypes.Bi return } +func (r Billing_Item_Cancellation_Reason) GetBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Item_Cancellation_Reason) GetObject() (resp datatypes.Billing_Item_Cancellation_Reason, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getObject", nil, &r.Options, &resp) @@ -1424,12 +2416,60 @@ func (r Billing_Item_Cancellation_Reason_Category) GetAllCancellationReasonCateg return } +func (r Billing_Item_Cancellation_Reason_Category) GetAllCancellationReasonCategoriesIter() (resp []datatypes.Billing_Item_Cancellation_Reason_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getAllCancellationReasonCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Cancellation_Reason_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getAllCancellationReasonCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The corresponding billing cancellation reasons having the specific billing cancellation reason category. func (r Billing_Item_Cancellation_Reason_Category) GetBillingCancellationReasons() (resp []datatypes.Billing_Item_Cancellation_Reason, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getBillingCancellationReasons", nil, &r.Options, &resp) return } +func (r Billing_Item_Cancellation_Reason_Category) GetBillingCancellationReasonsIter() (resp []datatypes.Billing_Item_Cancellation_Reason, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getBillingCancellationReasons", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Cancellation_Reason{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getBillingCancellationReasons", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Item_Cancellation_Reason_Category) GetObject() (resp datatypes.Billing_Item_Cancellation_Reason_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getObject", nil, &r.Options, &resp) @@ -1501,6 +2541,30 @@ func (r Billing_Item_Cancellation_Request) GetAllCancellationRequests() (resp [] return } +func (r Billing_Item_Cancellation_Request) GetAllCancellationRequestsIter() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getAllCancellationRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Cancellation_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getAllCancellationRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Services can be canceled 2 or 3 days prior to your next bill date. This service returns the time by which a cancellation request submission is permitted in the current billing cycle. If the current time falls into the cut off date, this will return next earliest cancellation cut off date. // // Available category codes are: service, server @@ -1519,6 +2583,30 @@ func (r Billing_Item_Cancellation_Request) GetItems() (resp []datatypes.Billing_ return } +func (r Billing_Item_Cancellation_Request) GetItemsIter() (resp []datatypes.Billing_Item_Cancellation_Request_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Cancellation_Request_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Billing_Item_Cancellation_Request object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item_Cancellation_Request service. You can only retrieve cancellation request records that are assigned to your SoftLayer account. func (r Billing_Item_Cancellation_Request) GetObject() (resp datatypes.Billing_Item_Cancellation_Request, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getObject", nil, &r.Options, &resp) @@ -1616,6 +2704,30 @@ func (r Billing_Item_Chronicle) GetAssociatedChildren() (resp []datatypes.Billin return } +func (r Billing_Item_Chronicle) GetAssociatedChildrenIter() (resp []datatypes.Billing_Item_Chronicle, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getAssociatedChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Chronicle{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getAssociatedChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Item_Chronicle) GetObject() (resp datatypes.Billing_Item_Chronicle, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getObject", nil, &r.Options, &resp) @@ -1728,18 +2840,90 @@ func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedChildren() (resp return } +func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedGuestDiskBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedGuestDiskBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedGuestDiskBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's active bundled billing items. func (r Billing_Item_Virtual_DedicatedHost) GetActiveBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveBundledItems", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetActiveBundledItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveBundledItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveBundledItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A service cancellation request item that corresponds to the billing item. func (r Billing_Item_Virtual_DedicatedHost) GetActiveCancellationItem() (resp datatypes.Billing_Item_Cancellation_Request_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveCancellationItem", nil, &r.Options, &resp) @@ -1752,6 +2936,30 @@ func (r Billing_Item_Virtual_DedicatedHost) GetActiveChildren() (resp []datatype return } +func (r Billing_Item_Virtual_DedicatedHost) GetActiveChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Billing_Item_Virtual_DedicatedHost) GetActiveFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveFlag", nil, &r.Options, &resp) @@ -1764,12 +2972,60 @@ func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolAssociatedGuestDis return } +func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolAssociatedGuestDiskBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's spare pool bundled billing items. func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolBundledItems", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolBundledItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolBundledItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolBundledItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A billing item's associated parent. This is to be used for billing items that are "floating", and therefore are not child items of any parent billing item. If it is desired to associate an item to another, populate this with the SoftLayer_Billing_Item ID of that associated parent item. func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedBillingItem", nil, &r.Options, &resp) @@ -1782,24 +3038,120 @@ func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedBillingItemHistory() (r return } +func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedBillingItemHistoryIter() (resp []datatypes.Billing_Item_Association_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedBillingItemHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Association_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedBillingItemHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's associated child billing items. This includes "floating" items that are not necessarily child billing items of this billing item. func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedChildren", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A billing item's associated parent billing item. This object will be the same as the parent billing item if parentId is set. func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedParent() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedParent", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedParentIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedParent", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedParent", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Billing_Item_Virtual_DedicatedHost) GetAvailableMatchingVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAvailableMatchingVlans", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetAvailableMatchingVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAvailableMatchingVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAvailableMatchingVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The bandwidth allocation for a billing item. func (r Billing_Item_Virtual_DedicatedHost) GetBandwidthAllocation() (resp datatypes.Network_Bandwidth_Version1_Allocation, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -1812,18 +3164,90 @@ func (r Billing_Item_Virtual_DedicatedHost) GetBillableChildren() (resp []dataty return } +func (r Billing_Item_Virtual_DedicatedHost) GetBillableChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBillableChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBillableChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's bundled billing items. func (r Billing_Item_Virtual_DedicatedHost) GetBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBundledItems", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetBundledItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBundledItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBundledItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's active child billing items. func (r Billing_Item_Virtual_DedicatedHost) GetCanceledChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCanceledChildren", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetCanceledChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCanceledChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCanceledChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item's cancellation reason. func (r Billing_Item_Virtual_DedicatedHost) GetCancellationReason() (resp datatypes.Billing_Item_Cancellation_Reason, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCancellationReason", nil, &r.Options, &resp) @@ -1836,6 +3260,30 @@ func (r Billing_Item_Virtual_DedicatedHost) GetCancellationRequests() (resp []da return } +func (r Billing_Item_Virtual_DedicatedHost) GetCancellationRequestsIter() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCancellationRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Cancellation_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCancellationRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The item category to which the billing item's item belongs. func (r Billing_Item_Virtual_DedicatedHost) GetCategory() (resp datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCategory", nil, &r.Options, &resp) @@ -1848,24 +3296,120 @@ func (r Billing_Item_Virtual_DedicatedHost) GetChildren() (resp []datatypes.Bill return } +func (r Billing_Item_Virtual_DedicatedHost) GetChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's active child billing items. func (r Billing_Item_Virtual_DedicatedHost) GetChildrenWithActiveAgreement() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildrenWithActiveAgreement", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetChildrenWithActiveAgreementIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildrenWithActiveAgreement", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildrenWithActiveAgreement", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve For product items which have a downgrade path defined, this will return those product items. func (r Billing_Item_Virtual_DedicatedHost) GetDowngradeItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getDowngradeItems", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetDowngradeItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getDowngradeItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getDowngradeItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's associated child billing items, excluding some items with a $0.00 recurring fee. func (r Billing_Item_Virtual_DedicatedHost) GetFilteredNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp) return } +func (r Billing_Item_Virtual_DedicatedHost) GetFilteredNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getFilteredNextInvoiceChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag that will reflect whether this billing item is billed on an hourly basis or not. func (r Billing_Item_Virtual_DedicatedHost) GetHourlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getHourlyFlag", nil, &r.Options, &resp) @@ -1884,6 +3428,30 @@ func (r Billing_Item_Virtual_DedicatedHost) GetInvoiceItems() (resp []datatypes. return } +func (r Billing_Item_Virtual_DedicatedHost) GetInvoiceItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getInvoiceItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getInvoiceItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The entry in the SoftLayer product catalog that a billing item is based upon. func (r Billing_Item_Virtual_DedicatedHost) GetItem() (resp datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getItem", nil, &r.Options, &resp) @@ -1902,6 +3470,30 @@ func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceChildren() (resp []dat return } +func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A Billing Item's total, including any child billing items if they exist.' func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceTotalOneTimeAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceTotalOneTimeAmount", nil, &r.Options, &resp) @@ -1932,6 +3524,30 @@ func (r Billing_Item_Virtual_DedicatedHost) GetNonZeroNextInvoiceChildren() (res return } +func (r Billing_Item_Virtual_DedicatedHost) GetNonZeroNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNonZeroNextInvoiceChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNonZeroNextInvoiceChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Billing_Item_Virtual_DedicatedHost) GetObject() (resp datatypes.Billing_Item_Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getObject", nil, &r.Options, &resp) @@ -2004,6 +3620,34 @@ func (r Billing_Item_Virtual_DedicatedHost) GetServiceBillingItemsByCategory(cat return } +func (r Billing_Item_Virtual_DedicatedHost) GetServiceBillingItemsByCategoryIter(categoryCode *string, includeZeroRecurringFee *bool) (resp []datatypes.Billing_Item, err error) { + params := []interface{}{ + categoryCode, + includeZeroRecurringFee, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getServiceBillingItemsByCategory", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getServiceBillingItemsByCategory", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A friendly description of software component func (r Billing_Item_Virtual_DedicatedHost) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getSoftwareDescription", nil, &r.Options, &resp) @@ -2022,6 +3666,30 @@ func (r Billing_Item_Virtual_DedicatedHost) GetUpgradeItems() (resp []datatypes. return } +func (r Billing_Item_Virtual_DedicatedHost) GetUpgradeItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getUpgradeItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getUpgradeItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Remove the association from a billing item. func (r Billing_Item_Virtual_DedicatedHost) RemoveAssociationId() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "removeAssociationId", nil, &r.Options, &resp) @@ -2101,6 +3769,30 @@ func (r Billing_Order) GetAllObjects() (resp []datatypes.Billing_Order, err erro return } +func (r Billing_Order) GetAllObjectsIter() (resp []datatypes.Billing_Order, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Billing_Order) GetBrand() (resp datatypes.Brand, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getBrand", nil, &r.Options, &resp) @@ -2119,12 +3811,60 @@ func (r Billing_Order) GetCoreRestrictedItems() (resp []datatypes.Billing_Order_ return } +func (r Billing_Order) GetCoreRestrictedItemsIter() (resp []datatypes.Billing_Order_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCoreRestrictedItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCoreRestrictedItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All credit card transactions associated with this order. If this order was not placed with a credit card, this will be empty. func (r Billing_Order) GetCreditCardTransactions() (resp []datatypes.Billing_Payment_Card_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCreditCardTransactions", nil, &r.Options, &resp) return } +func (r Billing_Order) GetCreditCardTransactionsIter() (resp []datatypes.Billing_Payment_Card_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCreditCardTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Payment_Card_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCreditCardTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Billing_Order) GetExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getExchangeRate", nil, &r.Options, &resp) @@ -2143,6 +3883,30 @@ func (r Billing_Order) GetItems() (resp []datatypes.Billing_Order_Item, err erro return } +func (r Billing_Order) GetItemsIter() (resp []datatypes.Billing_Order_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Billing_Order object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Order service. You can only retrieve orders that are assigned to your portal user's account. func (r Billing_Order) GetObject() (resp datatypes.Billing_Order, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getObject", nil, &r.Options, &resp) @@ -2173,12 +3937,60 @@ func (r Billing_Order) GetOrderStatuses() (resp []datatypes.Container_Billing_Or return } +func (r Billing_Order) GetOrderStatusesIter() (resp []datatypes.Container_Billing_Order_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderStatuses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Billing_Order_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderStatuses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An order's top level items. This normally includes the server line item and any non-server additional services such as NAS or ISCSI. func (r Billing_Order) GetOrderTopLevelItems() (resp []datatypes.Billing_Order_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTopLevelItems", nil, &r.Options, &resp) return } +func (r Billing_Order) GetOrderTopLevelItemsIter() (resp []datatypes.Billing_Order_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTopLevelItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTopLevelItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This amount represents the order's initial charge including set up fee and taxes. func (r Billing_Order) GetOrderTotalAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalAmount", nil, &r.Options, &resp) @@ -2239,6 +4051,30 @@ func (r Billing_Order) GetPaypalTransactions() (resp []datatypes.Billing_Payment return } +func (r Billing_Order) GetPaypalTransactionsIter() (resp []datatypes.Billing_Payment_PayPal_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPaypalTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Payment_PayPal_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPaypalTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a PDF record of a SoftLayer quote. If the order is not a quote, an error will be thrown. func (r Billing_Order) GetPdf() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPdf", nil, &r.Options, &resp) @@ -2417,6 +4253,30 @@ func (r Billing_Order_Cart) GetOrdersFromQuote() (resp []datatypes.Billing_Order return } +func (r Billing_Order_Cart) GetOrdersFromQuoteIter() (resp []datatypes.Billing_Order, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getOrdersFromQuote", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getOrdersFromQuote", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a PDF copy of the cart. func (r Billing_Order_Cart) GetPdf() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getPdf", nil, &r.Options, &resp) @@ -2555,6 +4415,30 @@ func (r Billing_Order_Item) GetBundledItems() (resp []datatypes.Billing_Order_It return } +func (r Billing_Order_Item) GetBundledItemsIter() (resp []datatypes.Billing_Order_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getBundledItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getBundledItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The item category tied to an order item. func (r Billing_Order_Item) GetCategory() (resp datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getCategory", nil, &r.Options, &resp) @@ -2567,6 +4451,30 @@ func (r Billing_Order_Item) GetChildren() (resp []datatypes.Billing_Order_Item, return } +func (r Billing_Order_Item) GetChildrenIter() (resp []datatypes.Billing_Order_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's universally unique identifier. func (r Billing_Order_Item) GetGlobalIdentifier() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getGlobalIdentifier", nil, &r.Options, &resp) @@ -2591,6 +4499,30 @@ func (r Billing_Order_Item) GetItemCategoryAnswers() (resp []datatypes.Billing_O return } +func (r Billing_Order_Item) GetItemCategoryAnswersIter() (resp []datatypes.Billing_Order_Item_Category_Answer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItemCategoryAnswers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Item_Category_Answer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItemCategoryAnswers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Product_Item_Price tied to an order item. The item price object describes the cost of an item. func (r Billing_Order_Item) GetItemPrice() (resp datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItemPrice", nil, &r.Options, &resp) @@ -2609,6 +4541,30 @@ func (r Billing_Order_Item) GetNextOrderChildren() (resp []datatypes.Billing_Ord return } +func (r Billing_Order_Item) GetNextOrderChildrenIter() (resp []datatypes.Billing_Order_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getNextOrderChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getNextOrderChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Billing_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item service. You can only retrieve billing items tied to the account that your portal user is assigned to. Billing items are an account's items of billable items. There are "parent" billing items and "child" billing items. The server billing item is generally referred to as a parent billing item. The items tied to a server, such as ram, harddrives, and operating systems are considered "child" billing items. func (r Billing_Order_Item) GetObject() (resp datatypes.Billing_Order_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getObject", nil, &r.Options, &resp) @@ -2675,6 +4631,30 @@ func (r Billing_Order_Item) GetStorageGroups() (resp []datatypes.Configuration_S return } +func (r Billing_Order_Item) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group_Order, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group_Order{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The recurring fee of an ordered item. This amount represents the fees that will be charged on a recurring (usually monthly) basis. func (r Billing_Order_Item) GetTotalRecurringAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getTotalRecurringAmount", nil, &r.Options, &resp) @@ -2775,6 +4755,30 @@ func (r Billing_Order_Quote) GetOrdersFromQuote() (resp []datatypes.Billing_Orde return } +func (r Billing_Order_Quote) GetOrdersFromQuoteIter() (resp []datatypes.Billing_Order, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getOrdersFromQuote", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getOrdersFromQuote", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a PDF record of a SoftLayer quoted order. SoftLayer keeps PDF records of all quoted orders for customer retrieval from the portal and API. You must have a PDF reader installed in order to view these quoted order files. func (r Billing_Order_Quote) GetPdf() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getPdf", nil, &r.Options, &resp) diff --git a/services/brand.go b/services/brand.go index a19a601..ee931af 100644 --- a/services/brand.go +++ b/services/brand.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -210,6 +211,30 @@ func (r Brand) GetAllOwnedAccounts() (resp []datatypes.Account, err error) { return } +func (r Brand) GetAllOwnedAccountsIter() (resp []datatypes.Account, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getAllOwnedAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getAllOwnedAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // (DEPRECATED) Use [[SoftLayer_Ticket_Subject::getAllObjects]] method. // Deprecated: This function has been marked as deprecated. func (r Brand) GetAllTicketSubjects(account *datatypes.Account) (resp []datatypes.Ticket_Subject, err error) { @@ -220,6 +245,33 @@ func (r Brand) GetAllTicketSubjects(account *datatypes.Account) (resp []datatype return } +func (r Brand) GetAllTicketSubjectsIter(account *datatypes.Account) (resp []datatypes.Ticket_Subject, err error) { + params := []interface{}{ + account, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getAllTicketSubjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Subject{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getAllTicketSubjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This flag indicates if creation of accounts is allowed. func (r Brand) GetAllowAccountCreationFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getAllowAccountCreationFlag", nil, &r.Options, &resp) @@ -232,6 +284,30 @@ func (r Brand) GetBillingItemSnapshots() (resp []datatypes.Billing_Item_Chronicl return } +func (r Brand) GetBillingItemSnapshotsIter() (resp []datatypes.Billing_Item_Chronicle, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Chronicle{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This service returns the snapshots of billing items recorded periodically given an account ID. The provided account ID must be owned by the brand that calls this service. In this context, it can be interpreted that the billing items snapshots belong to both the account and that accounts brand. Retrieving billing item snapshots is more performant than retrieving billing items directly and performs less relational joins improving retrieval efficiency. // // The downside is, they are not real time, and do not share relational parity with the original billing item. @@ -243,6 +319,33 @@ func (r Brand) GetBillingItemSnapshotsForSingleOwnedAccount(accountId *int) (res return } +func (r Brand) GetBillingItemSnapshotsForSingleOwnedAccountIter(accountId *int) (resp []datatypes.Billing_Item_Chronicle, err error) { + params := []interface{}{ + accountId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshotsForSingleOwnedAccount", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Chronicle{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshotsForSingleOwnedAccount", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This service returns the snapshots of billing items recorded periodically given an account ID owned by the brand those billing items belong to. Retrieving billing item snapshots is more performant than retrieving billing items directly and performs less relational joins improving retrieval efficiency. // // The downside is, they are not real time, and do not share relational parity with the original billing item. @@ -254,6 +357,33 @@ func (r Brand) GetBillingItemSnapshotsWithExternalAccountId(externalAccountId *s return } +func (r Brand) GetBillingItemSnapshotsWithExternalAccountIdIter(externalAccountId *string) (resp []datatypes.Billing_Item_Chronicle, err error) { + params := []interface{}{ + externalAccountId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshotsWithExternalAccountId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item_Chronicle{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshotsWithExternalAccountId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Business Partner details for the brand. Country Enterprise Code, Channel, Segment, Reseller Level. func (r Brand) GetBusinessPartner() (resp datatypes.Brand_Business_Partner, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getBusinessPartner", nil, &r.Options, &resp) @@ -278,18 +408,90 @@ func (r Brand) GetContactInformation() (resp []datatypes.Brand_Contact, err erro return } +func (r Brand) GetContactInformationIter() (resp []datatypes.Brand_Contact, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getContactInformation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Brand_Contact{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getContactInformation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The contacts for the brand. func (r Brand) GetContacts() (resp []datatypes.Brand_Contact, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getContacts", nil, &r.Options, &resp) return } +func (r Brand) GetContactsIter() (resp []datatypes.Brand_Contact, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getContacts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Brand_Contact{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getContacts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain. func (r Brand) GetCustomerCountryLocationRestrictions() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getCustomerCountryLocationRestrictions", nil, &r.Options, &resp) return } +func (r Brand) GetCustomerCountryLocationRestrictionsIter() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getCustomerCountryLocationRestrictions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Brand_Restriction_Location_CustomerCountry{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getCustomerCountryLocationRestrictions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Brand) GetDistributor() (resp datatypes.Brand, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getDistributor", nil, &r.Options, &resp) @@ -314,6 +516,30 @@ func (r Brand) GetHardware() (resp []datatypes.Hardware, err error) { return } +func (r Brand) GetHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Brand) GetHasAgentAdvancedSupportFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getHasAgentAdvancedSupportFlag", nil, &r.Options, &resp) @@ -344,12 +570,60 @@ func (r Brand) GetOpenTickets() (resp []datatypes.Ticket, err error) { return } +func (r Brand) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getOpenTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getOpenTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Active accounts owned by the brand. func (r Brand) GetOwnedAccounts() (resp []datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getOwnedAccounts", nil, &r.Options, &resp) return } +func (r Brand) GetOwnedAccountsIter() (resp []datatypes.Account, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getOwnedAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getOwnedAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Brand) GetSecurityLevel() (resp datatypes.Security_Level, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getSecurityLevel", nil, &r.Options, &resp) @@ -362,12 +636,60 @@ func (r Brand) GetTicketGroups() (resp []datatypes.Ticket_Group, err error) { return } +func (r Brand) GetTicketGroupsIter() (resp []datatypes.Ticket_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getTicketGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getTicketGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Brand) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getTickets", nil, &r.Options, &resp) return } +func (r Brand) GetTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // (DEPRECATED) Use [[SoftLayer_User_Customer::getImpersonationToken]] method. func (r Brand) GetToken(userId *int) (resp string, err error) { params := []interface{}{ @@ -383,12 +705,60 @@ func (r Brand) GetUsers() (resp []datatypes.User_Customer, err error) { return } +func (r Brand) GetUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated virtual guest objects. func (r Brand) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getVirtualGuests", nil, &r.Options, &resp) return } +func (r Brand) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Check if the brand is IBM SLIC top level brand or sub brand. func (r Brand) IsIbmSlicBrand() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "isIbmSlicBrand", nil, &r.Options, &resp) @@ -559,6 +929,30 @@ func (r Brand_Restriction_Location_CustomerCountry) GetAllObjects() (resp []data return } +func (r Brand_Restriction_Location_CustomerCountry) GetAllObjectsIter() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Brand_Restriction_Location_CustomerCountry{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This references the brand that has a brand-location-country restriction setup. func (r Brand_Restriction_Location_CustomerCountry) GetBrand() (resp datatypes.Brand, err error) { err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getBrand", nil, &r.Options, &resp) diff --git a/services/catalyst.go b/services/catalyst.go index 6462ac0..9a98dc3 100644 --- a/services/catalyst.go +++ b/services/catalyst.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,6 +69,30 @@ func (r Catalyst_Company_Type) GetAllObjects() (resp []datatypes.Catalyst_Compan return } +func (r Catalyst_Company_Type) GetAllObjectsIter() (resp []datatypes.Catalyst_Company_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Catalyst_Company_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Catalyst_Company_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Catalyst_Company_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Catalyst_Company_Type) GetObject() (resp datatypes.Catalyst_Company_Type, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Company_Type", "getObject", nil, &r.Options, &resp) @@ -132,6 +157,30 @@ func (r Catalyst_Enrollment) GetAffiliates() (resp []datatypes.Catalyst_Affiliat return } +func (r Catalyst_Enrollment) GetAffiliatesIter() (resp []datatypes.Catalyst_Affiliate, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getAffiliates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Catalyst_Affiliate{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getAffiliates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Catalyst_Enrollment) GetCompanyType() (resp datatypes.Catalyst_Company_Type, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getCompanyType", nil, &r.Options, &resp) @@ -144,24 +193,120 @@ func (r Catalyst_Enrollment) GetCompanyTypes() (resp []datatypes.Catalyst_Compan return } +func (r Catalyst_Enrollment) GetCompanyTypesIter() (resp []datatypes.Catalyst_Company_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getCompanyTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Catalyst_Company_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getCompanyTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Catalyst_Enrollment) GetEnrollmentRequestAnnualRevenueOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestAnnualRevenueOptions", nil, &r.Options, &resp) return } +func (r Catalyst_Enrollment) GetEnrollmentRequestAnnualRevenueOptionsIter() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestAnnualRevenueOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestAnnualRevenueOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Catalyst_Enrollment) GetEnrollmentRequestUserCountOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestUserCountOptions", nil, &r.Options, &resp) return } +func (r Catalyst_Enrollment) GetEnrollmentRequestUserCountOptionsIter() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestUserCountOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestUserCountOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Catalyst_Enrollment) GetEnrollmentRequestYearsInOperationOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestYearsInOperationOptions", nil, &r.Options, &resp) return } +func (r Catalyst_Enrollment) GetEnrollmentRequestYearsInOperationOptionsIter() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestYearsInOperationOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestYearsInOperationOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Catalyst_Enrollment) GetIsActiveFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getIsActiveFlag", nil, &r.Options, &resp) diff --git a/services/compliance.go b/services/compliance.go index 0940658..12baf53 100644 --- a/services/compliance.go +++ b/services/compliance.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,6 +69,30 @@ func (r Compliance_Report_Type) GetAllObjects() (resp []datatypes.Compliance_Rep return } +func (r Compliance_Report_Type) GetAllObjectsIter() (resp []datatypes.Compliance_Report_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Compliance_Report_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Compliance_Report_Type) GetObject() (resp datatypes.Compliance_Report_Type, err error) { err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getObject", nil, &r.Options, &resp) diff --git a/services/configuration.go b/services/configuration.go index 1343c6a..f8d2491 100644 --- a/services/configuration.go +++ b/services/configuration.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,12 +69,60 @@ func (r Configuration_Storage_Group_Array_Type) GetAllObjects() (resp []datatype return } +func (r Configuration_Storage_Group_Array_Type) GetAllObjectsIter() (resp []datatypes.Configuration_Storage_Group_Array_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group_Array_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Storage_Group_Array_Type) GetHardwareComponentModels() (resp []datatypes.Hardware_Component_Model, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getHardwareComponentModels", nil, &r.Options, &resp) return } +func (r Configuration_Storage_Group_Array_Type) GetHardwareComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getHardwareComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getHardwareComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Configuration_Storage_Group_Array_Type) GetObject() (resp datatypes.Configuration_Storage_Group_Array_Type, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getObject", nil, &r.Options, &resp) @@ -156,24 +205,120 @@ func (r Configuration_Template) GetAllObjects() (resp []datatypes.Configuration_ return } +func (r Configuration_Template) GetAllObjectsIter() (resp []datatypes.Configuration_Template, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Template) GetConfigurationSections() (resp []datatypes.Configuration_Template_Section, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getConfigurationSections", nil, &r.Options, &resp) return } +func (r Configuration_Template) GetConfigurationSectionsIter() (resp []datatypes.Configuration_Template_Section, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getConfigurationSections", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template_Section{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getConfigurationSections", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Template) GetDefaultValues() (resp []datatypes.Configuration_Template_Section_Definition_Value, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefaultValues", nil, &r.Options, &resp) return } +func (r Configuration_Template) GetDefaultValuesIter() (resp []datatypes.Configuration_Template_Section_Definition_Value, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefaultValues", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template_Section_Definition_Value{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefaultValues", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Template) GetDefinitions() (resp []datatypes.Configuration_Template_Section_Definition, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefinitions", nil, &r.Options, &resp) return } +func (r Configuration_Template) GetDefinitionsIter() (resp []datatypes.Configuration_Template_Section_Definition, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefinitions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template_Section_Definition{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefinitions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Template) GetItem() (resp datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getItem", nil, &r.Options, &resp) @@ -261,6 +406,30 @@ func (r Configuration_Template_Section) GetDefinitions() (resp []datatypes.Confi return } +func (r Configuration_Template_Section) GetDefinitionsIter() (resp []datatypes.Configuration_Template_Section_Definition, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getDefinitions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template_Section_Definition{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getDefinitions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Template_Section) GetDisallowedDeletionFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getDisallowedDeletionFlag", nil, &r.Options, &resp) @@ -291,6 +460,30 @@ func (r Configuration_Template_Section) GetProfiles() (resp []datatypes.Configur return } +func (r Configuration_Template_Section) GetProfilesIter() (resp []datatypes.Configuration_Template_Section_Profile, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getProfiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template_Section_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getProfiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Template_Section) GetSectionType() (resp datatypes.Configuration_Template_Section_Type, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSectionType", nil, &r.Options, &resp) @@ -309,6 +502,30 @@ func (r Configuration_Template_Section) GetSubSections() (resp []datatypes.Confi return } +func (r Configuration_Template_Section) GetSubSectionsIter() (resp []datatypes.Configuration_Template_Section, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSubSections", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template_Section{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSubSections", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Template_Section) GetTemplate() (resp datatypes.Configuration_Template, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getTemplate", nil, &r.Options, &resp) @@ -369,6 +586,30 @@ func (r Configuration_Template_Section_Definition) GetAttributes() (resp []datat return } +func (r Configuration_Template_Section_Definition) GetAttributesIter() (resp []datatypes.Configuration_Template_Section_Definition_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template_Section_Definition_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Configuration_Template_Section_Definition) GetDefaultValue() (resp datatypes.Configuration_Template_Section_Definition_Value, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getDefaultValue", nil, &r.Options, &resp) @@ -453,6 +694,30 @@ func (r Configuration_Template_Section_Definition_Group) GetAllGroups() (resp [] return } +func (r Configuration_Template_Section_Definition_Group) GetAllGroupsIter() (resp []datatypes.Configuration_Template_Section_Definition_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getAllGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template_Section_Definition_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getAllGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Configuration_Template_Section_Definition_Group) GetObject() (resp datatypes.Configuration_Template_Section_Definition_Group, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getObject", nil, &r.Options, &resp) diff --git a/services/dns.go b/services/dns.go index edf6c12..e56d9e4 100644 --- a/services/dns.go +++ b/services/dns.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -151,6 +152,33 @@ func (r Dns_Domain) CreateObjects(templateObjects []datatypes.Dns_Domain) (resp return } +func (r Dns_Domain) CreateObjectsIter(templateObjects []datatypes.Dns_Domain) (resp []datatypes.Dns_Domain, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Domain", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Domain", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // setPtrRecordForIpAddress() sets a single reverse DNS record for a single IP address and returns the newly created or edited [[SoftLayer_Dns_Domain_ResourceRecord]] record. Currently this method only supports IPv4 addresses and performs no operation when given an IPv6 address. func (r Dns_Domain) CreatePtrRecord(ipAddress *string, ptrRecord *string, ttl *int) (resp datatypes.Dns_Domain_ResourceRecord, err error) { params := []interface{}{ @@ -205,6 +233,33 @@ func (r Dns_Domain) GetByDomainName(name *string) (resp []datatypes.Dns_Domain, return } +func (r Dns_Domain) GetByDomainNameIter(name *string) (resp []datatypes.Dns_Domain, err error) { + params := []interface{}{ + name, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getByDomainName", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getByDomainName", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating that the dns domain record is a managed resource. func (r Dns_Domain) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -223,6 +278,30 @@ func (r Dns_Domain) GetResourceRecords() (resp []datatypes.Dns_Domain_ResourceRe return } +func (r Dns_Domain) GetResourceRecordsIter() (resp []datatypes.Dns_Domain_ResourceRecord, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getResourceRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain_ResourceRecord{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getResourceRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The secondary DNS record that defines this domain as being managed through zone transfers. func (r Dns_Domain) GetSecondary() (resp datatypes.Dns_Secondary, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getSecondary", nil, &r.Options, &resp) @@ -315,6 +394,33 @@ func (r Dns_Domain_ResourceRecord) CreateObjects(templateObjects []datatypes.Dns return } +func (r Dns_Domain_ResourceRecord) CreateObjectsIter(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain_ResourceRecord{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Delete a domain's resource record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord object. The serial number of the domain associated with this resource record is updated upon deletion. You may not delete SOA, NS, or PTR resource records. // // ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. @@ -432,6 +538,33 @@ func (r Dns_Domain_ResourceRecord_MxType) CreateObjects(templateObjects []dataty return } +func (r Dns_Domain_ResourceRecord_MxType) CreateObjectsIter(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_MxType", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain_ResourceRecord{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_MxType", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Delete a domain's MX record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord_MxType object. The serial number of the domain associated with this MX record is updated upon deletion. // // ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. @@ -545,6 +678,33 @@ func (r Dns_Domain_ResourceRecord_SrvType) CreateObjects(templateObjects []datat return } +func (r Dns_Domain_ResourceRecord_SrvType) CreateObjectsIter(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_SrvType", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain_ResourceRecord{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_SrvType", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Delete a domain's SRV record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord_SrvType object. The serial number of the domain associated with this SRV record is updated upon deletion. // // ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. @@ -674,6 +834,33 @@ func (r Dns_Secondary) CreateObjects(templateObjects []datatypes.Dns_Secondary) return } +func (r Dns_Secondary) CreateObjectsIter(templateObjects []datatypes.Dns_Secondary) (resp []datatypes.Dns_Secondary, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Secondary{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Delete a secondary DNS Record. This will also remove any associated domain records and resource records on the SoftLayer nameservers that were created as a result of the zone transfers. This action cannot be undone. func (r Dns_Secondary) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "deleteObject", nil, &r.Options, &resp) @@ -704,6 +891,33 @@ func (r Dns_Secondary) GetByDomainName(name *string) (resp []datatypes.Dns_Secon return } +func (r Dns_Secondary) GetByDomainNameIter(name *string) (resp []datatypes.Dns_Secondary, err error) { + params := []interface{}{ + name, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getByDomainName", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Secondary{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getByDomainName", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The domain record created by zone transfer from a secondary DNS record. func (r Dns_Secondary) GetDomain() (resp datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getDomain", nil, &r.Options, &resp) @@ -716,6 +930,30 @@ func (r Dns_Secondary) GetErrorMessages() (resp []datatypes.Dns_Message, err err return } +func (r Dns_Secondary) GetErrorMessagesIter() (resp []datatypes.Dns_Message, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getErrorMessages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Message{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getErrorMessages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Dns_Secondary object whose ID number corresponds to the ID number of the init paramater passed to the SoftLayer_Dns_Secondary service. You can only retrieve a secondary DNS record that is assigned to your SoftLayer customer account. func (r Dns_Secondary) GetObject() (resp datatypes.Dns_Secondary, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getObject", nil, &r.Options, &resp) diff --git a/services/email.go b/services/email.go index 2d36ae9..4773010 100644 --- a/services/email.go +++ b/services/email.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -80,6 +81,30 @@ func (r Email_Subscription) GetAllObjects() (resp []datatypes.Email_Subscription return } +func (r Email_Subscription) GetAllObjectsIter() (resp []datatypes.Email_Subscription, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Email_Subscription", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Email_Subscription{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Email_Subscription", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Email_Subscription) GetEnabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Email_Subscription", "getEnabled", nil, &r.Options, &resp) @@ -138,6 +163,30 @@ func (r Email_Subscription_Group) GetAllObjects() (resp []datatypes.Email_Subscr return } +func (r Email_Subscription_Group) GetAllObjectsIter() (resp []datatypes.Email_Subscription_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Email_Subscription_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Email_Subscription_Group) GetObject() (resp datatypes.Email_Subscription_Group, err error) { err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getObject", nil, &r.Options, &resp) @@ -149,3 +198,27 @@ func (r Email_Subscription_Group) GetSubscriptions() (resp []datatypes.Email_Sub err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getSubscriptions", nil, &r.Options, &resp) return } + +func (r Email_Subscription_Group) GetSubscriptionsIter() (resp []datatypes.Email_Subscription, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getSubscriptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Email_Subscription{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getSubscriptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} diff --git a/services/event.go b/services/event.go index 69307bb..9bd64d8 100644 --- a/services/event.go +++ b/services/event.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -71,24 +72,123 @@ func (r Event_Log) GetAllEventNames(objectName *string) (resp []string, err erro return } +func (r Event_Log) GetAllEventNamesIter(objectName *string) (resp []string, err error) { + params := []interface{}{ + objectName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventNames", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventNames", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This all indexed event object names. func (r Event_Log) GetAllEventObjectNames() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventObjectNames", nil, &r.Options, &resp) return } +func (r Event_Log) GetAllEventObjectNamesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventObjectNames", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventObjectNames", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Event_Log) GetAllObjects() (resp []datatypes.Event_Log, err error) { err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllObjects", nil, &r.Options, &resp) return } +func (r Event_Log) GetAllObjectsIter() (resp []datatypes.Event_Log, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Event_Log{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Event_Log) GetAllUserTypes() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllUserTypes", nil, &r.Options, &resp) return } +func (r Event_Log) GetAllUserTypesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllUserTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllUserTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Event_Log) GetUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Event_Log", "getUser", nil, &r.Options, &resp) diff --git a/services/flexiblecredit.go b/services/flexiblecredit.go index 8d02519..7d415ab 100644 --- a/services/flexiblecredit.go +++ b/services/flexiblecredit.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -71,12 +72,63 @@ func (r FlexibleCredit_Program) GetAffiliatesAvailableForSelfEnrollmentByVerific return } +func (r FlexibleCredit_Program) GetAffiliatesAvailableForSelfEnrollmentByVerificationTypeIter(verificationTypeKeyName *string) (resp []datatypes.FlexibleCredit_Affiliate, err error) { + params := []interface{}{ + verificationTypeKeyName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getAffiliatesAvailableForSelfEnrollmentByVerificationType", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.FlexibleCredit_Affiliate{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getAffiliatesAvailableForSelfEnrollmentByVerificationType", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r FlexibleCredit_Program) GetCompanyTypes() (resp []datatypes.FlexibleCredit_Company_Type, err error) { err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getCompanyTypes", nil, &r.Options, &resp) return } +func (r FlexibleCredit_Program) GetCompanyTypesIter() (resp []datatypes.FlexibleCredit_Company_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getCompanyTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.FlexibleCredit_Company_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getCompanyTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r FlexibleCredit_Program) GetObject() (resp datatypes.FlexibleCredit_Program, err error) { err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getObject", nil, &r.Options, &resp) diff --git a/services/hardware.go b/services/hardware.go index c1d9bde..5f573cb 100644 --- a/services/hardware.go +++ b/services/hardware.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -446,18 +447,90 @@ func (r Hardware) GetActiveComponents() (resp []datatypes.Hardware_Component, er return } +func (r Hardware) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's active network monitoring incidents. func (r Hardware) GetActiveNetworkMonitorIncident() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) return } +func (r Hardware) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAllPowerComponents", nil, &r.Options, &resp) return } +func (r Hardware) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getAllPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getAllPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedHost", nil, &r.Options, &resp) @@ -470,12 +543,60 @@ func (r Hardware) GetAllowedNetworkStorage() (resp []datatypes.Network_Storage, return } +func (r Hardware) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } +func (r Hardware) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -491,18 +612,93 @@ func (r Hardware) GetAttachedNetworkStorages(nasType *string) (resp []datatypes. return } +func (r Hardware) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getAttachedNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getAttachedNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAttributes", nil, &r.Options, &resp) return } +func (r Hardware) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } +func (r Hardware) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -512,6 +708,33 @@ func (r Hardware) GetAvailableNetworkStorages(nasType *string) (resp []datatypes return } +func (r Hardware) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The average daily public bandwidth usage for the current billing cycle. func (r Hardware) GetAverageDailyPublicBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAverageDailyPublicBandwidthUsage", nil, &r.Options, &resp) @@ -534,6 +757,30 @@ func (r Hardware) GetBackendNetworkComponents() (resp []datatypes.Network_Compon return } +func (r Hardware) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -550,6 +797,30 @@ func (r Hardware) GetBackendRouters() (resp []datatypes.Hardware, err error) { return } +func (r Hardware) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getBackendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getBackendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -568,6 +839,30 @@ func (r Hardware) GetBenchmarkCertifications() (resp []datatypes.Hardware_Benchm return } +func (r Hardware) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getBenchmarkCertifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Benchmark_Certification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getBenchmarkCertifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the billing item for a server. func (r Hardware) GetBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getBillingItem", nil, &r.Options, &resp) @@ -598,6 +893,30 @@ func (r Hardware) GetChildrenHardware() (resp []datatypes.Hardware, err error) { return } +func (r Hardware) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getChildrenHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getChildrenHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -610,6 +929,30 @@ func (r Hardware) GetComponents() (resp []datatypes.Hardware_Component, err erro return } +func (r Hardware) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A continuous data protection/server backup software component object. func (r Hardware) GetContinuousDataProtectionSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getContinuousDataProtectionSoftwareComponent", nil, &r.Options, &resp) @@ -636,6 +979,30 @@ func (r Hardware) GetCurrentBillingDetail() (resp []datatypes.Billing_Item, err return } +func (r Hardware) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getCurrentBillingDetail", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getCurrentBillingDetail", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -676,66 +1043,330 @@ func (r Hardware) GetDownlinkHardware() (resp []datatypes.Hardware, err error) { return } +func (r Hardware) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkServers", nil, &r.Options, &resp) return } +func (r Hardware) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware downstream from a network device. func (r Hardware) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } +func (r Hardware) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamHardwareBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Uplink_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamHardwareBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } +func (r Hardware) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamServers", nil, &r.Options, &resp) return } +func (r Hardware) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDriveControllers", nil, &r.Options, &resp) return } +func (r Hardware) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getDriveControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getDriveControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } +func (r Hardware) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getEvaultNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getEvaultNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -764,6 +1395,30 @@ func (r Hardware) GetFrontendNetworkComponents() (resp []datatypes.Network_Compo return } +func (r Hardware) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getFrontendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getFrontendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -780,6 +1435,30 @@ func (r Hardware) GetFrontendRouters() (resp []datatypes.Hardware, err error) { return } +func (r Hardware) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getFrontendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getFrontendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the future billing item for a server. func (r Hardware) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getFutureBillingItem", nil, &r.Options, &resp) @@ -798,6 +1477,30 @@ func (r Hardware) GetHardDrives() (resp []datatypes.Hardware_Component, err erro return } +func (r Hardware) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getHardDrives", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getHardDrives", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The chassis that a piece of hardware is housed in. func (r Hardware) GetHardwareChassis() (resp datatypes.Hardware_Chassis, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getHardwareChassis", nil, &r.Options, &resp) @@ -856,6 +1559,34 @@ func (r Hardware) GetHourlyBandwidth(mode *string, day *datatypes.Time) (resp [] return } +func (r Hardware) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + mode, + day, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getHourlyBandwidth", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getHourlyBandwidth", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A server's hourly billing status. func (r Hardware) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -922,6 +1653,30 @@ func (r Hardware) GetMemory() (resp []datatypes.Hardware_Component, err error) { return } +func (r Hardware) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getMemory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getMemory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getMemoryCapacity", nil, &r.Options, &resp) @@ -940,6 +1695,30 @@ func (r Hardware) GetModules() (resp []datatypes.Hardware_Component, err error) return } +func (r Hardware) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getModules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getModules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getMonitoringRobot", nil, &r.Options, &resp) @@ -970,12 +1749,60 @@ func (r Hardware) GetNetworkCards() (resp []datatypes.Hardware_Component, err er return } +func (r Hardware) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkCards", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkCards", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Returns a hardware's network components. func (r Hardware) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -1000,24 +1827,120 @@ func (r Hardware) GetNetworkMonitorAttachedDownHardware() (resp []datatypes.Hard return } +func (r Hardware) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } +func (r Hardware) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitors", nil, &r.Options, &resp) return } +func (r Hardware) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkStatus", nil, &r.Options, &resp) @@ -1036,12 +1959,60 @@ func (r Hardware) GetNetworkStorage() (resp []datatypes.Network_Storage, err err return } +func (r Hardware) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkVlans", nil, &r.Options, &resp) return } +func (r Hardware) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -1054,6 +2025,30 @@ func (r Hardware) GetNotesHistory() (resp []datatypes.Hardware_Note, err error) return } +func (r Hardware) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNotesHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Note{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNotesHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNvRamCapacity", nil, &r.Options, &resp) @@ -1066,6 +2061,30 @@ func (r Hardware) GetNvRamComponentModels() (resp []datatypes.Hardware_Component return } +func (r Hardware) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getNvRamComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getNvRamComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Hardware object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Hardware service. You can only retrieve the account that your portal user is assigned to. func (r Hardware) GetObject() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getObject", nil, &r.Options, &resp) @@ -1120,12 +2139,60 @@ func (r Hardware) GetPowerComponents() (resp []datatypes.Hardware_Power_Componen return } +func (r Hardware) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerSupply", nil, &r.Options, &resp) return } +func (r Hardware) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerSupply", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerSupply", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware's primary private IP address. func (r Hardware) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -1160,6 +2227,34 @@ func (r Hardware) GetPrivateBandwidthData(startTime *int, endTime *int) (resp [] return } +func (r Hardware) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getPrivateBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getPrivateBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether the hardware only has access to the private network. func (r Hardware) GetPrivateNetworkOnlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getPrivateNetworkOnlyFlag", nil, &r.Options, &resp) @@ -1184,6 +2279,30 @@ func (r Hardware) GetProcessors() (resp []datatypes.Hardware_Component, err erro return } +func (r Hardware) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getProcessors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getProcessors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a graph of a server's public network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPublicBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware) GetPublicBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -1194,6 +2313,34 @@ func (r Hardware) GetPublicBandwidthData(startTime *int, endTime *int) (resp []d return } +func (r Hardware) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getPublicBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getPublicBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware) GetRack() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRack", nil, &r.Options, &resp) @@ -1206,18 +2353,90 @@ func (r Hardware) GetRaidControllers() (resp []datatypes.Hardware_Component, err return } +func (r Hardware) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getRaidControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getRaidControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Recent events that impact this hardware. func (r Hardware) GetRecentEvents() (resp []datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRecentEvents", nil, &r.Options, &resp) return } +func (r Hardware) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getRecentEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getRecentEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve User credentials to issue commands and/or interact with the server's remote management card. func (r Hardware) GetRemoteManagementAccounts() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRemoteManagementAccounts", nil, &r.Options, &resp) return } +func (r Hardware) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getRemoteManagementAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getRemoteManagementAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -1230,42 +2449,210 @@ func (r Hardware) GetResourceConfigurations() (resp []datatypes.Hardware_Resourc return } +func (r Hardware) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceConfigurations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Resource_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceConfigurations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } +func (r Hardware) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupMemberReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupMemberReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupRoles", nil, &r.Options, &resp) return } +func (r Hardware) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The resource groups in which this hardware is a member. func (r Hardware) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroups", nil, &r.Options, &resp) return } +func (r Hardware) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's routers. func (r Hardware) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRouters", nil, &r.Options, &resp) return } +func (r Hardware) GetRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's vulnerability scan requests. func (r Hardware) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSecurityScanRequests", nil, &r.Options, &resp) return } +func (r Hardware) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getSecurityScanRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Security_Scanner_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getSecurityScanRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getSensorData”' method retrieves a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures various information, including system temperatures, voltages and other local server settings. Sensor data is cached for 30 second; calls made to this method for the same server within 30 seconds of each other will result in the same data being returned. To ensure that the data retrieved retrieves snapshot of varied data, make calls greater than 30 seconds apart. func (r Hardware) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorData", nil, &r.Options, &resp) return } +func (r Hardware) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_SensorReading{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getSensorDataWithGraphs”' method retrieves the raw data returned from the server's remote management card. Along with raw data, graphs for the CPU and system temperatures and fan speeds are also returned. For more details on what information is returned, refer to the ”getSensorData” method. func (r Hardware) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -1278,6 +2665,30 @@ func (r Hardware) GetServerFanSpeedGraphs() (resp []datatypes.Container_RemoteMa return } +func (r Hardware) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getServerFanSpeedGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getServerFanSpeedGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getPowerState”' method retrieves the power state for the selected server. The server's power status is retrieved from its remote management card. This method returns "on", for a server that has been powered on, or "off" for servers powered off. func (r Hardware) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getServerPowerState", nil, &r.Options, &resp) @@ -1296,6 +2707,30 @@ func (r Hardware) GetServerTemperatureGraphs() (resp []datatypes.Container_Remot return } +func (r Hardware) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getServerTemperatureGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getServerTemperatureGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getServiceProvider", nil, &r.Options, &resp) @@ -1308,6 +2743,30 @@ func (r Hardware) GetSoftwareComponents() (resp []datatypes.Software_Component, return } +func (r Hardware) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getSoftwareComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getSoftwareComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the billing item for a spare pool server. func (r Hardware) GetSparePoolBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSparePoolBillingItem", nil, &r.Options, &resp) @@ -1320,24 +2779,120 @@ func (r Hardware) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err error) { return } +func (r Hardware) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware) GetStorageGroups() (resp []datatypes.Configuration_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageGroups", nil, &r.Options, &resp) return } +func (r Hardware) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getTagReferences", nil, &r.Options, &resp) return } +func (r Hardware) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getTopLevelLocation", nil, &r.Options, &resp) @@ -1350,12 +2905,60 @@ func (r Hardware) GetTransactionHistory() (resp []datatypes.Provisioning_Version return } +func (r Hardware) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getTransactionHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getTransactionHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a list of upgradeable items available to this piece of hardware. Currently, getUpgradeItemPrices retrieves upgrades available for a server's memory, hard drives, network port speed, bandwidth allocation and GPUs. func (r Hardware) GetUpgradeItemPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeItemPrices", nil, &r.Options, &resp) return } +func (r Hardware) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated upgrade request object, if any. func (r Hardware) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeRequest", nil, &r.Options, &resp) @@ -1368,6 +2971,30 @@ func (r Hardware) GetUpgradeableActiveComponents() (resp []datatypes.Hardware_Co return } +func (r Hardware) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeableActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeableActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network device connected to a piece of hardware. func (r Hardware) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getUplinkHardware", nil, &r.Options, &resp) @@ -1380,12 +3007,60 @@ func (r Hardware) GetUplinkNetworkComponents() (resp []datatypes.Network_Compone return } +func (r Hardware) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getUplinkNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getUplinkNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getUserData", nil, &r.Options, &resp) return } +func (r Hardware) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getUserData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getUserData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualChassis", nil, &r.Options, &resp) @@ -1398,6 +3073,30 @@ func (r Hardware) GetVirtualChassisSiblings() (resp []datatypes.Hardware, err er return } +func (r Hardware) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualChassisSiblings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualChassisSiblings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's virtual host record. func (r Hardware) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualHost", nil, &r.Options, &resp) @@ -1410,6 +3109,30 @@ func (r Hardware) GetVirtualLicenses() (resp []datatypes.Software_VirtualLicense return } +func (r Hardware) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_VirtualLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualRack", nil, &r.Options, &resp) @@ -1722,6 +3445,33 @@ func (r Hardware_Component_Locator) GetGenericComponentModelAvailability(generic return } +func (r Hardware_Component_Locator) GetGenericComponentModelAvailabilityIter(genericComponentModelIds []int) (resp []datatypes.Hardware_Component_Locator_Result, err error) { + params := []interface{}{ + genericComponentModelIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getGenericComponentModelAvailability", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Locator_Result{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getGenericComponentModelAvailability", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_Component_Locator) GetPackageItemsAvailability(packageId *int) (resp []datatypes.Hardware_Component_Locator_Result, err error) { params := []interface{}{ @@ -1731,12 +3481,63 @@ func (r Hardware_Component_Locator) GetPackageItemsAvailability(packageId *int) return } +func (r Hardware_Component_Locator) GetPackageItemsAvailabilityIter(packageId *int) (resp []datatypes.Hardware_Component_Locator_Result, err error) { + params := []interface{}{ + packageId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getPackageItemsAvailability", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Locator_Result{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getPackageItemsAvailability", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_Component_Locator) GetServerPackageAvailability() (resp []datatypes.Hardware_Component_Locator_Result, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getServerPackageAvailability", nil, &r.Options, &resp) return } +func (r Hardware_Component_Locator) GetServerPackageAvailabilityIter() (resp []datatypes.Hardware_Component_Locator_Result, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getServerPackageAvailability", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Locator_Result{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getServerPackageAvailability", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Hardware_Component_Model data type contains general information relating to a single SoftLayer component model. A component model represents a vendor specific representation of a hardware component. Every piece of hardware on a server will have a specific hardware component model. type Hardware_Component_Model struct { Session session.SLSession @@ -1789,24 +3590,120 @@ func (r Hardware_Component_Model) GetAttributes() (resp []datatypes.Hardware_Com return } +func (r Hardware_Component_Model) GetAttributesIter() (resp []datatypes.Hardware_Component_Model_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Component_Model) GetCompatibleArrayTypes() (resp []datatypes.Configuration_Storage_Group_Array_Type, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleArrayTypes", nil, &r.Options, &resp) return } +func (r Hardware_Component_Model) GetCompatibleArrayTypesIter() (resp []datatypes.Configuration_Storage_Group_Array_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleArrayTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group_Array_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleArrayTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All the component models that are compatible with a hardware component model. func (r Hardware_Component_Model) GetCompatibleChildComponentModels() (resp []datatypes.Hardware_Component_Model, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleChildComponentModels", nil, &r.Options, &resp) return } +func (r Hardware_Component_Model) GetCompatibleChildComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleChildComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleChildComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All the component models that a hardware component model is compatible with. func (r Hardware_Component_Model) GetCompatibleParentComponentModels() (resp []datatypes.Hardware_Component_Model, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleParentComponentModels", nil, &r.Options, &resp) return } +func (r Hardware_Component_Model) GetCompatibleParentComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleParentComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleParentComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Component_Model) GetFirmwareQuantity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getFirmwareQuantity", nil, &r.Options, &resp) @@ -1819,12 +3716,60 @@ func (r Hardware_Component_Model) GetFirmwares() (resp []datatypes.Hardware_Comp return } +func (r Hardware_Component_Model) GetFirmwaresIter() (resp []datatypes.Hardware_Component_Firmware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getFirmwares", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Firmware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getFirmwares", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware component model's physical components in inventory. func (r Hardware_Component_Model) GetHardwareComponents() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getHardwareComponents", nil, &r.Options, &resp) return } +func (r Hardware_Component_Model) GetHardwareComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getHardwareComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getHardwareComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The non-vendor specific generic component model for a hardware component model. func (r Hardware_Component_Model) GetHardwareGenericComponentModel() (resp datatypes.Hardware_Component_Model_Generic, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getHardwareGenericComponentModel", nil, &r.Options, &resp) @@ -1861,6 +3806,30 @@ func (r Hardware_Component_Model) GetQualifiedFirmwares() (resp []datatypes.Hard return } +func (r Hardware_Component_Model) GetQualifiedFirmwaresIter() (resp []datatypes.Hardware_Component_Firmware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getQualifiedFirmwares", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Firmware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getQualifiedFirmwares", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A motherboard's average reboot time. func (r Hardware_Component_Model) GetRebootTime() (resp datatypes.Hardware_Component_Motherboard_Reboot_Time, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getRebootTime", nil, &r.Options, &resp) @@ -1879,8 +3848,32 @@ func (r Hardware_Component_Model) GetValidAttributeTypes() (resp []datatypes.Har return } -// The SoftLayer_Hardware_Component_Partition_OperatingSystem data type contains general information relating to a single SoftLayer Operating System Partition Template. -type Hardware_Component_Partition_OperatingSystem struct { +func (r Hardware_Component_Model) GetValidAttributeTypesIter() (resp []datatypes.Hardware_Component_Model_Attribute_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getValidAttributeTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model_Attribute_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getValidAttributeTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// The SoftLayer_Hardware_Component_Partition_OperatingSystem data type contains general information relating to a single SoftLayer Operating System Partition Template. +type Hardware_Component_Partition_OperatingSystem struct { Session session.SLSession Options sl.Options } @@ -1925,6 +3918,30 @@ func (r Hardware_Component_Partition_OperatingSystem) GetAllObjects() (resp []da return } +func (r Hardware_Component_Partition_OperatingSystem) GetAllObjectsIter() (resp []datatypes.Hardware_Component_Partition_OperatingSystem, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_OperatingSystem", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Partition_OperatingSystem{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_OperatingSystem", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getByDescription”' method retrieves all possible partition templates based on the description (required parameter) entered when calling the method. The description is typically the operating system's name. Current recognized values include 'linux', 'windows', 'freebsd', and 'Debian'. func (r Hardware_Component_Partition_OperatingSystem) GetByDescription(description *string) (resp datatypes.Hardware_Component_Partition_OperatingSystem, err error) { params := []interface{}{ @@ -1946,6 +3963,30 @@ func (r Hardware_Component_Partition_OperatingSystem) GetPartitionTemplates() (r return } +func (r Hardware_Component_Partition_OperatingSystem) GetPartitionTemplatesIter() (resp []datatypes.Hardware_Component_Partition_Template, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_OperatingSystem", "getPartitionTemplates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Partition_Template{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_OperatingSystem", "getPartitionTemplates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Hardware_Component_Partition_Template data type contains general information relating to a single SoftLayer partition template. Partition templates group 1 or more partition configurations that can be used to predefine how a hard drive's partitions will be configured. type Hardware_Component_Partition_Template struct { Session session.SLSession @@ -1998,6 +4039,30 @@ func (r Hardware_Component_Partition_Template) GetData() (resp []datatypes.Hardw return } +func (r Hardware_Component_Partition_Template) GetDataIter() (resp []datatypes.Hardware_Component_Partition_Template_Partition, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Partition_Template_Partition{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Component_Partition_Template) GetExpireDate() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getExpireDate", nil, &r.Options, &resp) @@ -2022,6 +4087,30 @@ func (r Hardware_Component_Partition_Template) GetPartitionTemplatePartition() ( return } +func (r Hardware_Component_Partition_Template) GetPartitionTemplatePartitionIter() (resp []datatypes.Hardware_Component_Partition_Template_Partition, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getPartitionTemplatePartition", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Partition_Template_Partition{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getPartitionTemplatePartition", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Hardware_Router data type contains general information relating to a single SoftLayer router. type Hardware_Router struct { Session session.SLSession @@ -2446,18 +4535,90 @@ func (r Hardware_Router) GetActiveComponents() (resp []datatypes.Hardware_Compon return } +func (r Hardware_Router) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's active network monitoring incidents. func (r Hardware_Router) GetActiveNetworkMonitorIncident() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Router) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllPowerComponents", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware_Router) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedHost", nil, &r.Options, &resp) @@ -2470,12 +4631,60 @@ func (r Hardware_Router) GetAllowedNetworkStorage() (resp []datatypes.Network_St return } +func (r Hardware_Router) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware_Router) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware_Router) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -2491,18 +4700,93 @@ func (r Hardware_Router) GetAttachedNetworkStorages(nasType *string) (resp []dat return } +func (r Hardware_Router) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttachedNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttachedNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware_Router) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttributes", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware_Router) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware_Router) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -2512,6 +4796,33 @@ func (r Hardware_Router) GetAvailableNetworkStorages(nasType *string) (resp []da return } +func (r Hardware_Router) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The average daily public bandwidth usage for the current billing cycle. func (r Hardware_Router) GetAverageDailyPublicBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAverageDailyPublicBandwidthUsage", nil, &r.Options, &resp) @@ -2534,6 +4845,30 @@ func (r Hardware_Router) GetBackendNetworkComponents() (resp []datatypes.Network return } +func (r Hardware_Router) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Router) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -2550,6 +4885,30 @@ func (r Hardware_Router) GetBackendRouters() (resp []datatypes.Hardware, err err return } +func (r Hardware_Router) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBackendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBackendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware_Router) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -2568,6 +4927,30 @@ func (r Hardware_Router) GetBenchmarkCertifications() (resp []datatypes.Hardware return } +func (r Hardware_Router) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBenchmarkCertifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Benchmark_Certification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBenchmarkCertifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the billing item for a server. func (r Hardware_Router) GetBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBillingItem", nil, &r.Options, &resp) @@ -2592,6 +4975,30 @@ func (r Hardware_Router) GetBoundSubnets() (resp []datatypes.Network_Subnet, err return } +func (r Hardware_Router) GetBoundSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBoundSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBoundSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Status indicating whether or not a piece of hardware has business continuance insurance. func (r Hardware_Router) GetBusinessContinuanceInsuranceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBusinessContinuanceInsuranceFlag", nil, &r.Options, &resp) @@ -2604,6 +5011,30 @@ func (r Hardware_Router) GetChildrenHardware() (resp []datatypes.Hardware, err e return } +func (r Hardware_Router) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getChildrenHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getChildrenHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_Router) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -2616,6 +5047,30 @@ func (r Hardware_Router) GetComponents() (resp []datatypes.Hardware_Component, e return } +func (r Hardware_Router) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A continuous data protection/server backup software component object. func (r Hardware_Router) GetContinuousDataProtectionSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getContinuousDataProtectionSoftwareComponent", nil, &r.Options, &resp) @@ -2642,6 +5097,30 @@ func (r Hardware_Router) GetCurrentBillingDetail() (resp []datatypes.Billing_Ite return } +func (r Hardware_Router) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getCurrentBillingDetail", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getCurrentBillingDetail", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware_Router) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -2682,66 +5161,330 @@ func (r Hardware_Router) GetDownlinkHardware() (resp []datatypes.Hardware, err e return } +func (r Hardware_Router) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware_Router) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware_Router) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkServers", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_Router) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware downstream from a network device. func (r Hardware_Router) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamHardwareBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Uplink_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamHardwareBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware_Router) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware_Router) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware_Router) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamServers", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_Router) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware_Router) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDriveControllers", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDriveControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDriveControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware_Router) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getEvaultNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getEvaultNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware_Router) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -2770,6 +5513,30 @@ func (r Hardware_Router) GetFrontendNetworkComponents() (resp []datatypes.Networ return } +func (r Hardware_Router) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFrontendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFrontendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Router) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -2786,6 +5553,30 @@ func (r Hardware_Router) GetFrontendRouters() (resp []datatypes.Hardware, err er return } +func (r Hardware_Router) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFrontendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFrontendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the future billing item for a server. func (r Hardware_Router) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFutureBillingItem", nil, &r.Options, &resp) @@ -2804,6 +5595,30 @@ func (r Hardware_Router) GetHardDrives() (resp []datatypes.Hardware_Component, e return } +func (r Hardware_Router) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHardDrives", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHardDrives", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The chassis that a piece of hardware is housed in. func (r Hardware_Router) GetHardwareChassis() (resp datatypes.Hardware_Chassis, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHardwareChassis", nil, &r.Options, &resp) @@ -2862,6 +5677,34 @@ func (r Hardware_Router) GetHourlyBandwidth(mode *string, day *datatypes.Time) ( return } +func (r Hardware_Router) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + mode, + day, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHourlyBandwidth", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHourlyBandwidth", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A server's hourly billing status. func (r Hardware_Router) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -2934,6 +5777,30 @@ func (r Hardware_Router) GetMemory() (resp []datatypes.Hardware_Component, err e return } +func (r Hardware_Router) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getMemory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getMemory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware_Router) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getMemoryCapacity", nil, &r.Options, &resp) @@ -2952,6 +5819,30 @@ func (r Hardware_Router) GetModules() (resp []datatypes.Hardware_Component, err return } +func (r Hardware_Router) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getModules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getModules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Router) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getMonitoringRobot", nil, &r.Options, &resp) @@ -2982,12 +5873,60 @@ func (r Hardware_Router) GetNetworkCards() (resp []datatypes.Hardware_Component, return } +func (r Hardware_Router) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkCards", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkCards", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Returns a hardware's network components. func (r Hardware_Router) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware_Router) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -3012,10 +5951,58 @@ func (r Hardware_Router) GetNetworkMonitorAttachedDownHardware() (resp []datatyp return } -// Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring -func (r Hardware_Router) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) - return +func (r Hardware_Router) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring +func (r Hardware_Router) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) + return +} + +func (r Hardware_Router) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return } // Retrieve The status of all of a piece of hardware's network monitoring incidents. @@ -3024,12 +6011,60 @@ func (r Hardware_Router) GetNetworkMonitorIncidents() (resp []datatypes.Network_ return } +func (r Hardware_Router) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware_Router) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitors", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware_Router) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkStatus", nil, &r.Options, &resp) @@ -3048,12 +6083,60 @@ func (r Hardware_Router) GetNetworkStorage() (resp []datatypes.Network_Storage, return } +func (r Hardware_Router) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware_Router) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkVlans", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware_Router) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -3066,6 +6149,30 @@ func (r Hardware_Router) GetNotesHistory() (resp []datatypes.Hardware_Note, err return } +func (r Hardware_Router) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNotesHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Note{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNotesHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware_Router) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNvRamCapacity", nil, &r.Options, &resp) @@ -3078,6 +6185,30 @@ func (r Hardware_Router) GetNvRamComponentModels() (resp []datatypes.Hardware_Co return } +func (r Hardware_Router) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNvRamComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNvRamComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_Router) GetObject() (resp datatypes.Hardware_Router, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getObject", nil, &r.Options, &resp) @@ -3132,12 +6263,60 @@ func (r Hardware_Router) GetPowerComponents() (resp []datatypes.Hardware_Power_C return } +func (r Hardware_Router) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware_Router) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerSupply", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerSupply", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerSupply", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware's primary private IP address. func (r Hardware_Router) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -3172,6 +6351,34 @@ func (r Hardware_Router) GetPrivateBandwidthData(startTime *int, endTime *int) ( return } +func (r Hardware_Router) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPrivateBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPrivateBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether the hardware only has access to the private network. func (r Hardware_Router) GetPrivateNetworkOnlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPrivateNetworkOnlyFlag", nil, &r.Options, &resp) @@ -3196,6 +6403,30 @@ func (r Hardware_Router) GetProcessors() (resp []datatypes.Hardware_Component, e return } +func (r Hardware_Router) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getProcessors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getProcessors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a graph of a server's public network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPublicBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware_Router) GetPublicBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -3206,6 +6437,34 @@ func (r Hardware_Router) GetPublicBandwidthData(startTime *int, endTime *int) (r return } +func (r Hardware_Router) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPublicBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPublicBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Router) GetRack() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRack", nil, &r.Options, &resp) @@ -3218,18 +6477,90 @@ func (r Hardware_Router) GetRaidControllers() (resp []datatypes.Hardware_Compone return } +func (r Hardware_Router) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRaidControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRaidControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Recent events that impact this hardware. func (r Hardware_Router) GetRecentEvents() (resp []datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRecentEvents", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRecentEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRecentEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve User credentials to issue commands and/or interact with the server's remote management card. func (r Hardware_Router) GetRemoteManagementAccounts() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRemoteManagementAccounts", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRemoteManagementAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRemoteManagementAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware_Router) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -3242,30 +6573,150 @@ func (r Hardware_Router) GetResourceConfigurations() (resp []datatypes.Hardware_ return } +func (r Hardware_Router) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceConfigurations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Resource_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceConfigurations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Router) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupMemberReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupMemberReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Router) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupRoles", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The resource groups in which this hardware is a member. func (r Hardware_Router) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroups", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's routers. func (r Hardware_Router) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRouters", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating that a VLAN on the router can be assigned to a host that has SAN disk functionality. func (r Hardware_Router) GetSanStorageCapabilityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSanStorageCapabilityFlag", nil, &r.Options, &resp) @@ -3278,12 +6729,60 @@ func (r Hardware_Router) GetSecurityScanRequests() (resp []datatypes.Network_Sec return } +func (r Hardware_Router) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSecurityScanRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Security_Scanner_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSecurityScanRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getSensorData”' method retrieves a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures various information, including system temperatures, voltages and other local server settings. Sensor data is cached for 30 second; calls made to this method for the same server within 30 seconds of each other will result in the same data being returned. To ensure that the data retrieved retrieves snapshot of varied data, make calls greater than 30 seconds apart. func (r Hardware_Router) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorData", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_SensorReading{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getSensorDataWithGraphs”' method retrieves the raw data returned from the server's remote management card. Along with raw data, graphs for the CPU and system temperatures and fan speeds are also returned. For more details on what information is returned, refer to the ”getSensorData” method. func (r Hardware_Router) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -3296,6 +6795,30 @@ func (r Hardware_Router) GetServerFanSpeedGraphs() (resp []datatypes.Container_R return } +func (r Hardware_Router) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerFanSpeedGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerFanSpeedGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getPowerState”' method retrieves the power state for the selected server. The server's power status is retrieved from its remote management card. This method returns "on", for a server that has been powered on, or "off" for servers powered off. func (r Hardware_Router) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerPowerState", nil, &r.Options, &resp) @@ -3314,6 +6837,30 @@ func (r Hardware_Router) GetServerTemperatureGraphs() (resp []datatypes.Containe return } +func (r Hardware_Router) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerTemperatureGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerTemperatureGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware_Router) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServiceProvider", nil, &r.Options, &resp) @@ -3326,6 +6873,30 @@ func (r Hardware_Router) GetSoftwareComponents() (resp []datatypes.Software_Comp return } +func (r Hardware_Router) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSoftwareComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSoftwareComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the billing item for a spare pool server. func (r Hardware_Router) GetSparePoolBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSparePoolBillingItem", nil, &r.Options, &resp) @@ -3338,24 +6909,120 @@ func (r Hardware_Router) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err er return } +func (r Hardware_Router) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Router) GetStorageGroups() (resp []datatypes.Configuration_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageGroups", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware_Router) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Router) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTagReferences", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Router) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTopLevelLocation", nil, &r.Options, &resp) @@ -3368,12 +7035,60 @@ func (r Hardware_Router) GetTransactionHistory() (resp []datatypes.Provisioning_ return } +func (r Hardware_Router) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTransactionHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTransactionHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a list of upgradeable items available to this piece of hardware. Currently, getUpgradeItemPrices retrieves upgrades available for a server's memory, hard drives, network port speed, bandwidth allocation and GPUs. func (r Hardware_Router) GetUpgradeItemPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeItemPrices", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated upgrade request object, if any. func (r Hardware_Router) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeRequest", nil, &r.Options, &resp) @@ -3386,6 +7101,30 @@ func (r Hardware_Router) GetUpgradeableActiveComponents() (resp []datatypes.Hard return } +func (r Hardware_Router) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeableActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeableActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network device connected to a piece of hardware. func (r Hardware_Router) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUplinkHardware", nil, &r.Options, &resp) @@ -3398,12 +7137,60 @@ func (r Hardware_Router) GetUplinkNetworkComponents() (resp []datatypes.Network_ return } +func (r Hardware_Router) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUplinkNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUplinkNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware_Router) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUserData", nil, &r.Options, &resp) return } +func (r Hardware_Router) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUserData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUserData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware_Router) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualChassis", nil, &r.Options, &resp) @@ -3416,6 +7203,30 @@ func (r Hardware_Router) GetVirtualChassisSiblings() (resp []datatypes.Hardware, return } +func (r Hardware_Router) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualChassisSiblings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualChassisSiblings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's virtual host record. func (r Hardware_Router) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualHost", nil, &r.Options, &resp) @@ -3428,6 +7239,30 @@ func (r Hardware_Router) GetVirtualLicenses() (resp []datatypes.Software_Virtual return } +func (r Hardware_Router) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_VirtualLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware_Router) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualRack", nil, &r.Options, &resp) @@ -4080,6 +7915,30 @@ func (r Hardware_SecurityModule) GetActiveComponents() (resp []datatypes.Hardwar return } +func (r Hardware_SecurityModule) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item for a server's attached network firewall. func (r Hardware_SecurityModule) GetActiveNetworkFirewallBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveNetworkFirewallBillingItem", nil, &r.Options, &resp) @@ -4092,12 +7951,60 @@ func (r Hardware_SecurityModule) GetActiveNetworkMonitorIncident() (resp []datat return } +func (r Hardware_SecurityModule) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule) GetActiveTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTickets", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Transaction currently running for server. func (r Hardware_SecurityModule) GetActiveTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTransaction", nil, &r.Options, &resp) @@ -4110,10 +8017,58 @@ func (r Hardware_SecurityModule) GetActiveTransactions() (resp []datatypes.Provi return } -// Retrieve -func (r Hardware_SecurityModule) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllPowerComponents", nil, &r.Options, &resp) - return +func (r Hardware_SecurityModule) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve +func (r Hardware_SecurityModule) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllPowerComponents", nil, &r.Options, &resp) + return +} + +func (r Hardware_SecurityModule) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return } // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. @@ -4128,12 +8083,60 @@ func (r Hardware_SecurityModule) GetAllowedNetworkStorage() (resp []datatypes.Ne return } +func (r Hardware_SecurityModule) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware_SecurityModule) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware_SecurityModule) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -4149,24 +8152,123 @@ func (r Hardware_SecurityModule) GetAttachedNetworkStorages(nasType *string) (re return } +func (r Hardware_SecurityModule) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttachedNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttachedNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware_SecurityModule) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttributes", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware_SecurityModule) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An object that stores the maximum level for the monitoring query types and response types. func (r Hardware_SecurityModule) GetAvailableMonitoring() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableMonitoring", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetAvailableMonitoringIter() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableMonitoring", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host_Stratum{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableMonitoring", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware_SecurityModule) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -4176,6 +8278,33 @@ func (r Hardware_SecurityModule) GetAvailableNetworkStorages(nasType *string) (r return } +func (r Hardware_SecurityModule) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The average daily total bandwidth usage for the current billing cycle. func (r Hardware_SecurityModule) GetAverageDailyBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAverageDailyBandwidthUsage", nil, &r.Options, &resp) @@ -4206,6 +8335,34 @@ func (r Hardware_SecurityModule) GetBackendBandwidthUsage(startDate *datatypes.T return } +func (r Hardware_SecurityModule) GetBackendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendBandwidthUsage", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendBandwidthUsage", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -4222,6 +8379,30 @@ func (r Hardware_SecurityModule) GetBackendNetworkComponents() (resp []datatypes return } +func (r Hardware_SecurityModule) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -4238,6 +8419,30 @@ func (r Hardware_SecurityModule) GetBackendRouters() (resp []datatypes.Hardware, return } +func (r Hardware_SecurityModule) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware_SecurityModule) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -4260,6 +8465,34 @@ func (r Hardware_SecurityModule) GetBandwidthForDateRange(startDate *datatypes.T return } +func (r Hardware_SecurityModule) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBandwidthForDateRange", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBandwidthForDateRange", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method when needing a bandwidth image for a single server. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. Use the $draw flag to suppress the generation of the actual binary PNG image. func (r Hardware_SecurityModule) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -4279,12 +8512,60 @@ func (r Hardware_SecurityModule) GetBenchmarkCertifications() (resp []datatypes. return } +func (r Hardware_SecurityModule) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBenchmarkCertifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Benchmark_Certification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBenchmarkCertifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The raw bandwidth usage data for the current billing cycle. One object will be returned for each network this server is attached to. func (r Hardware_SecurityModule) GetBillingCycleBandwidthUsage() (resp []datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Usage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Hardware_SecurityModule) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -4327,6 +8608,30 @@ func (r Hardware_SecurityModule) GetBootModeOptions() (resp []string, err error) return } +func (r Hardware_SecurityModule) GetBootModeOptionsIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBootModeOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBootModeOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Status indicating whether or not a piece of hardware has business continuance insurance. func (r Hardware_SecurityModule) GetBusinessContinuanceInsuranceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBusinessContinuanceInsuranceFlag", nil, &r.Options, &resp) @@ -4345,6 +8650,30 @@ func (r Hardware_SecurityModule) GetChildrenHardware() (resp []datatypes.Hardwar return } +func (r Hardware_SecurityModule) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getChildrenHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getChildrenHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_SecurityModule) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -4357,6 +8686,30 @@ func (r Hardware_SecurityModule) GetComponents() (resp []datatypes.Hardware_Comp return } +func (r Hardware_SecurityModule) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule) GetContainsSolidStateDrivesFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getContainsSolidStateDrivesFlag", nil, &r.Options, &resp) @@ -4413,6 +8766,30 @@ func (r Hardware_SecurityModule) GetCurrentBillingDetail() (resp []datatypes.Bil return } +func (r Hardware_SecurityModule) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getCurrentBillingDetail", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getCurrentBillingDetail", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware_SecurityModule) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -4465,72 +8842,360 @@ func (r Hardware_SecurityModule) GetDownlinkHardware() (resp []datatypes.Hardwar return } +func (r Hardware_SecurityModule) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware_SecurityModule) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware_SecurityModule) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkServers", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_SecurityModule) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware downstream from a network device. func (r Hardware_SecurityModule) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamHardwareBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Uplink_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamHardwareBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware_SecurityModule) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware_SecurityModule) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware_SecurityModule) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamServers", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_SecurityModule) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware_SecurityModule) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDriveControllers", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDriveControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDriveControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware_SecurityModule) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getEvaultNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getEvaultNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the subnets associated with this server that are protectable by a network component firewall. func (r Hardware_SecurityModule) GetFirewallProtectableSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFirewallProtectableSubnets", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFirewallProtectableSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFirewallProtectableSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware_SecurityModule) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -4555,6 +9220,34 @@ func (r Hardware_SecurityModule) GetFrontendBandwidthUsage(startDate *datatypes. return } +func (r Hardware_SecurityModule) GetFrontendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendBandwidthUsage", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendBandwidthUsage", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -4571,6 +9264,30 @@ func (r Hardware_SecurityModule) GetFrontendNetworkComponents() (resp []datatype return } +func (r Hardware_SecurityModule) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -4587,6 +9304,30 @@ func (r Hardware_SecurityModule) GetFrontendRouters() (resp []datatypes.Hardware return } +func (r Hardware_SecurityModule) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the future billing item for a server. func (r Hardware_SecurityModule) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFutureBillingItem", nil, &r.Options, &resp) @@ -4605,6 +9346,30 @@ func (r Hardware_SecurityModule) GetHardDrives() (resp []datatypes.Hardware_Comp return } +func (r Hardware_SecurityModule) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHardDrives", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHardDrives", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a server by searching for the primary IP address. func (r Hardware_SecurityModule) GetHardwareByIpAddress(ipAddress *string) (resp datatypes.Hardware_Server, err error) { params := []interface{}{ @@ -4678,6 +9443,34 @@ func (r Hardware_SecurityModule) GetHourlyBandwidth(mode *string, day *datatypes return } +func (r Hardware_SecurityModule) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + mode, + day, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHourlyBandwidth", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHourlyBandwidth", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A server's hourly billing status. func (r Hardware_SecurityModule) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -4743,6 +9536,35 @@ func (r Hardware_SecurityModule) GetItemPricesFromSoftwareDescriptions(softwareD return } +func (r Hardware_SecurityModule) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item, err error) { + params := []interface{}{ + softwareDescriptions, + includeTranslationsFlag, + returnAllPricesFlag, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The last transaction that a server's operating system was loaded. func (r Hardware_SecurityModule) GetLastOperatingSystemReload() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getLastOperatingSystemReload", nil, &r.Options, &resp) @@ -4785,9 +9607,33 @@ func (r Hardware_SecurityModule) GetLogicalVolumeStorageGroups() (resp []datatyp return } -// Retrieve A flag indicating that the hardware is a managed resource. -func (r Hardware_SecurityModule) GetManagedResourceFlag() (resp bool, err error) { - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getManagedResourceFlag", nil, &r.Options, &resp) +func (r Hardware_SecurityModule) GetLogicalVolumeStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getLogicalVolumeStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getLogicalVolumeStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve A flag indicating that the hardware is a managed resource. +func (r Hardware_SecurityModule) GetManagedResourceFlag() (resp bool, err error) { + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getManagedResourceFlag", nil, &r.Options, &resp) return } @@ -4803,6 +9649,30 @@ func (r Hardware_SecurityModule) GetMemory() (resp []datatypes.Hardware_Componen return } +func (r Hardware_SecurityModule) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMemory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMemory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware_SecurityModule) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMemoryCapacity", nil, &r.Options, &resp) @@ -4827,6 +9697,30 @@ func (r Hardware_SecurityModule) GetModules() (resp []datatypes.Hardware_Compone return } +func (r Hardware_SecurityModule) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getModules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getModules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMonitoringRobot", nil, &r.Options, &resp) @@ -4851,6 +9745,30 @@ func (r Hardware_SecurityModule) GetMonitoringUserNotification() (resp []datatyp return } +func (r Hardware_SecurityModule) GetMonitoringUserNotificationIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMonitoringUserNotification", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMonitoringUserNotification", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's motherboard. func (r Hardware_SecurityModule) GetMotherboard() (resp datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMotherboard", nil, &r.Options, &resp) @@ -4863,18 +9781,90 @@ func (r Hardware_SecurityModule) GetNetworkCards() (resp []datatypes.Hardware_Co return } +func (r Hardware_SecurityModule) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkCards", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkCards", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the IP addresses associated with this server that are protectable by a network component firewall. Note, this may not return all values for IPv6 subnets for this server. Please use getFirewallProtectableSubnets to get all protectable subnets. func (r Hardware_SecurityModule) GetNetworkComponentFirewallProtectableIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetNetworkComponentFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponentFirewallProtectableIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Returns a hardware's network components. func (r Hardware_SecurityModule) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware_SecurityModule) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -4899,24 +9889,120 @@ func (r Hardware_SecurityModule) GetNetworkMonitorAttachedDownHardware() (resp [ return } +func (r Hardware_SecurityModule) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware_SecurityModule) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware_SecurityModule) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware_SecurityModule) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitors", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware_SecurityModule) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkStatus", nil, &r.Options, &resp) @@ -4935,12 +10021,60 @@ func (r Hardware_SecurityModule) GetNetworkStorage() (resp []datatypes.Network_S return } +func (r Hardware_SecurityModule) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware_SecurityModule) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkVlans", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware_SecurityModule) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -4953,6 +10087,30 @@ func (r Hardware_SecurityModule) GetNotesHistory() (resp []datatypes.Hardware_No return } +func (r Hardware_SecurityModule) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNotesHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Note{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNotesHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware_SecurityModule) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNvRamCapacity", nil, &r.Options, &resp) @@ -4965,6 +10123,30 @@ func (r Hardware_SecurityModule) GetNvRamComponentModels() (resp []datatypes.Har return } +func (r Hardware_SecurityModule) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNvRamComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNvRamComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_SecurityModule) GetObject() (resp datatypes.Hardware_SecurityModule, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getObject", nil, &r.Options, &resp) @@ -5019,6 +10201,30 @@ func (r Hardware_SecurityModule) GetPMInfo() (resp []datatypes.Container_RemoteM return } +func (r Hardware_SecurityModule) GetPMInfoIter() (resp []datatypes.Container_RemoteManagement_PmInfo, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPMInfo", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_PmInfo{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPMInfo", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Blade Bay func (r Hardware_SecurityModule) GetParentBay() (resp datatypes.Hardware_Blade, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getParentBay", nil, &r.Options, &resp) @@ -5037,6 +10243,30 @@ func (r Hardware_SecurityModule) GetPartitions() (resp []datatypes.Hardware_Serv return } +func (r Hardware_SecurityModule) GetPartitionsIter() (resp []datatypes.Hardware_Server_Partition, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPartitions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Server_Partition{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPartitions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the Point of Presence (PoP) location in which a piece of hardware resides. func (r Hardware_SecurityModule) GetPointOfPresenceLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPointOfPresenceLocation", nil, &r.Options, &resp) @@ -5049,12 +10279,60 @@ func (r Hardware_SecurityModule) GetPowerComponents() (resp []datatypes.Hardware return } +func (r Hardware_SecurityModule) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware_SecurityModule) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerSupply", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerSupply", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerSupply", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware's primary private IP address. func (r Hardware_SecurityModule) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -5091,6 +10369,30 @@ func (r Hardware_SecurityModule) GetPrivateBackendNetworkComponents() (resp []da return } +func (r Hardware_SecurityModule) GetPrivateBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a graph of a server's private network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPrivateBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware_SecurityModule) GetPrivateBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -5101,6 +10403,34 @@ func (r Hardware_SecurityModule) GetPrivateBandwidthData(startTime *int, endTime return } +func (r Hardware_SecurityModule) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a brief summary of a server's private network bandwidth usage. getPrivateBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_SecurityModule) GetPrivateBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBandwidthDataSummary", nil, &r.Options, &resp) @@ -5170,6 +10500,30 @@ func (r Hardware_SecurityModule) GetProcessors() (resp []datatypes.Hardware_Comp return } +func (r Hardware_SecurityModule) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getProcessors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getProcessors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether the bandwidth usage for this hardware for the current billing cycle is projected to exceed the allocation. func (r Hardware_SecurityModule) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) @@ -5198,6 +10552,34 @@ func (r Hardware_SecurityModule) GetPublicBandwidthData(startTime *int, endTime return } +func (r Hardware_SecurityModule) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPublicBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPublicBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a brief summary of a server's public network bandwidth usage. getPublicBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_SecurityModule) GetPublicBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPublicBandwidthDataSummary", nil, &r.Options, &resp) @@ -5257,6 +10639,30 @@ func (r Hardware_SecurityModule) GetRaidControllers() (resp []datatypes.Hardware return } +func (r Hardware_SecurityModule) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRaidControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRaidControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determine if hardware object is vSan Ready Node. func (r Hardware_SecurityModule) GetReadyNodeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getReadyNodeFlag", nil, &r.Options, &resp) @@ -5269,12 +10675,60 @@ func (r Hardware_SecurityModule) GetRecentEvents() (resp []datatypes.Notificatio return } +func (r Hardware_SecurityModule) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The last five commands issued to the server's remote management card. func (r Hardware_SecurityModule) GetRecentRemoteManagementCommands() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetRecentRemoteManagementCommandsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentRemoteManagementCommands", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRegionalInternetRegistry", nil, &r.Options, &resp) @@ -5293,6 +10747,30 @@ func (r Hardware_SecurityModule) GetRemoteManagementAccounts() (resp []datatypes return } +func (r Hardware_SecurityModule) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware_SecurityModule) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -5305,54 +10783,270 @@ func (r Hardware_SecurityModule) GetRemoteManagementUsers() (resp []datatypes.Ha return } +func (r Hardware_SecurityModule) GetRemoteManagementUsersIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule) GetResourceConfigurations() (resp []datatypes.Hardware_Resource_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceConfigurations", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceConfigurations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Resource_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceConfigurations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupMemberReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupMemberReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupRoles", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The resource groups in which this hardware is a member. func (r Hardware_SecurityModule) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroups", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the reverse domain records associated with this server. func (r Hardware_SecurityModule) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getReverseDomainRecords", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getReverseDomainRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getReverseDomainRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's routers. func (r Hardware_SecurityModule) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRouters", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's vulnerability scan requests. func (r Hardware_SecurityModule) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSecurityScanRequests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSecurityScanRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Security_Scanner_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSecurityScanRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures system temperatures, voltages, and other local server settings. Sensor data is cached for 30 seconds. Calls made to getSensorData for the same server within 30 seconds of each other will return the same data. Subsequent calls will return new data once the cache expires. func (r Hardware_SecurityModule) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSensorData", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSensorData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_SensorReading{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSensorData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the raw data returned from the server's remote management card. For more details of what is returned please refer to the getSensorData method. Along with the raw data, graphs for the cpu and system temperatures and fan speeds are also returned. func (r Hardware_SecurityModule) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -5371,6 +11065,30 @@ func (r Hardware_SecurityModule) GetServerFanSpeedGraphs() (resp []datatypes.Con return } +func (r Hardware_SecurityModule) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerFanSpeedGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerFanSpeedGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the power state for the server. The server's power status is retrieved from its remote management card. This will return 'on' or 'off'. func (r Hardware_SecurityModule) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerPowerState", nil, &r.Options, &resp) @@ -5389,6 +11107,30 @@ func (r Hardware_SecurityModule) GetServerTemperatureGraphs() (resp []datatypes. return } +func (r Hardware_SecurityModule) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerTemperatureGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerTemperatureGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware_SecurityModule) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServiceProvider", nil, &r.Options, &resp) @@ -5401,6 +11143,30 @@ func (r Hardware_SecurityModule) GetSoftwareComponents() (resp []datatypes.Softw return } +func (r Hardware_SecurityModule) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSoftwareComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSoftwareComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determine if hardware object has Software Guard Extension (SGX) enabled. func (r Hardware_SecurityModule) GetSoftwareGuardExtensionEnabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSoftwareGuardExtensionEnabled", nil, &r.Options, &resp) @@ -5419,6 +11185,30 @@ func (r Hardware_SecurityModule) GetSshKeys() (resp []datatypes.Security_Ssh_Key return } +func (r Hardware_SecurityModule) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A server's remote management card used for statistics. func (r Hardware_SecurityModule) GetStatisticsRemoteManagement() (resp datatypes.Hardware_Component_RemoteManagement, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStatisticsRemoteManagement", nil, &r.Options, &resp) @@ -5431,11 +11221,59 @@ func (r Hardware_SecurityModule) GetStorageGroups() (resp []datatypes.Configurat return } -// Retrieve A piece of hardware's private storage network components. [Deprecated] -func (r Hardware_SecurityModule) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageNetworkComponents", nil, &r.Options, &resp) - return -} +func (r Hardware_SecurityModule) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve A piece of hardware's private storage network components. [Deprecated] +func (r Hardware_SecurityModule) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageNetworkComponents", nil, &r.Options, &resp) + return +} + +func (r Hardware_SecurityModule) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} // Retrieve func (r Hardware_SecurityModule) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { @@ -5443,6 +11281,30 @@ func (r Hardware_SecurityModule) GetTagReferences() (resp []datatypes.Tag_Refere return } +func (r Hardware_SecurityModule) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTopLevelLocation", nil, &r.Options, &resp) @@ -5455,6 +11317,30 @@ func (r Hardware_SecurityModule) GetTransactionHistory() (resp []datatypes.Provi return } +func (r Hardware_SecurityModule) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTransactionHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTransactionHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether to use UEFI boot instead of BIOS. func (r Hardware_SecurityModule) GetUefiBootFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUefiBootFlag", nil, &r.Options, &resp) @@ -5467,6 +11353,30 @@ func (r Hardware_SecurityModule) GetUpgradeItemPrices() (resp []datatypes.Produc return } +func (r Hardware_SecurityModule) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated upgrade request object, if any. func (r Hardware_SecurityModule) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeRequest", nil, &r.Options, &resp) @@ -5479,6 +11389,30 @@ func (r Hardware_SecurityModule) GetUpgradeableActiveComponents() (resp []dataty return } +func (r Hardware_SecurityModule) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeableActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeableActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network device connected to a piece of hardware. func (r Hardware_SecurityModule) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUplinkHardware", nil, &r.Options, &resp) @@ -5491,18 +11425,90 @@ func (r Hardware_SecurityModule) GetUplinkNetworkComponents() (resp []datatypes. return } +func (r Hardware_SecurityModule) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUplinkNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUplinkNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware_SecurityModule) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUserData", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUserData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUserData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A list of users that have access to this computing instance. func (r Hardware_SecurityModule) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUsers", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return the list of block device template groups that are valid to the host. For instance, it will only retrieve FLEX images. func (r Hardware_SecurityModule) GetValidBlockDeviceTemplateGroups(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { params := []interface{}{ @@ -5512,6 +11518,33 @@ func (r Hardware_SecurityModule) GetValidBlockDeviceTemplateGroups(visibility *s return } +func (r Hardware_SecurityModule) GetValidBlockDeviceTemplateGroupsIter(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + params := []interface{}{ + visibility, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getValidBlockDeviceTemplateGroups", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware_SecurityModule) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualChassis", nil, &r.Options, &resp) @@ -5524,12 +11557,60 @@ func (r Hardware_SecurityModule) GetVirtualChassisSiblings() (resp []datatypes.H return } +func (r Hardware_SecurityModule) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualChassisSiblings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualChassisSiblings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [DEPRECATED] A hardware server's virtual servers. func (r Hardware_SecurityModule) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's virtual host record. func (r Hardware_SecurityModule) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualHost", nil, &r.Options, &resp) @@ -5542,6 +11623,30 @@ func (r Hardware_SecurityModule) GetVirtualLicenses() (resp []datatypes.Software return } +func (r Hardware_SecurityModule) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_VirtualLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware_SecurityModule) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualRack", nil, &r.Options, &resp) @@ -5572,12 +11677,60 @@ func (r Hardware_SecurityModule) GetWindowsUpdateAvailableUpdates() (resp []data return } +func (r Hardware_SecurityModule) GetWindowsUpdateAvailableUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateAvailableUpdates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateAvailableUpdates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a list of Windows updates installed on a server as reported by the local SoftLayer Windows Server Update Services (WSUS) server. Windows servers provisioned by SoftLayer are configured to use the local WSUS server via the private network by default. func (r Hardware_SecurityModule) GetWindowsUpdateInstalledUpdates() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule) GetWindowsUpdateInstalledUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateInstalledUpdates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns an update status record for this server. That record will specify if the server is missing updates, or has updates that must be reinstalled or require a reboot to go into affect. func (r Hardware_SecurityModule) GetWindowsUpdateStatus() (resp datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateStatus", nil, &r.Options, &resp) @@ -5634,6 +11787,36 @@ func (r Hardware_SecurityModule) MassFirmwareReflash(hardwareIds []int, ipmi *bo return } +func (r Hardware_SecurityModule) MassFirmwareReflashIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + ipmi, + raidController, + bios, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massFirmwareReflash", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massFirmwareReflash", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // You can launch firmware updates by selecting from your server list. It will bring your server offline for approximately 20 minutes while the updates are in progress. // // In the event of a hardware failure during this test our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online, and will be contacting you to ensure that impact on your server is minimal. @@ -5650,6 +11833,38 @@ func (r Hardware_SecurityModule) MassFirmwareUpdate(hardwareIds []int, ipmi *boo return } +func (r Hardware_SecurityModule) MassFirmwareUpdateIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool, harddrive *bool, networkCard *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + ipmi, + raidController, + bios, + harddrive, + networkCard, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massFirmwareUpdate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massFirmwareUpdate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // You can launch hyper-threading update by selecting from your server list. It will bring your server offline for approximately 60 minutes while the updates are in progress. // // In the event of a hardware failure during this update our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online. They will be in contact with you to ensure that impact on your server is minimal. @@ -5662,6 +11877,34 @@ func (r Hardware_SecurityModule) MassHyperThreadingUpdate(hardwareIds []int, dis return } +func (r Hardware_SecurityModule) MassHyperThreadingUpdateIter(hardwareIds []int, disableHyperthreading *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + disableHyperthreading, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massHyperThreadingUpdate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massHyperThreadingUpdate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Reloads current or customer specified operating system configuration. // // This service has a confirmation protocol for proceeding with the reload. To proceed with the reload without confirmation, simply pass in 'FORCE' as the token parameter. To proceed with the reload with confirmation, simply call the service with no parameter. A token string will be returned by this service. The token will remain active for 10 minutes. Use this token as the parameter to confirm that a reload is to be performed for the server. @@ -5690,6 +11933,35 @@ func (r Hardware_SecurityModule) MassSparePool(hardwareIds []string, action *str return } +func (r Hardware_SecurityModule) MassSparePoolIter(hardwareIds []string, action *string, newOrder *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + action, + newOrder, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massSparePool", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massSparePool", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Issues a ping command to the server and returns the ping response. func (r Hardware_SecurityModule) Ping() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "ping", nil, &r.Options, &resp) @@ -5889,6 +12161,33 @@ func (r Hardware_SecurityModule) SetUserMetadata(metadata []string) (resp []data return } +func (r Hardware_SecurityModule) SetUserMetadataIter(metadata []string) (resp []datatypes.Hardware_Attribute, err error) { + params := []interface{}{ + metadata, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "setUserMetadata", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "setUserMetadata", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Disconnect a server's private network interface. This operation is an alias for calling [[SoftLayer_Hardware_Server/setPrivateNetworkInterfaceSpeed]] with a $newSpeed of 0 and unspecified $redundancy. // // Receipt of a response does not indicate completion of the configuration change. Any subsequent attempts to request the interface change speed or state, while changes are pending, will result in a busy error. @@ -6464,6 +12763,30 @@ func (r Hardware_SecurityModule750) GetActiveComponents() (resp []datatypes.Hard return } +func (r Hardware_SecurityModule750) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item for a server's attached network firewall. func (r Hardware_SecurityModule750) GetActiveNetworkFirewallBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveNetworkFirewallBillingItem", nil, &r.Options, &resp) @@ -6476,12 +12799,60 @@ func (r Hardware_SecurityModule750) GetActiveNetworkMonitorIncident() (resp []da return } +func (r Hardware_SecurityModule750) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetActiveTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTickets", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Transaction currently running for server. func (r Hardware_SecurityModule750) GetActiveTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTransaction", nil, &r.Options, &resp) @@ -6494,12 +12865,60 @@ func (r Hardware_SecurityModule750) GetActiveTransactions() (resp []datatypes.Pr return } +func (r Hardware_SecurityModule750) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllPowerComponents", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware_SecurityModule750) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedHost", nil, &r.Options, &resp) @@ -6512,12 +12931,60 @@ func (r Hardware_SecurityModule750) GetAllowedNetworkStorage() (resp []datatypes return } +func (r Hardware_SecurityModule750) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware_SecurityModule750) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware_SecurityModule750) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -6533,24 +13000,123 @@ func (r Hardware_SecurityModule750) GetAttachedNetworkStorages(nasType *string) return } +func (r Hardware_SecurityModule750) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttachedNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttachedNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware_SecurityModule750) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttributes", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware_SecurityModule750) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An object that stores the maximum level for the monitoring query types and response types. func (r Hardware_SecurityModule750) GetAvailableMonitoring() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableMonitoring", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetAvailableMonitoringIter() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableMonitoring", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host_Stratum{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableMonitoring", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware_SecurityModule750) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -6560,6 +13126,33 @@ func (r Hardware_SecurityModule750) GetAvailableNetworkStorages(nasType *string) return } +func (r Hardware_SecurityModule750) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The average daily total bandwidth usage for the current billing cycle. func (r Hardware_SecurityModule750) GetAverageDailyBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAverageDailyBandwidthUsage", nil, &r.Options, &resp) @@ -6590,6 +13183,34 @@ func (r Hardware_SecurityModule750) GetBackendBandwidthUsage(startDate *datatype return } +func (r Hardware_SecurityModule750) GetBackendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendBandwidthUsage", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendBandwidthUsage", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule750) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -6606,6 +13227,30 @@ func (r Hardware_SecurityModule750) GetBackendNetworkComponents() (resp []dataty return } +func (r Hardware_SecurityModule750) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule750) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -6622,6 +13267,30 @@ func (r Hardware_SecurityModule750) GetBackendRouters() (resp []datatypes.Hardwa return } +func (r Hardware_SecurityModule750) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware_SecurityModule750) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -6644,8 +13313,36 @@ func (r Hardware_SecurityModule750) GetBandwidthForDateRange(startDate *datatype return } -// Use this method when needing a bandwidth image for a single server. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. Use the $draw flag to suppress the generation of the actual binary PNG image. -func (r Hardware_SecurityModule750) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { +func (r Hardware_SecurityModule750) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBandwidthForDateRange", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBandwidthForDateRange", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Use this method when needing a bandwidth image for a single server. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. Use the $draw flag to suppress the generation of the actual binary PNG image. +func (r Hardware_SecurityModule750) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ networkType, snapshotRange, @@ -6663,12 +13360,60 @@ func (r Hardware_SecurityModule750) GetBenchmarkCertifications() (resp []datatyp return } +func (r Hardware_SecurityModule750) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBenchmarkCertifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Benchmark_Certification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBenchmarkCertifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The raw bandwidth usage data for the current billing cycle. One object will be returned for each network this server is attached to. func (r Hardware_SecurityModule750) GetBillingCycleBandwidthUsage() (resp []datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Usage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Hardware_SecurityModule750) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -6711,6 +13456,30 @@ func (r Hardware_SecurityModule750) GetBootModeOptions() (resp []string, err err return } +func (r Hardware_SecurityModule750) GetBootModeOptionsIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBootModeOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBootModeOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Status indicating whether or not a piece of hardware has business continuance insurance. func (r Hardware_SecurityModule750) GetBusinessContinuanceInsuranceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBusinessContinuanceInsuranceFlag", nil, &r.Options, &resp) @@ -6729,6 +13498,30 @@ func (r Hardware_SecurityModule750) GetChildrenHardware() (resp []datatypes.Hard return } +func (r Hardware_SecurityModule750) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getChildrenHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getChildrenHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_SecurityModule750) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -6741,6 +13534,30 @@ func (r Hardware_SecurityModule750) GetComponents() (resp []datatypes.Hardware_C return } +func (r Hardware_SecurityModule750) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetContainsSolidStateDrivesFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getContainsSolidStateDrivesFlag", nil, &r.Options, &resp) @@ -6797,6 +13614,30 @@ func (r Hardware_SecurityModule750) GetCurrentBillingDetail() (resp []datatypes. return } +func (r Hardware_SecurityModule750) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getCurrentBillingDetail", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getCurrentBillingDetail", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware_SecurityModule750) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -6849,72 +13690,360 @@ func (r Hardware_SecurityModule750) GetDownlinkHardware() (resp []datatypes.Hard return } +func (r Hardware_SecurityModule750) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware_SecurityModule750) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware_SecurityModule750) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkServers", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_SecurityModule750) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware downstream from a network device. func (r Hardware_SecurityModule750) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamHardwareBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Uplink_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamHardwareBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware_SecurityModule750) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware_SecurityModule750) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware_SecurityModule750) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamServers", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_SecurityModule750) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware_SecurityModule750) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDriveControllers", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDriveControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDriveControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware_SecurityModule750) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getEvaultNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getEvaultNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the subnets associated with this server that are protectable by a network component firewall. func (r Hardware_SecurityModule750) GetFirewallProtectableSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFirewallProtectableSubnets", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFirewallProtectableSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFirewallProtectableSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware_SecurityModule750) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -6939,6 +14068,34 @@ func (r Hardware_SecurityModule750) GetFrontendBandwidthUsage(startDate *datatyp return } +func (r Hardware_SecurityModule750) GetFrontendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendBandwidthUsage", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendBandwidthUsage", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule750) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -6955,6 +14112,30 @@ func (r Hardware_SecurityModule750) GetFrontendNetworkComponents() (resp []datat return } +func (r Hardware_SecurityModule750) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule750) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -6971,6 +14152,30 @@ func (r Hardware_SecurityModule750) GetFrontendRouters() (resp []datatypes.Hardw return } +func (r Hardware_SecurityModule750) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the future billing item for a server. func (r Hardware_SecurityModule750) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFutureBillingItem", nil, &r.Options, &resp) @@ -6989,6 +14194,30 @@ func (r Hardware_SecurityModule750) GetHardDrives() (resp []datatypes.Hardware_C return } +func (r Hardware_SecurityModule750) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHardDrives", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHardDrives", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a server by searching for the primary IP address. func (r Hardware_SecurityModule750) GetHardwareByIpAddress(ipAddress *string) (resp datatypes.Hardware_Server, err error) { params := []interface{}{ @@ -7062,6 +14291,34 @@ func (r Hardware_SecurityModule750) GetHourlyBandwidth(mode *string, day *dataty return } +func (r Hardware_SecurityModule750) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + mode, + day, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHourlyBandwidth", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHourlyBandwidth", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A server's hourly billing status. func (r Hardware_SecurityModule750) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -7127,6 +14384,35 @@ func (r Hardware_SecurityModule750) GetItemPricesFromSoftwareDescriptions(softwa return } +func (r Hardware_SecurityModule750) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item, err error) { + params := []interface{}{ + softwareDescriptions, + includeTranslationsFlag, + returnAllPricesFlag, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The last transaction that a server's operating system was loaded. func (r Hardware_SecurityModule750) GetLastOperatingSystemReload() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getLastOperatingSystemReload", nil, &r.Options, &resp) @@ -7169,6 +14455,30 @@ func (r Hardware_SecurityModule750) GetLogicalVolumeStorageGroups() (resp []data return } +func (r Hardware_SecurityModule750) GetLogicalVolumeStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getLogicalVolumeStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getLogicalVolumeStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating that the hardware is a managed resource. func (r Hardware_SecurityModule750) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -7187,6 +14497,30 @@ func (r Hardware_SecurityModule750) GetMemory() (resp []datatypes.Hardware_Compo return } +func (r Hardware_SecurityModule750) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMemory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMemory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware_SecurityModule750) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMemoryCapacity", nil, &r.Options, &resp) @@ -7211,6 +14545,30 @@ func (r Hardware_SecurityModule750) GetModules() (resp []datatypes.Hardware_Comp return } +func (r Hardware_SecurityModule750) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getModules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getModules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMonitoringRobot", nil, &r.Options, &resp) @@ -7235,6 +14593,30 @@ func (r Hardware_SecurityModule750) GetMonitoringUserNotification() (resp []data return } +func (r Hardware_SecurityModule750) GetMonitoringUserNotificationIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMonitoringUserNotification", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMonitoringUserNotification", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's motherboard. func (r Hardware_SecurityModule750) GetMotherboard() (resp datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMotherboard", nil, &r.Options, &resp) @@ -7247,18 +14629,90 @@ func (r Hardware_SecurityModule750) GetNetworkCards() (resp []datatypes.Hardware return } +func (r Hardware_SecurityModule750) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkCards", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkCards", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the IP addresses associated with this server that are protectable by a network component firewall. Note, this may not return all values for IPv6 subnets for this server. Please use getFirewallProtectableSubnets to get all protectable subnets. func (r Hardware_SecurityModule750) GetNetworkComponentFirewallProtectableIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetNetworkComponentFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponentFirewallProtectableIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Returns a hardware's network components. func (r Hardware_SecurityModule750) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware_SecurityModule750) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -7283,24 +14737,120 @@ func (r Hardware_SecurityModule750) GetNetworkMonitorAttachedDownHardware() (res return } +func (r Hardware_SecurityModule750) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware_SecurityModule750) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware_SecurityModule750) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware_SecurityModule750) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitors", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware_SecurityModule750) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkStatus", nil, &r.Options, &resp) @@ -7319,12 +14869,60 @@ func (r Hardware_SecurityModule750) GetNetworkStorage() (resp []datatypes.Networ return } +func (r Hardware_SecurityModule750) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware_SecurityModule750) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkVlans", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware_SecurityModule750) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -7337,6 +14935,30 @@ func (r Hardware_SecurityModule750) GetNotesHistory() (resp []datatypes.Hardware return } +func (r Hardware_SecurityModule750) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNotesHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Note{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNotesHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware_SecurityModule750) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNvRamCapacity", nil, &r.Options, &resp) @@ -7349,6 +14971,30 @@ func (r Hardware_SecurityModule750) GetNvRamComponentModels() (resp []datatypes. return } +func (r Hardware_SecurityModule750) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNvRamComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNvRamComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_SecurityModule750) GetObject() (resp datatypes.Hardware_SecurityModule750, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getObject", nil, &r.Options, &resp) @@ -7403,6 +15049,30 @@ func (r Hardware_SecurityModule750) GetPMInfo() (resp []datatypes.Container_Remo return } +func (r Hardware_SecurityModule750) GetPMInfoIter() (resp []datatypes.Container_RemoteManagement_PmInfo, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPMInfo", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_PmInfo{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPMInfo", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Blade Bay func (r Hardware_SecurityModule750) GetParentBay() (resp datatypes.Hardware_Blade, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getParentBay", nil, &r.Options, &resp) @@ -7421,6 +15091,30 @@ func (r Hardware_SecurityModule750) GetPartitions() (resp []datatypes.Hardware_S return } +func (r Hardware_SecurityModule750) GetPartitionsIter() (resp []datatypes.Hardware_Server_Partition, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPartitions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Server_Partition{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPartitions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the Point of Presence (PoP) location in which a piece of hardware resides. func (r Hardware_SecurityModule750) GetPointOfPresenceLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPointOfPresenceLocation", nil, &r.Options, &resp) @@ -7433,12 +15127,60 @@ func (r Hardware_SecurityModule750) GetPowerComponents() (resp []datatypes.Hardw return } +func (r Hardware_SecurityModule750) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware_SecurityModule750) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerSupply", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerSupply", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerSupply", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware's primary private IP address. func (r Hardware_SecurityModule750) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -7475,6 +15217,30 @@ func (r Hardware_SecurityModule750) GetPrivateBackendNetworkComponents() (resp [ return } +func (r Hardware_SecurityModule750) GetPrivateBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a graph of a server's private network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPrivateBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware_SecurityModule750) GetPrivateBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -7485,6 +15251,34 @@ func (r Hardware_SecurityModule750) GetPrivateBandwidthData(startTime *int, endT return } +func (r Hardware_SecurityModule750) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a brief summary of a server's private network bandwidth usage. getPrivateBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_SecurityModule750) GetPrivateBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBandwidthDataSummary", nil, &r.Options, &resp) @@ -7554,6 +15348,30 @@ func (r Hardware_SecurityModule750) GetProcessors() (resp []datatypes.Hardware_C return } +func (r Hardware_SecurityModule750) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getProcessors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getProcessors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether the bandwidth usage for this hardware for the current billing cycle is projected to exceed the allocation. func (r Hardware_SecurityModule750) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) @@ -7582,6 +15400,34 @@ func (r Hardware_SecurityModule750) GetPublicBandwidthData(startTime *int, endTi return } +func (r Hardware_SecurityModule750) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPublicBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPublicBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a brief summary of a server's public network bandwidth usage. getPublicBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_SecurityModule750) GetPublicBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPublicBandwidthDataSummary", nil, &r.Options, &resp) @@ -7641,6 +15487,30 @@ func (r Hardware_SecurityModule750) GetRaidControllers() (resp []datatypes.Hardw return } +func (r Hardware_SecurityModule750) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRaidControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRaidControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determine if hardware object is vSan Ready Node. func (r Hardware_SecurityModule750) GetReadyNodeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getReadyNodeFlag", nil, &r.Options, &resp) @@ -7653,12 +15523,60 @@ func (r Hardware_SecurityModule750) GetRecentEvents() (resp []datatypes.Notifica return } +func (r Hardware_SecurityModule750) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The last five commands issued to the server's remote management card. func (r Hardware_SecurityModule750) GetRecentRemoteManagementCommands() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetRecentRemoteManagementCommandsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentRemoteManagementCommands", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRegionalInternetRegistry", nil, &r.Options, &resp) @@ -7677,6 +15595,30 @@ func (r Hardware_SecurityModule750) GetRemoteManagementAccounts() (resp []dataty return } +func (r Hardware_SecurityModule750) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware_SecurityModule750) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -7689,54 +15631,270 @@ func (r Hardware_SecurityModule750) GetRemoteManagementUsers() (resp []datatypes return } +func (r Hardware_SecurityModule750) GetRemoteManagementUsersIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetResourceConfigurations() (resp []datatypes.Hardware_Resource_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceConfigurations", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceConfigurations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Resource_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceConfigurations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupMemberReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupMemberReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupRoles", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The resource groups in which this hardware is a member. func (r Hardware_SecurityModule750) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroups", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the reverse domain records associated with this server. func (r Hardware_SecurityModule750) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getReverseDomainRecords", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getReverseDomainRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getReverseDomainRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's routers. func (r Hardware_SecurityModule750) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRouters", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's vulnerability scan requests. func (r Hardware_SecurityModule750) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSecurityScanRequests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSecurityScanRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Security_Scanner_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSecurityScanRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures system temperatures, voltages, and other local server settings. Sensor data is cached for 30 seconds. Calls made to getSensorData for the same server within 30 seconds of each other will return the same data. Subsequent calls will return new data once the cache expires. func (r Hardware_SecurityModule750) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSensorData", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSensorData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_SensorReading{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSensorData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the raw data returned from the server's remote management card. For more details of what is returned please refer to the getSensorData method. Along with the raw data, graphs for the cpu and system temperatures and fan speeds are also returned. func (r Hardware_SecurityModule750) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -7755,6 +15913,30 @@ func (r Hardware_SecurityModule750) GetServerFanSpeedGraphs() (resp []datatypes. return } +func (r Hardware_SecurityModule750) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerFanSpeedGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerFanSpeedGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the power state for the server. The server's power status is retrieved from its remote management card. This will return 'on' or 'off'. func (r Hardware_SecurityModule750) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerPowerState", nil, &r.Options, &resp) @@ -7773,6 +15955,30 @@ func (r Hardware_SecurityModule750) GetServerTemperatureGraphs() (resp []datatyp return } +func (r Hardware_SecurityModule750) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerTemperatureGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerTemperatureGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware_SecurityModule750) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServiceProvider", nil, &r.Options, &resp) @@ -7785,6 +15991,30 @@ func (r Hardware_SecurityModule750) GetSoftwareComponents() (resp []datatypes.So return } +func (r Hardware_SecurityModule750) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSoftwareComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSoftwareComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determine if hardware object has Software Guard Extension (SGX) enabled. func (r Hardware_SecurityModule750) GetSoftwareGuardExtensionEnabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSoftwareGuardExtensionEnabled", nil, &r.Options, &resp) @@ -7803,6 +16033,30 @@ func (r Hardware_SecurityModule750) GetSshKeys() (resp []datatypes.Security_Ssh_ return } +func (r Hardware_SecurityModule750) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A server's remote management card used for statistics. func (r Hardware_SecurityModule750) GetStatisticsRemoteManagement() (resp datatypes.Hardware_Component_RemoteManagement, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStatisticsRemoteManagement", nil, &r.Options, &resp) @@ -7815,18 +16069,90 @@ func (r Hardware_SecurityModule750) GetStorageGroups() (resp []datatypes.Configu return } +func (r Hardware_SecurityModule750) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware_SecurityModule750) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTagReferences", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_SecurityModule750) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTopLevelLocation", nil, &r.Options, &resp) @@ -7839,6 +16165,30 @@ func (r Hardware_SecurityModule750) GetTransactionHistory() (resp []datatypes.Pr return } +func (r Hardware_SecurityModule750) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTransactionHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTransactionHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether to use UEFI boot instead of BIOS. func (r Hardware_SecurityModule750) GetUefiBootFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUefiBootFlag", nil, &r.Options, &resp) @@ -7851,6 +16201,30 @@ func (r Hardware_SecurityModule750) GetUpgradeItemPrices() (resp []datatypes.Pro return } +func (r Hardware_SecurityModule750) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated upgrade request object, if any. func (r Hardware_SecurityModule750) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeRequest", nil, &r.Options, &resp) @@ -7863,6 +16237,30 @@ func (r Hardware_SecurityModule750) GetUpgradeableActiveComponents() (resp []dat return } +func (r Hardware_SecurityModule750) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeableActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeableActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network device connected to a piece of hardware. func (r Hardware_SecurityModule750) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUplinkHardware", nil, &r.Options, &resp) @@ -7875,15 +16273,87 @@ func (r Hardware_SecurityModule750) GetUplinkNetworkComponents() (resp []datatyp return } +func (r Hardware_SecurityModule750) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUplinkNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUplinkNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware_SecurityModule750) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUserData", nil, &r.Options, &resp) return } -// Retrieve A list of users that have access to this computing instance. -func (r Hardware_SecurityModule750) GetUsers() (resp []datatypes.User_Customer, err error) { +func (r Hardware_SecurityModule750) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUserData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUserData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve A list of users that have access to this computing instance. +func (r Hardware_SecurityModule750) GetUsers() (resp []datatypes.User_Customer, err error) { + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUsers", nil, &r.Options, &resp) + return +} + +func (r Hardware_SecurityModule750) GetUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -7896,6 +16366,33 @@ func (r Hardware_SecurityModule750) GetValidBlockDeviceTemplateGroups(visibility return } +func (r Hardware_SecurityModule750) GetValidBlockDeviceTemplateGroupsIter(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + params := []interface{}{ + visibility, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getValidBlockDeviceTemplateGroups", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware_SecurityModule750) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualChassis", nil, &r.Options, &resp) @@ -7908,12 +16405,60 @@ func (r Hardware_SecurityModule750) GetVirtualChassisSiblings() (resp []datatype return } +func (r Hardware_SecurityModule750) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualChassisSiblings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualChassisSiblings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [DEPRECATED] A hardware server's virtual servers. func (r Hardware_SecurityModule750) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's virtual host record. func (r Hardware_SecurityModule750) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualHost", nil, &r.Options, &resp) @@ -7926,6 +16471,30 @@ func (r Hardware_SecurityModule750) GetVirtualLicenses() (resp []datatypes.Softw return } +func (r Hardware_SecurityModule750) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_VirtualLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware_SecurityModule750) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualRack", nil, &r.Options, &resp) @@ -7956,12 +16525,60 @@ func (r Hardware_SecurityModule750) GetWindowsUpdateAvailableUpdates() (resp []d return } +func (r Hardware_SecurityModule750) GetWindowsUpdateAvailableUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateAvailableUpdates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateAvailableUpdates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a list of Windows updates installed on a server as reported by the local SoftLayer Windows Server Update Services (WSUS) server. Windows servers provisioned by SoftLayer are configured to use the local WSUS server via the private network by default. func (r Hardware_SecurityModule750) GetWindowsUpdateInstalledUpdates() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) return } +func (r Hardware_SecurityModule750) GetWindowsUpdateInstalledUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateInstalledUpdates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns an update status record for this server. That record will specify if the server is missing updates, or has updates that must be reinstalled or require a reboot to go into affect. func (r Hardware_SecurityModule750) GetWindowsUpdateStatus() (resp datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateStatus", nil, &r.Options, &resp) @@ -8018,6 +16635,36 @@ func (r Hardware_SecurityModule750) MassFirmwareReflash(hardwareIds []int, ipmi return } +func (r Hardware_SecurityModule750) MassFirmwareReflashIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + ipmi, + raidController, + bios, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massFirmwareReflash", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massFirmwareReflash", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // You can launch firmware updates by selecting from your server list. It will bring your server offline for approximately 20 minutes while the updates are in progress. // // In the event of a hardware failure during this test our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online, and will be contacting you to ensure that impact on your server is minimal. @@ -8034,6 +16681,38 @@ func (r Hardware_SecurityModule750) MassFirmwareUpdate(hardwareIds []int, ipmi * return } +func (r Hardware_SecurityModule750) MassFirmwareUpdateIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool, harddrive *bool, networkCard *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + ipmi, + raidController, + bios, + harddrive, + networkCard, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massFirmwareUpdate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massFirmwareUpdate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // You can launch hyper-threading update by selecting from your server list. It will bring your server offline for approximately 60 minutes while the updates are in progress. // // In the event of a hardware failure during this update our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online. They will be in contact with you to ensure that impact on your server is minimal. @@ -8046,6 +16725,34 @@ func (r Hardware_SecurityModule750) MassHyperThreadingUpdate(hardwareIds []int, return } +func (r Hardware_SecurityModule750) MassHyperThreadingUpdateIter(hardwareIds []int, disableHyperthreading *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + disableHyperthreading, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massHyperThreadingUpdate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massHyperThreadingUpdate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Reloads current or customer specified operating system configuration. // // This service has a confirmation protocol for proceeding with the reload. To proceed with the reload without confirmation, simply pass in 'FORCE' as the token parameter. To proceed with the reload with confirmation, simply call the service with no parameter. A token string will be returned by this service. The token will remain active for 10 minutes. Use this token as the parameter to confirm that a reload is to be performed for the server. @@ -8074,6 +16781,35 @@ func (r Hardware_SecurityModule750) MassSparePool(hardwareIds []string, action * return } +func (r Hardware_SecurityModule750) MassSparePoolIter(hardwareIds []string, action *string, newOrder *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + action, + newOrder, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massSparePool", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massSparePool", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Issues a ping command to the server and returns the ping response. func (r Hardware_SecurityModule750) Ping() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "ping", nil, &r.Options, &resp) @@ -8273,6 +17009,33 @@ func (r Hardware_SecurityModule750) SetUserMetadata(metadata []string) (resp []d return } +func (r Hardware_SecurityModule750) SetUserMetadataIter(metadata []string) (resp []datatypes.Hardware_Attribute, err error) { + params := []interface{}{ + metadata, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "setUserMetadata", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "setUserMetadata", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Disconnect a server's private network interface. This operation is an alias for calling [[SoftLayer_Hardware_Server/setPrivateNetworkInterfaceSpeed]] with a $newSpeed of 0 and unspecified $redundancy. // // Receipt of a response does not indicate completion of the configuration change. Any subsequent attempts to request the interface change speed or state, while changes are pending, will result in a busy error. @@ -8848,6 +17611,30 @@ func (r Hardware_Server) GetActiveComponents() (resp []datatypes.Hardware_Compon return } +func (r Hardware_Server) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item for a server's attached network firewall. func (r Hardware_Server) GetActiveNetworkFirewallBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveNetworkFirewallBillingItem", nil, &r.Options, &resp) @@ -8860,12 +17647,60 @@ func (r Hardware_Server) GetActiveNetworkMonitorIncident() (resp []datatypes.Net return } +func (r Hardware_Server) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetActiveTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTickets", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Transaction currently running for server. func (r Hardware_Server) GetActiveTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTransaction", nil, &r.Options, &resp) @@ -8878,12 +17713,60 @@ func (r Hardware_Server) GetActiveTransactions() (resp []datatypes.Provisioning_ return } +func (r Hardware_Server) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllPowerComponents", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware_Server) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedHost", nil, &r.Options, &resp) @@ -8896,12 +17779,60 @@ func (r Hardware_Server) GetAllowedNetworkStorage() (resp []datatypes.Network_St return } +func (r Hardware_Server) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware_Server) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware_Server) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -8917,24 +17848,123 @@ func (r Hardware_Server) GetAttachedNetworkStorages(nasType *string) (resp []dat return } +func (r Hardware_Server) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttachedNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttachedNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware_Server) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttributes", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware_Server) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An object that stores the maximum level for the monitoring query types and response types. func (r Hardware_Server) GetAvailableMonitoring() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableMonitoring", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetAvailableMonitoringIter() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableMonitoring", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host_Stratum{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableMonitoring", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware_Server) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -8944,6 +17974,33 @@ func (r Hardware_Server) GetAvailableNetworkStorages(nasType *string) (resp []da return } +func (r Hardware_Server) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The average daily total bandwidth usage for the current billing cycle. func (r Hardware_Server) GetAverageDailyBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAverageDailyBandwidthUsage", nil, &r.Options, &resp) @@ -8974,6 +18031,34 @@ func (r Hardware_Server) GetBackendBandwidthUsage(startDate *datatypes.Time, end return } +func (r Hardware_Server) GetBackendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendBandwidthUsage", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendBandwidthUsage", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Server) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -8990,6 +18075,30 @@ func (r Hardware_Server) GetBackendNetworkComponents() (resp []datatypes.Network return } +func (r Hardware_Server) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Server) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -9006,6 +18115,30 @@ func (r Hardware_Server) GetBackendRouters() (resp []datatypes.Hardware, err err return } +func (r Hardware_Server) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware_Server) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -9028,6 +18161,34 @@ func (r Hardware_Server) GetBandwidthForDateRange(startDate *datatypes.Time, end return } +func (r Hardware_Server) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBandwidthForDateRange", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBandwidthForDateRange", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method when needing a bandwidth image for a single server. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. Use the $draw flag to suppress the generation of the actual binary PNG image. func (r Hardware_Server) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -9047,12 +18208,60 @@ func (r Hardware_Server) GetBenchmarkCertifications() (resp []datatypes.Hardware return } +func (r Hardware_Server) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBenchmarkCertifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Benchmark_Certification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBenchmarkCertifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The raw bandwidth usage data for the current billing cycle. One object will be returned for each network this server is attached to. func (r Hardware_Server) GetBillingCycleBandwidthUsage() (resp []datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Usage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Hardware_Server) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -9095,6 +18304,30 @@ func (r Hardware_Server) GetBootModeOptions() (resp []string, err error) { return } +func (r Hardware_Server) GetBootModeOptionsIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBootModeOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBootModeOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Status indicating whether or not a piece of hardware has business continuance insurance. func (r Hardware_Server) GetBusinessContinuanceInsuranceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBusinessContinuanceInsuranceFlag", nil, &r.Options, &resp) @@ -9113,6 +18346,30 @@ func (r Hardware_Server) GetChildrenHardware() (resp []datatypes.Hardware, err e return } +func (r Hardware_Server) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getChildrenHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getChildrenHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Hardware_Server) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -9125,6 +18382,30 @@ func (r Hardware_Server) GetComponents() (resp []datatypes.Hardware_Component, e return } +func (r Hardware_Server) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetContainsSolidStateDrivesFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getContainsSolidStateDrivesFlag", nil, &r.Options, &resp) @@ -9181,6 +18462,30 @@ func (r Hardware_Server) GetCurrentBillingDetail() (resp []datatypes.Billing_Ite return } +func (r Hardware_Server) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getCurrentBillingDetail", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getCurrentBillingDetail", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware_Server) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -9233,72 +18538,360 @@ func (r Hardware_Server) GetDownlinkHardware() (resp []datatypes.Hardware, err e return } +func (r Hardware_Server) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware_Server) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware_Server) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkServers", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_Server) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All hardware downstream from a network device. func (r Hardware_Server) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamHardwareBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Uplink_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamHardwareBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware_Server) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware_Server) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware_Server) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamServers", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_Server) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware_Server) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDriveControllers", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDriveControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDriveControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware_Server) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getEvaultNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getEvaultNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the subnets associated with this server that are protectable by a network component firewall. func (r Hardware_Server) GetFirewallProtectableSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFirewallProtectableSubnets", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFirewallProtectableSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFirewallProtectableSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware_Server) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -9323,6 +18916,34 @@ func (r Hardware_Server) GetFrontendBandwidthUsage(startDate *datatypes.Time, en return } +func (r Hardware_Server) GetFrontendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendBandwidthUsage", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendBandwidthUsage", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Server) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -9339,6 +18960,30 @@ func (r Hardware_Server) GetFrontendNetworkComponents() (resp []datatypes.Networ return } +func (r Hardware_Server) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Server) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -9355,6 +19000,30 @@ func (r Hardware_Server) GetFrontendRouters() (resp []datatypes.Hardware, err er return } +func (r Hardware_Server) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the future billing item for a server. func (r Hardware_Server) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFutureBillingItem", nil, &r.Options, &resp) @@ -9373,6 +19042,30 @@ func (r Hardware_Server) GetHardDrives() (resp []datatypes.Hardware_Component, e return } +func (r Hardware_Server) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHardDrives", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHardDrives", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a server by searching for the primary IP address. func (r Hardware_Server) GetHardwareByIpAddress(ipAddress *string) (resp datatypes.Hardware_Server, err error) { params := []interface{}{ @@ -9446,6 +19139,34 @@ func (r Hardware_Server) GetHourlyBandwidth(mode *string, day *datatypes.Time) ( return } +func (r Hardware_Server) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + mode, + day, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHourlyBandwidth", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHourlyBandwidth", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A server's hourly billing status. func (r Hardware_Server) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -9511,6 +19232,35 @@ func (r Hardware_Server) GetItemPricesFromSoftwareDescriptions(softwareDescripti return } +func (r Hardware_Server) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item, err error) { + params := []interface{}{ + softwareDescriptions, + includeTranslationsFlag, + returnAllPricesFlag, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The last transaction that a server's operating system was loaded. func (r Hardware_Server) GetLastOperatingSystemReload() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getLastOperatingSystemReload", nil, &r.Options, &resp) @@ -9553,6 +19303,30 @@ func (r Hardware_Server) GetLogicalVolumeStorageGroups() (resp []datatypes.Confi return } +func (r Hardware_Server) GetLogicalVolumeStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getLogicalVolumeStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getLogicalVolumeStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating that the hardware is a managed resource. func (r Hardware_Server) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -9571,6 +19345,30 @@ func (r Hardware_Server) GetMemory() (resp []datatypes.Hardware_Component, err e return } +func (r Hardware_Server) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMemory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMemory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware_Server) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMemoryCapacity", nil, &r.Options, &resp) @@ -9595,6 +19393,30 @@ func (r Hardware_Server) GetModules() (resp []datatypes.Hardware_Component, err return } +func (r Hardware_Server) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getModules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getModules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMonitoringRobot", nil, &r.Options, &resp) @@ -9619,6 +19441,30 @@ func (r Hardware_Server) GetMonitoringUserNotification() (resp []datatypes.User_ return } +func (r Hardware_Server) GetMonitoringUserNotificationIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMonitoringUserNotification", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMonitoringUserNotification", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's motherboard. func (r Hardware_Server) GetMotherboard() (resp datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMotherboard", nil, &r.Options, &resp) @@ -9631,18 +19477,90 @@ func (r Hardware_Server) GetNetworkCards() (resp []datatypes.Hardware_Component, return } +func (r Hardware_Server) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkCards", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkCards", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the IP addresses associated with this server that are protectable by a network component firewall. Note, this may not return all values for IPv6 subnets for this server. Please use getFirewallProtectableSubnets to get all protectable subnets. func (r Hardware_Server) GetNetworkComponentFirewallProtectableIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetNetworkComponentFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponentFirewallProtectableIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Returns a hardware's network components. func (r Hardware_Server) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware_Server) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -9667,24 +19585,120 @@ func (r Hardware_Server) GetNetworkMonitorAttachedDownHardware() (resp []datatyp return } +func (r Hardware_Server) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware_Server) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware_Server) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware_Server) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitors", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware_Server) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkStatus", nil, &r.Options, &resp) @@ -9703,12 +19717,60 @@ func (r Hardware_Server) GetNetworkStorage() (resp []datatypes.Network_Storage, return } +func (r Hardware_Server) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware_Server) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkVlans", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware_Server) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -9721,6 +19783,30 @@ func (r Hardware_Server) GetNotesHistory() (resp []datatypes.Hardware_Note, err return } +func (r Hardware_Server) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNotesHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Note{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNotesHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware_Server) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNvRamCapacity", nil, &r.Options, &resp) @@ -9733,6 +19819,30 @@ func (r Hardware_Server) GetNvRamComponentModels() (resp []datatypes.Hardware_Co return } +func (r Hardware_Server) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNvRamComponentModels", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_Model{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNvRamComponentModels", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Hardware_Server object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Hardware service. You can only retrieve servers from the account that your portal user is assigned to. func (r Hardware_Server) GetObject() (resp datatypes.Hardware_Server, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getObject", nil, &r.Options, &resp) @@ -9787,6 +19897,30 @@ func (r Hardware_Server) GetPMInfo() (resp []datatypes.Container_RemoteManagemen return } +func (r Hardware_Server) GetPMInfoIter() (resp []datatypes.Container_RemoteManagement_PmInfo, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPMInfo", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_PmInfo{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPMInfo", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Blade Bay func (r Hardware_Server) GetParentBay() (resp datatypes.Hardware_Blade, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getParentBay", nil, &r.Options, &resp) @@ -9805,6 +19939,30 @@ func (r Hardware_Server) GetPartitions() (resp []datatypes.Hardware_Server_Parti return } +func (r Hardware_Server) GetPartitionsIter() (resp []datatypes.Hardware_Server_Partition, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPartitions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Server_Partition{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPartitions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the Point of Presence (PoP) location in which a piece of hardware resides. func (r Hardware_Server) GetPointOfPresenceLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPointOfPresenceLocation", nil, &r.Options, &resp) @@ -9817,12 +19975,60 @@ func (r Hardware_Server) GetPowerComponents() (resp []datatypes.Hardware_Power_C return } +func (r Hardware_Server) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Power_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware_Server) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerSupply", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerSupply", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerSupply", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware's primary private IP address. func (r Hardware_Server) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -9859,6 +20065,30 @@ func (r Hardware_Server) GetPrivateBackendNetworkComponents() (resp []datatypes. return } +func (r Hardware_Server) GetPrivateBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a graph of a server's private network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPrivateBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware_Server) GetPrivateBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -9869,6 +20099,34 @@ func (r Hardware_Server) GetPrivateBandwidthData(startTime *int, endTime *int) ( return } +func (r Hardware_Server) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a brief summary of a server's private network bandwidth usage. getPrivateBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_Server) GetPrivateBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBandwidthDataSummary", nil, &r.Options, &resp) @@ -9938,6 +20196,30 @@ func (r Hardware_Server) GetProcessors() (resp []datatypes.Hardware_Component, e return } +func (r Hardware_Server) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getProcessors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getProcessors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether the bandwidth usage for this hardware for the current billing cycle is projected to exceed the allocation. func (r Hardware_Server) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) @@ -9956,13 +20238,41 @@ func (r Hardware_Server) GetProvisionDate() (resp datatypes.Time, err error) { return } -// Retrieve a graph of a server's public network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPublicBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. -func (r Hardware_Server) GetPublicBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { +// Retrieve a graph of a server's public network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPublicBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. +func (r Hardware_Server) GetPublicBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startTime, + endTime, + } + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPublicBandwidthData", params, &r.Options, &resp) + return +} + +func (r Hardware_Server) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ startTime, endTime, } + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPublicBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPublicBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -10025,6 +20335,30 @@ func (r Hardware_Server) GetRaidControllers() (resp []datatypes.Hardware_Compone return } +func (r Hardware_Server) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRaidControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRaidControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determine if hardware object is vSan Ready Node. func (r Hardware_Server) GetReadyNodeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getReadyNodeFlag", nil, &r.Options, &resp) @@ -10037,12 +20371,60 @@ func (r Hardware_Server) GetRecentEvents() (resp []datatypes.Notification_Occurr return } +func (r Hardware_Server) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The last five commands issued to the server's remote management card. func (r Hardware_Server) GetRecentRemoteManagementCommands() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetRecentRemoteManagementCommandsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentRemoteManagementCommands", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRegionalInternetRegistry", nil, &r.Options, &resp) @@ -10061,6 +20443,30 @@ func (r Hardware_Server) GetRemoteManagementAccounts() (resp []datatypes.Hardwar return } +func (r Hardware_Server) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware_Server) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -10073,54 +20479,270 @@ func (r Hardware_Server) GetRemoteManagementUsers() (resp []datatypes.Hardware_C return } +func (r Hardware_Server) GetRemoteManagementUsersIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetResourceConfigurations() (resp []datatypes.Hardware_Resource_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceConfigurations", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceConfigurations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Resource_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceConfigurations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupMemberReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupMemberReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupRoles", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The resource groups in which this hardware is a member. func (r Hardware_Server) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroups", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the reverse domain records associated with this server. func (r Hardware_Server) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getReverseDomainRecords", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getReverseDomainRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getReverseDomainRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A hardware's routers. func (r Hardware_Server) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRouters", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding a piece of hardware's vulnerability scan requests. func (r Hardware_Server) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSecurityScanRequests", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSecurityScanRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Security_Scanner_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSecurityScanRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures system temperatures, voltages, and other local server settings. Sensor data is cached for 30 seconds. Calls made to getSensorData for the same server within 30 seconds of each other will return the same data. Subsequent calls will return new data once the cache expires. func (r Hardware_Server) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSensorData", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSensorData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_SensorReading{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSensorData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the raw data returned from the server's remote management card. For more details of what is returned please refer to the getSensorData method. Along with the raw data, graphs for the cpu and system temperatures and fan speeds are also returned. func (r Hardware_Server) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -10139,6 +20761,30 @@ func (r Hardware_Server) GetServerFanSpeedGraphs() (resp []datatypes.Container_R return } +func (r Hardware_Server) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerFanSpeedGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerFanSpeedGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the power state for the server. The server's power status is retrieved from its remote management card. This will return 'on' or 'off'. func (r Hardware_Server) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerPowerState", nil, &r.Options, &resp) @@ -10157,6 +20803,30 @@ func (r Hardware_Server) GetServerTemperatureGraphs() (resp []datatypes.Containe return } +func (r Hardware_Server) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerTemperatureGraphs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerTemperatureGraphs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware_Server) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServiceProvider", nil, &r.Options, &resp) @@ -10169,6 +20839,30 @@ func (r Hardware_Server) GetSoftwareComponents() (resp []datatypes.Software_Comp return } +func (r Hardware_Server) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSoftwareComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSoftwareComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determine if hardware object has Software Guard Extension (SGX) enabled. func (r Hardware_Server) GetSoftwareGuardExtensionEnabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSoftwareGuardExtensionEnabled", nil, &r.Options, &resp) @@ -10187,6 +20881,30 @@ func (r Hardware_Server) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err er return } +func (r Hardware_Server) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A server's remote management card used for statistics. func (r Hardware_Server) GetStatisticsRemoteManagement() (resp datatypes.Hardware_Component_RemoteManagement, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStatisticsRemoteManagement", nil, &r.Options, &resp) @@ -10199,18 +20917,90 @@ func (r Hardware_Server) GetStorageGroups() (resp []datatypes.Configuration_Stor return } +func (r Hardware_Server) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware_Server) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageNetworkComponents", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTagReferences", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Hardware_Server) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTopLevelLocation", nil, &r.Options, &resp) @@ -10223,6 +21013,30 @@ func (r Hardware_Server) GetTransactionHistory() (resp []datatypes.Provisioning_ return } +func (r Hardware_Server) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTransactionHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTransactionHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether to use UEFI boot instead of BIOS. func (r Hardware_Server) GetUefiBootFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUefiBootFlag", nil, &r.Options, &resp) @@ -10235,6 +21049,30 @@ func (r Hardware_Server) GetUpgradeItemPrices() (resp []datatypes.Product_Item_P return } +func (r Hardware_Server) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An account's associated upgrade request object, if any. func (r Hardware_Server) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeRequest", nil, &r.Options, &resp) @@ -10247,6 +21085,30 @@ func (r Hardware_Server) GetUpgradeableActiveComponents() (resp []datatypes.Hard return } +func (r Hardware_Server) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeableActiveComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeableActiveComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network device connected to a piece of hardware. func (r Hardware_Server) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUplinkHardware", nil, &r.Options, &resp) @@ -10259,18 +21121,90 @@ func (r Hardware_Server) GetUplinkNetworkComponents() (resp []datatypes.Network_ return } +func (r Hardware_Server) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUplinkNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUplinkNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware_Server) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUserData", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUserData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUserData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A list of users that have access to this computing instance. func (r Hardware_Server) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUsers", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return the list of block device template groups that are valid to the host. For instance, it will only retrieve FLEX images. func (r Hardware_Server) GetValidBlockDeviceTemplateGroups(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { params := []interface{}{ @@ -10280,6 +21214,33 @@ func (r Hardware_Server) GetValidBlockDeviceTemplateGroups(visibility *string) ( return } +func (r Hardware_Server) GetValidBlockDeviceTemplateGroupsIter(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + params := []interface{}{ + visibility, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getValidBlockDeviceTemplateGroups", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware_Server) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualChassis", nil, &r.Options, &resp) @@ -10292,12 +21253,60 @@ func (r Hardware_Server) GetVirtualChassisSiblings() (resp []datatypes.Hardware, return } +func (r Hardware_Server) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualChassisSiblings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualChassisSiblings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [DEPRECATED] A hardware server's virtual servers. func (r Hardware_Server) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualGuests", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A piece of hardware's virtual host record. func (r Hardware_Server) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualHost", nil, &r.Options, &resp) @@ -10310,6 +21319,30 @@ func (r Hardware_Server) GetVirtualLicenses() (resp []datatypes.Software_Virtual return } +func (r Hardware_Server) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_VirtualLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware_Server) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualRack", nil, &r.Options, &resp) @@ -10340,12 +21373,60 @@ func (r Hardware_Server) GetWindowsUpdateAvailableUpdates() (resp []datatypes.Co return } +func (r Hardware_Server) GetWindowsUpdateAvailableUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateAvailableUpdates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateAvailableUpdates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a list of Windows updates installed on a server as reported by the local SoftLayer Windows Server Update Services (WSUS) server. Windows servers provisioned by SoftLayer are configured to use the local WSUS server via the private network by default. func (r Hardware_Server) GetWindowsUpdateInstalledUpdates() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) return } +func (r Hardware_Server) GetWindowsUpdateInstalledUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateInstalledUpdates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns an update status record for this server. That record will specify if the server is missing updates, or has updates that must be reinstalled or require a reboot to go into affect. func (r Hardware_Server) GetWindowsUpdateStatus() (resp datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateStatus", nil, &r.Options, &resp) @@ -10402,6 +21483,36 @@ func (r Hardware_Server) MassFirmwareReflash(hardwareIds []int, ipmi *bool, raid return } +func (r Hardware_Server) MassFirmwareReflashIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + ipmi, + raidController, + bios, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massFirmwareReflash", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massFirmwareReflash", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // You can launch firmware updates by selecting from your server list. It will bring your server offline for approximately 20 minutes while the updates are in progress. // // In the event of a hardware failure during this test our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online, and will be contacting you to ensure that impact on your server is minimal. @@ -10418,6 +21529,38 @@ func (r Hardware_Server) MassFirmwareUpdate(hardwareIds []int, ipmi *bool, raidC return } +func (r Hardware_Server) MassFirmwareUpdateIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool, harddrive *bool, networkCard *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + ipmi, + raidController, + bios, + harddrive, + networkCard, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massFirmwareUpdate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massFirmwareUpdate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // You can launch hyper-threading update by selecting from your server list. It will bring your server offline for approximately 60 minutes while the updates are in progress. // // In the event of a hardware failure during this update our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online. They will be in contact with you to ensure that impact on your server is minimal. @@ -10430,6 +21573,34 @@ func (r Hardware_Server) MassHyperThreadingUpdate(hardwareIds []int, disableHype return } +func (r Hardware_Server) MassHyperThreadingUpdateIter(hardwareIds []int, disableHyperthreading *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + disableHyperthreading, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massHyperThreadingUpdate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massHyperThreadingUpdate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Reloads current or customer specified operating system configuration. // // This service has a confirmation protocol for proceeding with the reload. To proceed with the reload without confirmation, simply pass in 'FORCE' as the token parameter. To proceed with the reload with confirmation, simply call the service with no parameter. A token string will be returned by this service. The token will remain active for 10 minutes. Use this token as the parameter to confirm that a reload is to be performed for the server. @@ -10458,6 +21629,35 @@ func (r Hardware_Server) MassSparePool(hardwareIds []string, action *string, new return } +func (r Hardware_Server) MassSparePoolIter(hardwareIds []string, action *string, newOrder *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { + params := []interface{}{ + hardwareIds, + action, + newOrder, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massSparePool", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Hardware_Server_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massSparePool", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Issues a ping command to the server and returns the ping response. func (r Hardware_Server) Ping() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "ping", nil, &r.Options, &resp) @@ -10657,6 +21857,33 @@ func (r Hardware_Server) SetUserMetadata(metadata []string) (resp []datatypes.Ha return } +func (r Hardware_Server) SetUserMetadataIter(metadata []string) (resp []datatypes.Hardware_Attribute, err error) { + params := []interface{}{ + metadata, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "setUserMetadata", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "setUserMetadata", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Disconnect a server's private network interface. This operation is an alias for calling [[SoftLayer_Hardware_Server/setPrivateNetworkInterfaceSpeed]] with a $newSpeed of 0 and unspecified $redundancy. // // Receipt of a response does not indicate completion of the configuration change. Any subsequent attempts to request the interface change speed or state, while changes are pending, will result in a busy error. diff --git a/services/layout.go b/services/layout.go index 14373c6..70d78e9 100644 --- a/services/layout.go +++ b/services/layout.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,6 +69,30 @@ func (r Layout_Container) GetAllObjects() (resp []datatypes.Layout_Container, er return } +func (r Layout_Container) GetAllObjectsIter() (resp []datatypes.Layout_Container, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Container", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Container{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Container", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type of the layout container object func (r Layout_Container) GetLayoutContainerType() (resp datatypes.Layout_Container_Type, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Container", "getLayoutContainerType", nil, &r.Options, &resp) @@ -80,6 +105,30 @@ func (r Layout_Container) GetLayoutItems() (resp []datatypes.Layout_Item, err er return } +func (r Layout_Container) GetLayoutItemsIter() (resp []datatypes.Layout_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Container", "getLayoutItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Container", "getLayoutItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Layout_Container) GetObject() (resp datatypes.Layout_Container, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Container", "getObject", nil, &r.Options, &resp) @@ -132,6 +181,30 @@ func (r Layout_Item) GetLayoutItemPreferences() (resp []datatypes.Layout_Prefere return } +func (r Layout_Item) GetLayoutItemPreferencesIter() (resp []datatypes.Layout_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Item", "getLayoutItemPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Item", "getLayoutItemPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type of the layout item object func (r Layout_Item) GetLayoutItemType() (resp datatypes.Layout_Item_Type, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Item", "getLayoutItemType", nil, &r.Options, &resp) @@ -214,12 +287,60 @@ func (r Layout_Profile) GetLayoutContainers() (resp []datatypes.Layout_Container return } +func (r Layout_Profile) GetLayoutContainersIter() (resp []datatypes.Layout_Container, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutContainers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Container{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutContainers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Layout_Profile) GetLayoutPreferences() (resp []datatypes.Layout_Profile_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutPreferences", nil, &r.Options, &resp) return } +func (r Layout_Profile) GetLayoutPreferencesIter() (resp []datatypes.Layout_Profile_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Layout_Profile) GetObject() (resp datatypes.Layout_Profile, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getObject", nil, &r.Options, &resp) @@ -248,6 +369,33 @@ func (r Layout_Profile) ModifyPreferences(layoutPreferenceObjects []datatypes.La return } +func (r Layout_Profile) ModifyPreferencesIter(layoutPreferenceObjects []datatypes.Layout_Profile_Preference) (resp []datatypes.Layout_Profile_Preference, err error) { + params := []interface{}{ + layoutPreferenceObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Profile", "modifyPreferences", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Profile", "modifyPreferences", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Layout_Profile_Containers struct { Session session.SLSession @@ -394,12 +542,60 @@ func (r Layout_Profile_Customer) GetLayoutContainers() (resp []datatypes.Layout_ return } +func (r Layout_Profile_Customer) GetLayoutContainersIter() (resp []datatypes.Layout_Container, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutContainers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Container{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutContainers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Layout_Profile_Customer) GetLayoutPreferences() (resp []datatypes.Layout_Profile_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutPreferences", nil, &r.Options, &resp) return } +func (r Layout_Profile_Customer) GetLayoutPreferencesIter() (resp []datatypes.Layout_Profile_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Layout_Profile_Customer) GetObject() (resp datatypes.Layout_Profile_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getObject", nil, &r.Options, &resp) @@ -434,6 +630,33 @@ func (r Layout_Profile_Customer) ModifyPreferences(layoutPreferenceObjects []dat return } +func (r Layout_Profile_Customer) ModifyPreferencesIter(layoutPreferenceObjects []datatypes.Layout_Profile_Preference) (resp []datatypes.Layout_Profile_Preference, err error) { + params := []interface{}{ + layoutPreferenceObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "modifyPreferences", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "modifyPreferences", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Layout_Profile_Preference contains definitions for layout preferences type Layout_Profile_Preference struct { Session session.SLSession diff --git a/services/locale.go b/services/locale.go index 48dfe38..f9bf5b8 100644 --- a/services/locale.go +++ b/services/locale.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -123,18 +124,90 @@ func (r Locale_Country) GetAllVatCountryCodesAndVatIdRegexes() (resp []datatypes return } +func (r Locale_Country) GetAllVatCountryCodesAndVatIdRegexesIter() (resp []datatypes.Container_Collection_Locale_VatCountryCodeAndFormat, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAllVatCountryCodesAndVatIdRegexes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Collection_Locale_VatCountryCodeAndFormat{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAllVatCountryCodesAndVatIdRegexes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method to retrieve a list of countries and locale information available to the current user. func (r Locale_Country) GetAvailableCountries() (resp []datatypes.Locale_Country, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAvailableCountries", nil, &r.Options, &resp) return } +func (r Locale_Country) GetAvailableCountriesIter() (resp []datatypes.Locale_Country, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAvailableCountries", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Locale_Country{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAvailableCountries", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method to retrieve a list of countries and locale information such as country code and state/provinces. func (r Locale_Country) GetCountries() (resp []datatypes.Locale_Country, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountries", nil, &r.Options, &resp) return } +func (r Locale_Country) GetCountriesIter() (resp []datatypes.Locale_Country, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountries", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Locale_Country{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountries", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return a collection of [[SoftLayer_Container_Collection_Locale_CountryCode]] objects. If the country has states, a [[SoftLayer_Container_Collection_Locale_StateCode]] collection will be provided with the country. func (r Locale_Country) GetCountriesAndStates(usFirstFlag *bool) (resp []datatypes.Container_Collection_Locale_CountryCode, err error) { params := []interface{}{ @@ -144,6 +217,33 @@ func (r Locale_Country) GetCountriesAndStates(usFirstFlag *bool) (resp []datatyp return } +func (r Locale_Country) GetCountriesAndStatesIter(usFirstFlag *bool) (resp []datatypes.Container_Collection_Locale_CountryCode, err error) { + params := []interface{}{ + usFirstFlag, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountriesAndStates", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Collection_Locale_CountryCode{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountriesAndStates", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Locale_Country) GetObject() (resp datatypes.Locale_Country, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getObject", nil, &r.Options, &resp) @@ -156,24 +256,120 @@ func (r Locale_Country) GetPostalCodeRequiredCountryCodes() (resp []string, err return } +func (r Locale_Country) GetPostalCodeRequiredCountryCodesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getPostalCodeRequiredCountryCodes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getPostalCodeRequiredCountryCodes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve States that belong to this country. func (r Locale_Country) GetStates() (resp []datatypes.Locale_StateProvince, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getStates", nil, &r.Options, &resp) return } +func (r Locale_Country) GetStatesIter() (resp []datatypes.Locale_StateProvince, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getStates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Locale_StateProvince{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getStates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return an array of ISO 3166 Alpha-2 country codes that use a Value-Added Tax (VAT) ID. Note the difference between [[SoftLayer_Locale_Country/getVatRequiredCountryCodes]] - this method will provide all country codes that use VAT ID, including those which are required. func (r Locale_Country) GetVatCountries() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatCountries", nil, &r.Options, &resp) return } +func (r Locale_Country) GetVatCountriesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatCountries", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatCountries", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return an array of ISO 3166 Alpha-2 country codes that use a Value-Added Tax (VAT) ID. Note the difference between [[SoftLayer_Locale_Country/getVatCountries]] - this method will provide country codes where a VAT ID is required for onboarding to IBM Cloud. func (r Locale_Country) GetVatRequiredCountryCodes() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatRequiredCountryCodes", nil, &r.Options, &resp) return } +func (r Locale_Country) GetVatRequiredCountryCodesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatRequiredCountryCodes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatRequiredCountryCodes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns true if the country code is in the European Union (EU), false otherwise. func (r Locale_Country) IsEuropeanUnionCountry(iso2CountryCode *string) (resp bool, err error) { params := []interface{}{ @@ -229,6 +425,30 @@ func (r Locale_Timezone) GetAllObjects() (resp []datatypes.Locale_Timezone, err return } +func (r Locale_Timezone) GetAllObjectsIter() (resp []datatypes.Locale_Timezone, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Locale_Timezone", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Locale_Timezone{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Locale_Timezone", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Locale_Timezone object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Locale_Timezone service. func (r Locale_Timezone) GetObject() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Timezone", "getObject", nil, &r.Options, &resp) diff --git a/services/location.go b/services/location.go index 0b48ee7..30d42ba 100644 --- a/services/location.go +++ b/services/location.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,18 +69,90 @@ func (r Location) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_Event return } +func (r Location) GetActivePresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getActivePresaleEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Sales_Presale_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getActivePresaleEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Object Storage is only available in select datacenters. This method will return all the datacenters where object storage is available. func (r Location) GetAvailableObjectStorageDatacenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp) return } +func (r Location) GetAvailableObjectStorageDatacentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getAvailableObjectStorageDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location) GetBackboneDependents() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getBackboneDependents", nil, &r.Options, &resp) return } +func (r Location) GetBackboneDependentsIter() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getBackboneDependents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Backbone_Location_Dependent{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getBackboneDependents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating whether or not the datacenter/location is BNPP compliant. func (r Location) GetBnppCompliantFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getBnppCompliantFlag", nil, &r.Options, &resp) @@ -92,12 +165,60 @@ func (r Location) GetDatacenters() (resp []datatypes.Location, err error) { return } +func (r Location) GetDatacentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Location) GetDatacentersWithVirtualImageStoreServiceResourceRecord() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp) return } +func (r Location) GetDatacentersWithVirtualImageStoreServiceResourceRecordIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating whether or not the datacenter/location is EU compliant. func (r Location) GetEuCompliantFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getEuCompliantFlag", nil, &r.Options, &resp) @@ -110,12 +231,60 @@ func (r Location) GetGroups() (resp []datatypes.Location_Group, err error) { return } +func (r Location) GetGroupsIter() (resp []datatypes.Location_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location) GetHardwareFirewalls() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getHardwareFirewalls", nil, &r.Options, &resp) return } +func (r Location) GetHardwareFirewallsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getHardwareFirewalls", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getHardwareFirewalls", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A location's physical address. func (r Location) GetLocationAddress() (resp datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddress", nil, &r.Options, &resp) @@ -128,6 +297,30 @@ func (r Location) GetLocationAddresses() (resp []datatypes.Account_Address, err return } +func (r Location) GetLocationAddressesIter() (resp []datatypes.Account_Address, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Address{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A location's Dedicated Rack member func (r Location) GetLocationReservationMember() (resp datatypes.Location_Reservation_Rack_Member, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getLocationReservationMember", nil, &r.Options, &resp) @@ -170,12 +363,60 @@ func (r Location) GetPriceGroups() (resp []datatypes.Location_Group, err error) return } +func (r Location) GetPriceGroupsIter() (resp []datatypes.Location_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getPriceGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getPriceGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A location can be a member of 1 or more regions. This will show which regions to which a location belongs. func (r Location) GetRegions() (resp []datatypes.Location_Region, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getRegions", nil, &r.Options, &resp) return } +func (r Location) GetRegionsIter() (resp []datatypes.Location_Region, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getRegions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Region{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getRegions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location) GetTimezone() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getTimezone", nil, &r.Options, &resp) @@ -194,24 +435,120 @@ func (r Location) GetViewableDatacenters() (resp []datatypes.Location, err error return } +func (r Location) GetViewableDatacentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getViewableDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getViewableDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve all viewable pop and datacenter locations. func (r Location) GetViewablePopsAndDataCenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getViewablePopsAndDataCenters", nil, &r.Options, &resp) return } +func (r Location) GetViewablePopsAndDataCentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getViewablePopsAndDataCenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getViewablePopsAndDataCenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve all viewable network locations. func (r Location) GetViewablepointOfPresence() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getViewablepointOfPresence", nil, &r.Options, &resp) return } +func (r Location) GetViewablepointOfPresenceIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getViewablepointOfPresence", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getViewablepointOfPresence", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve all point of presence locations. func (r Location) GetpointOfPresence() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getpointOfPresence", nil, &r.Options, &resp) return } +func (r Location) GetpointOfPresenceIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location", "getpointOfPresence", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location", "getpointOfPresence", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // SoftLayer_Location_Datacenter extends the [[SoftLayer_Location]] data type to include datacenter-specific properties. type Location_Datacenter struct { Session session.SLSession @@ -258,30 +595,150 @@ func (r Location_Datacenter) GetActiveItemPresaleEvents() (resp []datatypes.Sale return } +func (r Location_Datacenter) GetActiveItemPresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActiveItemPresaleEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Sales_Presale_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActiveItemPresaleEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location_Datacenter) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActivePresaleEvents", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetActivePresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActivePresaleEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Sales_Presale_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActivePresaleEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Object Storage is only available in select datacenters. This method will return all the datacenters where object storage is available. func (r Location_Datacenter) GetAvailableObjectStorageDatacenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetAvailableObjectStorageDatacentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getAvailableObjectStorageDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location_Datacenter) GetBackboneDependents() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackboneDependents", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetBackboneDependentsIter() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackboneDependents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Backbone_Location_Dependent{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackboneDependents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location_Datacenter) GetBackendHardwareRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackendHardwareRouters", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetBackendHardwareRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackendHardwareRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackendHardwareRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating whether or not the datacenter/location is BNPP compliant. func (r Location_Datacenter) GetBnppCompliantFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBnppCompliantFlag", nil, &r.Options, &resp) @@ -294,24 +751,120 @@ func (r Location_Datacenter) GetBoundSubnets() (resp []datatypes.Network_Subnet, return } +func (r Location_Datacenter) GetBoundSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBoundSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBoundSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain. func (r Location_Datacenter) GetBrandCountryRestrictions() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBrandCountryRestrictions", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetBrandCountryRestrictionsIter() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBrandCountryRestrictions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Brand_Restriction_Location_CustomerCountry{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBrandCountryRestrictions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure. func (r Location_Datacenter) GetDatacenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacenters", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetDatacentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Location_Datacenter) GetDatacentersWithVirtualImageStoreServiceResourceRecord() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetDatacentersWithVirtualImageStoreServiceResourceRecordIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating whether or not the datacenter/location is EU compliant. func (r Location_Datacenter) GetEuCompliantFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getEuCompliantFlag", nil, &r.Options, &resp) @@ -324,24 +877,120 @@ func (r Location_Datacenter) GetFrontendHardwareRouters() (resp []datatypes.Hard return } +func (r Location_Datacenter) GetFrontendHardwareRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getFrontendHardwareRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getFrontendHardwareRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A location can be a member of 1 or more groups. This will show which groups to which a location belongs. func (r Location_Datacenter) GetGroups() (resp []datatypes.Location_Group, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getGroups", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetGroupsIter() (resp []datatypes.Location_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location_Datacenter) GetHardwareFirewalls() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareFirewalls", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetHardwareFirewallsIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareFirewalls", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareFirewalls", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location_Datacenter) GetHardwareRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareRouters", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetHardwareRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A location's physical address. func (r Location_Datacenter) GetLocationAddress() (resp datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddress", nil, &r.Options, &resp) @@ -354,6 +1003,30 @@ func (r Location_Datacenter) GetLocationAddresses() (resp []datatypes.Account_Ad return } +func (r Location_Datacenter) GetLocationAddressesIter() (resp []datatypes.Account_Address, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Address{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A location's Dedicated Rack member func (r Location_Datacenter) GetLocationReservationMember() (resp datatypes.Location_Reservation_Rack_Member, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationReservationMember", nil, &r.Options, &resp) @@ -396,12 +1069,60 @@ func (r Location_Datacenter) GetPresaleEvents() (resp []datatypes.Sales_Presale_ return } +func (r Location_Datacenter) GetPresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPresaleEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Sales_Presale_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPresaleEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A location can be a member of 1 or more Price Groups. This will show which groups to which a location belongs. func (r Location_Datacenter) GetPriceGroups() (resp []datatypes.Location_Group, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPriceGroups", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetPriceGroupsIter() (resp []datatypes.Location_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPriceGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPriceGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The regional group this datacenter belongs to. func (r Location_Datacenter) GetRegionalGroup() (resp datatypes.Location_Group_Regional, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegionalGroup", nil, &r.Options, &resp) @@ -420,12 +1141,60 @@ func (r Location_Datacenter) GetRegions() (resp []datatypes.Location_Region, err return } +func (r Location_Datacenter) GetRegionsIter() (resp []datatypes.Location_Region, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Region{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Retrieve all subnets that are eligible to be routed; those which the account has permission to associate with a vlan. func (r Location_Datacenter) GetRoutableBoundSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRoutableBoundSubnets", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetRoutableBoundSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRoutableBoundSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRoutableBoundSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a graph of a SoftLayer datacenter's last 48 hours of network activity. Statistics graphs show traffic outbound from a datacenter on top and inbound traffic on the bottom followed by a legend of the network services tracked in the graph. getStatisticsGraphImage returns a PNG image of variable width and height depending on the number of services reported in the image. func (r Location_Datacenter) GetStatisticsGraphImage() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getStatisticsGraphImage", nil, &r.Options, &resp) @@ -450,24 +1219,120 @@ func (r Location_Datacenter) GetViewableDatacenters() (resp []datatypes.Location return } +func (r Location_Datacenter) GetViewableDatacentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewableDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewableDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve all viewable pop and datacenter locations. func (r Location_Datacenter) GetViewablePopsAndDataCenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablePopsAndDataCenters", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetViewablePopsAndDataCentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablePopsAndDataCenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablePopsAndDataCenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve all viewable network locations. func (r Location_Datacenter) GetViewablepointOfPresence() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablepointOfPresence", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetViewablepointOfPresenceIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablepointOfPresence", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablepointOfPresence", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve all point of presence locations. func (r Location_Datacenter) GetpointOfPresence() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getpointOfPresence", nil, &r.Options, &resp) return } +func (r Location_Datacenter) GetpointOfPresenceIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getpointOfPresence", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getpointOfPresence", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Location_Group struct { Session session.SLSession @@ -514,6 +1379,30 @@ func (r Location_Group) GetAllObjects() (resp []datatypes.Location_Group, err er return } +func (r Location_Group) GetAllObjectsIter() (resp []datatypes.Location_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Group", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Group", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type for this location group. func (r Location_Group) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocationGroupType", nil, &r.Options, &resp) @@ -526,6 +1415,30 @@ func (r Location_Group) GetLocations() (resp []datatypes.Location, err error) { return } +func (r Location_Group) GetLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Location_Group) GetObject() (resp datatypes.Location_Group, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group", "getObject", nil, &r.Options, &resp) @@ -578,6 +1491,30 @@ func (r Location_Group_Pricing) GetAllObjects() (resp []datatypes.Location_Group return } +func (r Location_Group_Pricing) GetAllObjectsIter() (resp []datatypes.Location_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type for this location group. func (r Location_Group_Pricing) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocationGroupType", nil, &r.Options, &resp) @@ -590,6 +1527,30 @@ func (r Location_Group_Pricing) GetLocations() (resp []datatypes.Location, err e return } +func (r Location_Group_Pricing) GetLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Location_Group_Pricing) GetObject() (resp datatypes.Location_Group_Pricing, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getObject", nil, &r.Options, &resp) @@ -602,6 +1563,30 @@ func (r Location_Group_Pricing) GetPrices() (resp []datatypes.Product_Item_Price return } +func (r Location_Group_Pricing) GetPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Location_Group_Regional struct { Session session.SLSession @@ -648,12 +1633,60 @@ func (r Location_Group_Regional) GetAllObjects() (resp []datatypes.Location_Grou return } +func (r Location_Group_Regional) GetAllObjectsIter() (resp []datatypes.Location_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The datacenters in a group. func (r Location_Group_Regional) GetDatacenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getDatacenters", nil, &r.Options, &resp) return } +func (r Location_Group_Regional) GetDatacentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type for this location group. func (r Location_Group_Regional) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocationGroupType", nil, &r.Options, &resp) @@ -666,6 +1699,30 @@ func (r Location_Group_Regional) GetLocations() (resp []datatypes.Location, err return } +func (r Location_Group_Regional) GetLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Location_Group_Regional) GetObject() (resp datatypes.Location_Group_Regional, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getObject", nil, &r.Options, &resp) @@ -730,6 +1787,30 @@ func (r Location_Reservation) GetAccountReservations() (resp []datatypes.Locatio return } +func (r Location_Reservation) GetAccountReservationsIter() (resp []datatypes.Location_Reservation, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAccountReservations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Reservation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAccountReservations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The bandwidth allotment that the reservation belongs to. func (r Location_Reservation) GetAllotment() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAllotment", nil, &r.Options, &resp) @@ -812,6 +1893,30 @@ func (r Location_Reservation_Rack) GetChildren() (resp []datatypes.Location_Rese return } +func (r Location_Reservation_Rack) GetChildrenIter() (resp []datatypes.Location_Reservation_Rack_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Reservation_Rack_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Location_Reservation_Rack) GetLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getLocation", nil, &r.Options, &resp) diff --git a/services/marketplace.go b/services/marketplace.go index 75d98b3..60f9e63 100644 --- a/services/marketplace.go +++ b/services/marketplace.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,6 +69,30 @@ func (r Marketplace_Partner) GetAllObjects() (resp []datatypes.Marketplace_Partn return } +func (r Marketplace_Partner) GetAllObjectsIter() (resp []datatypes.Marketplace_Partner, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Marketplace_Partner{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Marketplace_Partner) GetAllPublishedPartners(searchTerm *string) (resp []datatypes.Marketplace_Partner, err error) { params := []interface{}{ @@ -77,12 +102,63 @@ func (r Marketplace_Partner) GetAllPublishedPartners(searchTerm *string) (resp [ return } +func (r Marketplace_Partner) GetAllPublishedPartnersIter(searchTerm *string) (resp []datatypes.Marketplace_Partner, err error) { + params := []interface{}{ + searchTerm, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllPublishedPartners", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Marketplace_Partner{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllPublishedPartners", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Marketplace_Partner) GetAttachments() (resp []datatypes.Marketplace_Partner_Attachment, err error) { err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAttachments", nil, &r.Options, &resp) return } +func (r Marketplace_Partner) GetAttachmentsIter() (resp []datatypes.Marketplace_Partner_Attachment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAttachments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Marketplace_Partner_Attachment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAttachments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Marketplace_Partner) GetFeaturedPartners(non *bool) (resp []datatypes.Marketplace_Partner, err error) { params := []interface{}{ @@ -92,6 +168,33 @@ func (r Marketplace_Partner) GetFeaturedPartners(non *bool) (resp []datatypes.Ma return } +func (r Marketplace_Partner) GetFeaturedPartnersIter(non *bool) (resp []datatypes.Marketplace_Partner, err error) { + params := []interface{}{ + non, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getFeaturedPartners", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Marketplace_Partner{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getFeaturedPartners", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Marketplace_Partner) GetFile(name *string) (resp datatypes.Marketplace_Partner_File, err error) { params := []interface{}{ diff --git a/services/metric.go b/services/metric.go index ea5097d..7cf842c 100644 --- a/services/metric.go +++ b/services/metric.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -74,6 +75,36 @@ func (r Metric_Tracking_Object) GetBandwidthData(startDateTime *datatypes.Time, return } +func (r Metric_Tracking_Object) GetBandwidthDataIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, typ *string, rollupSeconds *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + typ, + rollupSeconds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getBandwidthData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getBandwidthData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a PNG image of a bandwidth graph representing the bandwidth usage over time recorded by SofTLayer's bandwidth pollers. func (r Metric_Tracking_Object) GetBandwidthGraph(startDateTime *datatypes.Time, endDateTime *datatypes.Time, graphType *string, fontSize *int, graphWidth *int, graphHeight *int, doNotShowTimeZone *bool) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -112,6 +143,35 @@ func (r Metric_Tracking_Object) GetDetailsForDateRange(startDate *datatypes.Time return } +func (r Metric_Tracking_Object) GetDetailsForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time, graphType []string) (resp []datatypes.Container_Metric_Tracking_Object_Details, err error) { + params := []interface{}{ + startDate, + endDate, + graphType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getDetailsForDateRange", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Metric_Tracking_Object_Details{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getDetailsForDateRange", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a PNG image of a metric in graph form. func (r Metric_Tracking_Object) GetGraph(startDateTime *datatypes.Time, endDateTime *datatypes.Time, graphType []string) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -129,6 +189,30 @@ func (r Metric_Tracking_Object) GetMetricDataTypes() (resp []datatypes.Container return } +func (r Metric_Tracking_Object) GetMetricDataTypesIter() (resp []datatypes.Container_Metric_Data_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getMetricDataTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Metric_Data_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getMetricDataTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Metric_Tracking_Object object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Metric_Tracking_Object service. You can only tracking objects that are associated with your SoftLayer account or services. func (r Metric_Tracking_Object) GetObject() (resp datatypes.Metric_Tracking_Object, err error) { err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getObject", nil, &r.Options, &resp) @@ -156,6 +240,36 @@ func (r Metric_Tracking_Object) GetSummaryData(startDateTime *datatypes.Time, en return } +func (r Metric_Tracking_Object) GetSummaryDataIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, validTypes []datatypes.Container_Metric_Data_Type, summaryPeriod *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + validTypes, + summaryPeriod, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getSummaryData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getSummaryData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type of data that a tracking object polls. func (r Metric_Tracking_Object) GetType() (resp datatypes.Metric_Tracking_Object_Type, err error) { err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getType", nil, &r.Options, &resp) diff --git a/services/network.go b/services/network.go index bfe239d..51704f3 100644 --- a/services/network.go +++ b/services/network.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -210,6 +211,35 @@ func (r Network_Application_Delivery_Controller) GetBandwidthDataByDate(startDat return } +func (r Network_Application_Delivery_Controller) GetBandwidthDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, networkType *string) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + networkType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getBandwidthDataByDate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getBandwidthDataByDate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method when needing a bandwidth image for a single application delivery controller. It will gather the correct input parameters for the generic graphing utility based on the date ranges func (r Network_Application_Delivery_Controller) GetBandwidthImageByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time, networkType *string) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -233,6 +263,30 @@ func (r Network_Application_Delivery_Controller) GetConfigurationHistory() (resp return } +func (r Network_Application_Delivery_Controller) GetConfigurationHistoryIter() (resp []datatypes.Network_Application_Delivery_Controller_Configuration_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getConfigurationHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_Configuration_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getConfigurationHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The datacenter that the application delivery controller resides in. func (r Network_Application_Delivery_Controller) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getDatacenter", nil, &r.Options, &resp) @@ -276,6 +330,30 @@ func (r Network_Application_Delivery_Controller) GetLoadBalancers() (resp []data return } +func (r Network_Application_Delivery_Controller) GetLoadBalancersIter() (resp []datatypes.Network_LoadBalancer_VirtualIpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getLoadBalancers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LoadBalancer_VirtualIpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getLoadBalancers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating that this Application Delivery Controller is a managed resource. func (r Network_Application_Delivery_Controller) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -300,6 +378,30 @@ func (r Network_Application_Delivery_Controller) GetNetworkVlans() (resp []datat return } +func (r Network_Application_Delivery_Controller) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Network_Application_Delivery_Controller object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Application_Delivery_Controller service. You can only retrieve application delivery controllers that are associated with your SoftLayer customer account. func (r Network_Application_Delivery_Controller) GetObject() (resp datatypes.Network_Application_Delivery_Controller, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getObject", nil, &r.Options, &resp) @@ -336,12 +438,60 @@ func (r Network_Application_Delivery_Controller) GetSubnets() (resp []datatypes. return } +func (r Network_Application_Delivery_Controller) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getTagReferences", nil, &r.Options, &resp) return } +func (r Network_Application_Delivery_Controller) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller) GetType() (resp datatypes.Network_Application_Delivery_Controller_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getType", nil, &r.Options, &resp) @@ -354,6 +504,30 @@ func (r Network_Application_Delivery_Controller) GetVirtualIpAddresses() (resp [ return } +func (r Network_Application_Delivery_Controller) GetVirtualIpAddressesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getVirtualIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getVirtualIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Restore an application delivery controller's base configuration state. The configuration will be set to what it was when initially provisioned. func (r Network_Application_Delivery_Controller) RestoreBaseConfiguration() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "restoreBaseConfiguration", nil, &r.Options, &resp) @@ -559,6 +733,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Ty return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type) GetAllObjectsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type", "getObject", nil, &r.Options, &resp) @@ -611,6 +809,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetAt return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetAttributesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getObject", nil, &r.Options, &resp) @@ -623,6 +845,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetSe return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetServicesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getServices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getServices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetType() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getType", nil, &r.Options, &resp) @@ -675,6 +921,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type) return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type) GetAllObjectsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type", "getObject", nil, &r.Options, &resp) @@ -727,6 +997,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Method) Get return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Method) GetAllObjectsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Method, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Method", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Method{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Method", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Method) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Method, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Method", "getObject", nil, &r.Options, &resp) @@ -779,6 +1073,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Type) GetAl return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Type) GetAllObjectsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Type) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Type", "getObject", nil, &r.Options, &resp) @@ -850,12 +1168,60 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetGroupRe return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetGroupReferencesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group_CrossReference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroupReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group_CrossReference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroupReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetGroups() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroups", nil, &r.Options, &resp) return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetGroupsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetHealthCheck() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getHealthCheck", nil, &r.Options, &resp) @@ -868,6 +1234,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetHealthC return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetHealthChecksIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getHealthChecks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getHealthChecks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetIpAddress() (resp datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getIpAddress", nil, &r.Options, &resp) @@ -968,12 +1358,60 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetS return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetServiceReferencesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group_CrossReference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServiceReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group_CrossReference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServiceReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetServices() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServices", nil, &r.Options, &resp) return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetServicesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetVirtualServer() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getVirtualServer", nil, &r.Options, &resp) @@ -986,6 +1424,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetV return } +func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetVirtualServersIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getVirtualServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getVirtualServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) KickAllConnections() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "kickAllConnections", nil, &r.Options, &resp) @@ -1059,18 +1521,90 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) G return } +func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetApplicationDeliveryControllersIter() (resp []datatypes.Network_Application_Delivery_Controller, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getApplicationDeliveryControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getApplicationDeliveryControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Yields a list of the SSL/TLS encryption ciphers that are currently supported on this virtual IP address instance. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetAvailableSecureTransportCiphers() (resp []datatypes.Security_SecureTransportCipher, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportCiphers", nil, &r.Options, &resp) return } +func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetAvailableSecureTransportCiphersIter() (resp []datatypes.Security_SecureTransportCipher, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportCiphers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_SecureTransportCipher{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportCiphers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Yields a list of the secure communication protocols that are currently supported on this virtual IP address instance. The list of supported ciphers for each protocol is culled to match availability. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetAvailableSecureTransportProtocols() (resp []datatypes.Security_SecureTransportProtocol, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportProtocols", nil, &r.Options, &resp) return } +func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetAvailableSecureTransportProtocolsIter() (resp []datatypes.Security_SecureTransportProtocol, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportProtocols", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_SecureTransportProtocol{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportProtocols", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current billing item for the load balancer virtual IP. This is only valid when dedicatedFlag is false. This is an independent virtual IP, and if canceled, will only affect the associated virtual IP. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getBillingItem", nil, &r.Options, &resp) @@ -1101,6 +1635,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) G return } +func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetLoadBalancerHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getLoadBalancerHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getLoadBalancerHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag indicating that the load balancer is a managed resource. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -1119,12 +1677,60 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) G return } +func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetSecureTransportCiphersIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportCipher, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportCiphers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportCipher{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportCiphers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The list of secure transport protocols enabled for this virtual IP address func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetSecureTransportProtocols() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportProtocol, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportProtocols", nil, &r.Options, &resp) return } +func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetSecureTransportProtocolsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportProtocol, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportProtocols", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportProtocol{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportProtocols", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SSL certificate currently associated with the VIP. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetSecurityCertificate() (resp datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecurityCertificate", nil, &r.Options, &resp) @@ -1143,6 +1749,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) G return } +func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetVirtualServersIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getVirtualServers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getVirtualServers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Start SSL acceleration on all SSL virtual services (those with a type of HTTPS). This action should be taken only after configuring an SSL certificate for the virtual IP. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) StartSsl() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "startSsl", nil, &r.Options, &resp) @@ -1226,6 +1856,30 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualServer) GetS return } +func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualServer) GetServiceGroupsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualServer", "getServiceGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualServer", "getServiceGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualServer) GetVirtualIpAddress() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualServer", "getVirtualIpAddress", nil, &r.Options, &resp) @@ -1292,6 +1946,30 @@ func (r Network_Backbone) GetAllBackbones() (resp []datatypes.Network_Backbone, return } +func (r Network_Backbone) GetAllBackbonesIter() (resp []datatypes.Network_Backbone, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getAllBackbones", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Backbone{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getAllBackbones", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a list of all SoftLayer backbone connections for a location name. func (r Network_Backbone) GetBackbonesForLocationName(locationName *string) (resp []datatypes.Network_Backbone, err error) { params := []interface{}{ @@ -1301,6 +1979,33 @@ func (r Network_Backbone) GetBackbonesForLocationName(locationName *string) (res return } +func (r Network_Backbone) GetBackbonesForLocationNameIter(locationName *string) (resp []datatypes.Network_Backbone, err error) { + params := []interface{}{ + locationName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getBackbonesForLocationName", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Backbone{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getBackbonesForLocationName", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A backbone's status. func (r Network_Backbone) GetHealth() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getHealth", nil, &r.Options, &resp) @@ -1371,6 +2076,30 @@ func (r Network_Backbone_Location_Dependent) GetAllObjects() (resp []datatypes.N return } +func (r Network_Backbone_Location_Dependent) GetAllObjectsIter() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Backbone_Location_Dependent", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Backbone_Location_Dependent{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Backbone_Location_Dependent", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Backbone_Location_Dependent) GetDependentLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Backbone_Location_Dependent", "getDependentLocation", nil, &r.Options, &resp) @@ -1468,12 +2197,60 @@ func (r Network_Bandwidth_Version1_Allotment) GetActiveDetails() (resp []datatyp return } +func (r Network_Bandwidth_Version1_Allotment) GetActiveDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment_Detail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getActiveDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment_Detail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getActiveDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Application Delivery Controller contained within a virtual rack. func (r Network_Bandwidth_Version1_Allotment) GetApplicationDeliveryControllers() (resp []datatypes.Network_Application_Delivery_Controller, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getApplicationDeliveryControllers", nil, &r.Options, &resp) return } +func (r Network_Bandwidth_Version1_Allotment) GetApplicationDeliveryControllersIter() (resp []datatypes.Network_Application_Delivery_Controller, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getApplicationDeliveryControllers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getApplicationDeliveryControllers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The average daily public bandwidth usage for the current billing cycle. func (r Network_Bandwidth_Version1_Allotment) GetAverageDailyPublicBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getAverageDailyPublicBandwidthUsage", nil, &r.Options, &resp) @@ -1496,6 +2273,34 @@ func (r Network_Bandwidth_Version1_Allotment) GetBandwidthForDateRange(startDate return } +func (r Network_Bandwidth_Version1_Allotment) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBandwidthForDateRange", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBandwidthForDateRange", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method recurses through all servers on a Bandwidth Pool for a given snapshot range, gathers the necessary parameters, and then calls the bandwidth graphing server. The return result is a container that includes the min and max dates for all servers to be used in the query, as well as an image in PNG format. This method uses the new and improved drawing routines which should return in a reasonable time frame now that the new backend data warehouse is used. func (r Network_Bandwidth_Version1_Allotment) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -1515,12 +2320,60 @@ func (r Network_Bandwidth_Version1_Allotment) GetBareMetalInstances() (resp []da return } +func (r Network_Bandwidth_Version1_Allotment) GetBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBareMetalInstances", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBareMetalInstances", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A virtual rack's raw bandwidth usage data for an account's current billing cycle. One object is returned for each network this server is attached to. func (r Network_Bandwidth_Version1_Allotment) GetBillingCycleBandwidthUsage() (resp []datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) return } +func (r Network_Bandwidth_Version1_Allotment) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Usage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A virtual rack's raw private network bandwidth usage data for an account's current billing cycle. func (r Network_Bandwidth_Version1_Allotment) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -1557,12 +2410,60 @@ func (r Network_Bandwidth_Version1_Allotment) GetDetails() (resp []datatypes.Net return } +func (r Network_Bandwidth_Version1_Allotment) GetDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment_Detail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Version1_Allotment_Detail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware contained within a virtual rack. func (r Network_Bandwidth_Version1_Allotment) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getHardware", nil, &r.Options, &resp) return } +func (r Network_Bandwidth_Version1_Allotment) GetHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The total public inbound bandwidth used in this virtual rack for an account's current billing cycle. func (r Network_Bandwidth_Version1_Allotment) GetInboundPublicBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getInboundPublicBandwidthUsage", nil, &r.Options, &resp) @@ -1581,18 +2482,90 @@ func (r Network_Bandwidth_Version1_Allotment) GetManagedBareMetalInstances() (re return } +func (r Network_Bandwidth_Version1_Allotment) GetManagedBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedBareMetalInstances", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedBareMetalInstances", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The managed hardware contained within a virtual rack. func (r Network_Bandwidth_Version1_Allotment) GetManagedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedHardware", nil, &r.Options, &resp) return } +func (r Network_Bandwidth_Version1_Allotment) GetManagedHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The managed Virtual Server contained within a virtual rack. func (r Network_Bandwidth_Version1_Allotment) GetManagedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedVirtualGuests", nil, &r.Options, &resp) return } +func (r Network_Bandwidth_Version1_Allotment) GetManagedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A virtual rack's metric tracking object. This object records all periodic polled data available to this rack. func (r Network_Bandwidth_Version1_Allotment) GetMetricTrackingObject() (resp datatypes.Metric_Tracking_Object, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getMetricTrackingObject", nil, &r.Options, &resp) @@ -1629,10 +2602,34 @@ func (r Network_Bandwidth_Version1_Allotment) GetPrivateNetworkOnlyHardware() (r return } -// Retrieve Whether the bandwidth usage for this bandwidth pool for the current billing cycle is projected to exceed the allocation. -func (r Network_Bandwidth_Version1_Allotment) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) - return +func (r Network_Bandwidth_Version1_Allotment) GetPrivateNetworkOnlyHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getPrivateNetworkOnlyHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getPrivateNetworkOnlyHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve Whether the bandwidth usage for this bandwidth pool for the current billing cycle is projected to exceed the allocation. +func (r Network_Bandwidth_Version1_Allotment) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) + return } // Retrieve The projected public outbound bandwidth for this virtual server for the current billing cycle. @@ -1665,6 +2662,30 @@ func (r Network_Bandwidth_Version1_Allotment) GetVirtualGuests() (resp []datatyp return } +func (r Network_Bandwidth_Version1_Allotment) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will reassign a collection of SoftLayer hardware to a bandwidth allotment Bandwidth Pool. func (r Network_Bandwidth_Version1_Allotment) ReassignServers(templateObjects []datatypes.Hardware, newAllotmentId *int) (resp bool, err error) { params := []interface{}{ @@ -2048,6 +3069,33 @@ func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) List return } +func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) ListModifyResponseHeaderIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "listModifyResponseHeader", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "listModifyResponseHeader", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) UpdateModifyResponseHeader(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) { params := []interface{}{ @@ -2057,6 +3105,33 @@ func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) Upda return } +func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) UpdateModifyResponseHeaderIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) { + params := []interface{}{ + input, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "updateModifyResponseHeader", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "updateModifyResponseHeader", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Network_CdnMarketplace_Configuration_Behavior_TokenAuth struct { Session session.SLSession @@ -2106,6 +3181,33 @@ func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) CreateTokenAuth return } +func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) CreateTokenAuthPathIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth, err error) { + params := []interface{}{ + input, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "createTokenAuthPath", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "createTokenAuthPath", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) DeleteTokenAuthPath(uniqueId *string, path *string) (resp string, err error) { params := []interface{}{ @@ -2131,6 +3233,33 @@ func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) ListTokenAuthPa return } +func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) ListTokenAuthPathIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "listTokenAuthPath", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "listTokenAuthPath", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) UpdateTokenAuthPath(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth, err error) { params := []interface{}{ @@ -2140,6 +3269,33 @@ func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) UpdateTokenAuth return } +func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) UpdateTokenAuthPathIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth, err error) { + params := []interface{}{ + input, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "updateTokenAuthPath", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "updateTokenAuthPath", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This data type models a purge event that occurs in caching server. It contains a reference to a mapping configuration, the path to execute the purge on, the status of the purge, and flag that enables saving the purge information for future use. type Network_CdnMarketplace_Configuration_Cache_Purge struct { Session session.SLSession @@ -2190,6 +3346,34 @@ func (r Network_CdnMarketplace_Configuration_Cache_Purge) CreatePurge(uniqueId * return } +func (r Network_CdnMarketplace_Configuration_Cache_Purge) CreatePurgeIter(uniqueId *string, path *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { + params := []interface{}{ + uniqueId, + path, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "createPurge", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "createPurge", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetObject() (resp datatypes.Network_CdnMarketplace_Configuration_Cache_Purge, err error) { err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getObject", nil, &r.Options, &resp) @@ -2206,6 +3390,34 @@ func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeHistoryPerMapp return } +func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeHistoryPerMappingIter(uniqueId *string, saved *int) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { + params := []interface{}{ + uniqueId, + saved, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getPurgeHistoryPerMapping", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getPurgeHistoryPerMapping", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeStatus(uniqueId *string, path *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { params := []interface{}{ @@ -2216,6 +3428,34 @@ func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeStatus(uniqueI return } +func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeStatusIter(uniqueId *string, path *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { + params := []interface{}{ + uniqueId, + path, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getPurgeStatus", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getPurgeStatus", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_Purge) SaveOrUnsavePurgePath(uniqueId *string, path *string, saveOrUnsave *int) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { params := []interface{}{ @@ -2227,6 +3467,35 @@ func (r Network_CdnMarketplace_Configuration_Cache_Purge) SaveOrUnsavePurgePath( return } +func (r Network_CdnMarketplace_Configuration_Cache_Purge) SaveOrUnsavePurgePathIter(uniqueId *string, path *string, saveOrUnsave *int) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { + params := []interface{}{ + uniqueId, + path, + saveOrUnsave, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "saveOrUnsavePurgePath", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "saveOrUnsavePurgePath", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This data type models a purge group event that occurs in caching server. It contains a reference to a mapping configuration and the path to execute the purge on. type Network_CdnMarketplace_Configuration_Cache_PurgeGroup struct { Session session.SLSession @@ -2310,6 +3579,33 @@ func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListFavoriteGroup return } +func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListFavoriteGroupIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "listFavoriteGroup", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "listFavoriteGroup", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListUnfavoriteGroup(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup, err error) { params := []interface{}{ @@ -2319,6 +3615,33 @@ func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListUnfavoriteGro return } +func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListUnfavoriteGroupIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "listUnfavoriteGroup", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "listUnfavoriteGroup", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) PurgeByGroupIds(uniqueId *string, groupUniqueIds []string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory, err error) { params := []interface{}{ @@ -2329,6 +3652,34 @@ func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) PurgeByGroupIds(u return } +func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) PurgeByGroupIdsIter(uniqueId *string, groupUniqueIds []string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory, err error) { + params := []interface{}{ + uniqueId, + groupUniqueIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "purgeByGroupIds", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "purgeByGroupIds", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) RemovePurgeGroupFromFavorite(uniqueId *string, groupUniqueId *string) (resp datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup, err error) { params := []interface{}{ @@ -2404,6 +3755,33 @@ func (r Network_CdnMarketplace_Configuration_Cache_PurgeHistory) ListPurgeGroupH return } +func (r Network_CdnMarketplace_Configuration_Cache_PurgeHistory) ListPurgeGroupHistoryIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeHistory", "listPurgeGroupHistory", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeHistory", "listPurgeGroupHistory", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This data type models a purge event that occurs repetitively and automatically in caching server after a set interval of time. A time to live instance contains a reference to a mapping configuration, the path to execute the purge on, the result of the purge, and the time interval after which the purge will be executed. type Network_CdnMarketplace_Configuration_Cache_TimeToLive struct { Session session.SLSession @@ -2480,6 +3858,33 @@ func (r Network_CdnMarketplace_Configuration_Cache_TimeToLive) ListTimeToLive(un return } +func (r Network_CdnMarketplace_Configuration_Cache_TimeToLive) ListTimeToLiveIter(uniqueId *string) (resp []datatypes.Network_CdnMarketplace_Configuration_Cache_TimeToLive, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_TimeToLive", "listTimeToLive", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_CdnMarketplace_Configuration_Cache_TimeToLive{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_TimeToLive", "listTimeToLive", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_TimeToLive) UpdateTimeToLive(uniqueId *string, oldPath *string, newPath *string, oldTtl *string, newTtl *string) (resp string, err error) { params := []interface{}{ @@ -2542,6 +3947,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping) CreateDomainMapping(input return } +func (r Network_CdnMarketplace_Configuration_Mapping) CreateDomainMappingIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + params := []interface{}{ + input, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "createDomainMapping", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "createDomainMapping", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) DeleteDomainMapping(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -2551,6 +3983,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping) DeleteDomainMapping(unique return } +func (r Network_CdnMarketplace_Configuration_Mapping) DeleteDomainMappingIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "deleteDomainMapping", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "deleteDomainMapping", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) GetObject() (resp datatypes.Network_CdnMarketplace_Configuration_Mapping, err error) { err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "getObject", nil, &r.Options, &resp) @@ -2566,12 +4025,63 @@ func (r Network_CdnMarketplace_Configuration_Mapping) ListDomainMappingByUniqueI return } +func (r Network_CdnMarketplace_Configuration_Mapping) ListDomainMappingByUniqueIdIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappingByUniqueId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappingByUniqueId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) ListDomainMappings() (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappings", nil, &r.Options, &resp) return } +func (r Network_CdnMarketplace_Configuration_Mapping) ListDomainMappingsIter() (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) RetryHttpsActionRequest(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -2581,6 +4091,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping) RetryHttpsActionRequest(un return } +func (r Network_CdnMarketplace_Configuration_Mapping) RetryHttpsActionRequestIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "retryHttpsActionRequest", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "retryHttpsActionRequest", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) StartDomainMapping(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -2590,6 +4127,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping) StartDomainMapping(uniqueI return } +func (r Network_CdnMarketplace_Configuration_Mapping) StartDomainMappingIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "startDomainMapping", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "startDomainMapping", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) StopDomainMapping(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -2599,6 +4163,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping) StopDomainMapping(uniqueId return } +func (r Network_CdnMarketplace_Configuration_Mapping) StopDomainMappingIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "stopDomainMapping", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "stopDomainMapping", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) UpdateDomainMapping(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -2608,6 +4199,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping) UpdateDomainMapping(input return } +func (r Network_CdnMarketplace_Configuration_Mapping) UpdateDomainMappingIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + params := []interface{}{ + input, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "updateDomainMapping", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "updateDomainMapping", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Verifies the CNAME is Unique in the domain. The method will return true if CNAME is unique else returns false func (r Network_CdnMarketplace_Configuration_Mapping) VerifyCname(cname *string) (resp bool, err error) { params := []interface{}{ @@ -2626,6 +4244,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping) VerifyDomainMapping(unique return } +func (r Network_CdnMarketplace_Configuration_Mapping) VerifyDomainMappingIter(uniqueId *int) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "verifyDomainMapping", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "verifyDomainMapping", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Network_CdnMarketplace_Configuration_Mapping_Path struct { Session session.SLSession @@ -2675,6 +4320,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping_Path) CreateOriginPath(inpu return } +func (r Network_CdnMarketplace_Configuration_Mapping_Path) CreateOriginPathIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path, err error) { + params := []interface{}{ + input, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "createOriginPath", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "createOriginPath", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping_Path) DeleteOriginPath(uniqueId *string, path *string) (resp string, err error) { params := []interface{}{ @@ -2700,6 +4372,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping_Path) ListOriginPath(unique return } +func (r Network_CdnMarketplace_Configuration_Mapping_Path) ListOriginPathIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path, err error) { + params := []interface{}{ + uniqueId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "listOriginPath", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "listOriginPath", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping_Path) UpdateOriginPath(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path, err error) { params := []interface{}{ @@ -2709,6 +4408,33 @@ func (r Network_CdnMarketplace_Configuration_Mapping_Path) UpdateOriginPath(inpu return } +func (r Network_CdnMarketplace_Configuration_Mapping_Path) UpdateOriginPathIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path, err error) { + params := []interface{}{ + input, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "updateOriginPath", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "updateOriginPath", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This Metrics class provides methods to get CDN metrics based on account or mapping unique id. type Network_CdnMarketplace_Metrics struct { Session session.SLSession @@ -2761,15 +4487,75 @@ func (r Network_CdnMarketplace_Metrics) GetCustomerInvoicingMetrics(vendorName * return } -// no documentation yet -func (r Network_CdnMarketplace_Metrics) GetCustomerRealTimeMetrics(vendorName *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { +func (r Network_CdnMarketplace_Metrics) GetCustomerInvoicingMetricsIter(vendorName *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ vendorName, - startTime, + startDate, + endDate, + frequency, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerInvoicingMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerInvoicingMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// no documentation yet +func (r Network_CdnMarketplace_Metrics) GetCustomerRealTimeMetrics(vendorName *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + vendorName, + startTime, + endTime, + timeInterval, + } + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerRealTimeMetrics", params, &r.Options, &resp) + return +} + +func (r Network_CdnMarketplace_Metrics) GetCustomerRealTimeMetricsIter(vendorName *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + vendorName, + startTime, endTime, timeInterval, } + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerRealTimeMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerRealTimeMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -2785,6 +4571,36 @@ func (r Network_CdnMarketplace_Metrics) GetCustomerUsageMetrics(vendorName *stri return } +func (r Network_CdnMarketplace_Metrics) GetCustomerUsageMetricsIter(vendorName *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + vendorName, + startDate, + endDate, + frequency, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerUsageMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerUsageMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthByRegionMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -2797,6 +4613,36 @@ func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthByRegionMetrics(mappi return } +func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthByRegionMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + mappingUniqueId, + startDate, + endDate, + frequency, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingBandwidthByRegionMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingBandwidthByRegionMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -2809,6 +4655,36 @@ func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthMetrics(mappingUnique return } +func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + mappingUniqueId, + startDate, + endDate, + frequency, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingBandwidthMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingBandwidthMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingHitsByTypeMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -2821,6 +4697,36 @@ func (r Network_CdnMarketplace_Metrics) GetMappingHitsByTypeMetrics(mappingUniqu return } +func (r Network_CdnMarketplace_Metrics) GetMappingHitsByTypeMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + mappingUniqueId, + startDate, + endDate, + frequency, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingHitsByTypeMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingHitsByTypeMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingHitsMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -2833,6 +4739,36 @@ func (r Network_CdnMarketplace_Metrics) GetMappingHitsMetrics(mappingUniqueId *s return } +func (r Network_CdnMarketplace_Metrics) GetMappingHitsMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + mappingUniqueId, + startDate, + endDate, + frequency, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingHitsMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingHitsMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingIntegratedMetrics(mappingUniqueId *string, startTime *int, endTime *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -2845,6 +4781,36 @@ func (r Network_CdnMarketplace_Metrics) GetMappingIntegratedMetrics(mappingUniqu return } +func (r Network_CdnMarketplace_Metrics) GetMappingIntegratedMetricsIter(mappingUniqueId *string, startTime *int, endTime *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + mappingUniqueId, + startTime, + endTime, + frequency, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingIntegratedMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingIntegratedMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingRealTimeMetrics(mappingUniqueId *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -2857,6 +4823,36 @@ func (r Network_CdnMarketplace_Metrics) GetMappingRealTimeMetrics(mappingUniqueI return } +func (r Network_CdnMarketplace_Metrics) GetMappingRealTimeMetricsIter(mappingUniqueId *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + mappingUniqueId, + startTime, + endTime, + timeInterval, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingRealTimeMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingRealTimeMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingUsageMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -2869,6 +4865,36 @@ func (r Network_CdnMarketplace_Metrics) GetMappingUsageMetrics(mappingUniqueId * return } +func (r Network_CdnMarketplace_Metrics) GetMappingUsageMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { + params := []interface{}{ + mappingUniqueId, + startDate, + endDate, + frequency, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingUsageMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingUsageMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Network_CdnMarketplace_Vendor contains information regarding a CDN Vendor. This class is associated with SoftLayer_Network_CdnMarketplace_Vendor_Attribute class. type Network_CdnMarketplace_Vendor struct { Session session.SLSession @@ -2921,6 +4947,30 @@ func (r Network_CdnMarketplace_Vendor) ListVendors() (resp []datatypes.Container return } +func (r Network_CdnMarketplace_Vendor) ListVendorsIter() (resp []datatypes.Container_Network_CdnMarketplace_Vendor, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Vendor", "listVendors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_CdnMarketplace_Vendor{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Vendor", "listVendors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Every piece of hardware running in SoftLayer's datacenters connected to the public, private, or management networks (where applicable) have a corresponding network component. These network components are modeled by the SoftLayer_Network_Component data type. These data types reflect the servers' local ethernet and remote management interfaces. type Network_Component struct { Session session.SLSession @@ -2978,6 +5028,33 @@ func (r Network_Component) AddNetworkVlanTrunks(networkVlans []datatypes.Network return } +func (r Network_Component) AddNetworkVlanTrunksIter(networkVlans []datatypes.Network_Vlan) (resp []datatypes.Network_Vlan, err error) { + params := []interface{}{ + networkVlans, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "addNetworkVlanTrunks", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "addNetworkVlanTrunks", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Remove all VLANs currently attached as trunks to this network component. // // This method should be called on a network component of assigned hardware. A current list of VLAN trunks for a network component on a customer server can be found at 'uplinkComponent->networkVlanTrunks'. @@ -2992,6 +5069,30 @@ func (r Network_Component) ClearNetworkVlanTrunks() (resp []datatypes.Network_Vl return } +func (r Network_Component) ClearNetworkVlanTrunksIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "clearNetworkVlanTrunks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "clearNetworkVlanTrunks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Reboot/power (rebootDefault, rebootSoft, rebootHard, powerOn, powerOff and powerCycle) command currently executing by the server's remote management card. func (r Network_Component) GetActiveCommand() (resp datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getActiveCommand", nil, &r.Options, &resp) @@ -3028,12 +5129,60 @@ func (r Network_Component) GetIpAddressBindings() (resp []datatypes.Network_Comp return } +func (r Network_Component) GetIpAddressBindingsIter() (resp []datatypes.Network_Component_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddressBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddressBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Component) GetIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddresses", nil, &r.Options, &resp) return } +func (r Network_Component) GetIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Last reboot/power (rebootDefault, rebootSoft, rebootHard, powerOn, powerOff and powerCycle) command issued to the server's remote management card. func (r Network_Component) GetLastCommand() (resp datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getLastCommand", nil, &r.Options, &resp) @@ -3064,6 +5213,30 @@ func (r Network_Component) GetNetworkHardware() (resp []datatypes.Hardware, err return } +func (r Network_Component) GetNetworkHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The VLAN that a network component's subnet is associated with. func (r Network_Component) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlan", nil, &r.Options, &resp) @@ -3076,12 +5249,60 @@ func (r Network_Component) GetNetworkVlanTrunks() (resp []datatypes.Network_Comp return } +func (r Network_Component) GetNetworkVlanTrunksIter() (resp []datatypes.Network_Component_Network_Vlan_Trunk, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlanTrunks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Network_Vlan_Trunk{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlanTrunks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The viable trunking targets of this component. Viable targets include accessible VLANs in the same pod and network as this component, which are not already natively attached nor trunked to this component. func (r Network_Component) GetNetworkVlansTrunkable() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlansTrunkable", nil, &r.Options, &resp) return } +func (r Network_Component) GetNetworkVlansTrunkableIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlansTrunkable", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlansTrunkable", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Component) GetObject() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getObject", nil, &r.Options, &resp) @@ -3129,6 +5350,30 @@ func (r Network_Component) GetRecentCommands() (resp []datatypes.Hardware_Compon return } +func (r Network_Component) GetRecentCommandsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "getRecentCommands", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "getRecentCommands", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Indicates whether the network component is participating in a group of two or more components capable of being operationally redundant, if enabled. func (r Network_Component) GetRedundancyCapableFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getRedundancyCapableFlag", nil, &r.Options, &resp) @@ -3147,6 +5392,30 @@ func (r Network_Component) GetRemoteManagementUsers() (resp []datatypes.Hardware return } +func (r Network_Component) GetRemoteManagementUsersIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "getRemoteManagementUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "getRemoteManagementUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A network component's routers. func (r Network_Component) GetRouter() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getRouter", nil, &r.Options, &resp) @@ -3165,6 +5434,30 @@ func (r Network_Component) GetSubnets() (resp []datatypes.Network_Subnet, err er return } +func (r Network_Component) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "getSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "getSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network component linking this object to parent func (r Network_Component) GetUplinkComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getUplinkComponent", nil, &r.Options, &resp) @@ -3196,6 +5489,33 @@ func (r Network_Component) RemoveNetworkVlanTrunks(networkVlans []datatypes.Netw return } +func (r Network_Component) RemoveNetworkVlanTrunksIter(networkVlans []datatypes.Network_Vlan) (resp []datatypes.Network_Vlan, err error) { + params := []interface{}{ + networkVlans, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component", "removeNetworkVlanTrunks", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component", "removeNetworkVlanTrunks", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Network_Component_Firewall data type contains general information relating to a single SoftLayer network component firewall. This is the object which ties the running rules to a specific downstream server. Use the [[SoftLayer Network Firewall Template]] service to pull SoftLayer recommended rule set templates. Use the [[SoftLayer Network Firewall Update Request]] service to submit a firewall update request. type Network_Component_Firewall struct { Session session.SLSession @@ -3242,6 +5562,30 @@ func (r Network_Component_Firewall) GetApplyServerRuleSubnets() (resp []datatype return } +func (r Network_Component_Firewall) GetApplyServerRuleSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getApplyServerRuleSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getApplyServerRuleSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item for a Hardware Firewall (Dedicated). func (r Network_Component_Firewall) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getBillingItem", nil, &r.Options, &resp) @@ -3266,6 +5610,30 @@ func (r Network_Component_Firewall) GetNetworkFirewallUpdateRequest() (resp []da return } +func (r Network_Component_Firewall) GetNetworkFirewallUpdateRequestIter() (resp []datatypes.Network_Firewall_Update_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getNetworkFirewallUpdateRequest", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_Update_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getNetworkFirewallUpdateRequest", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject returns a SoftLayer_Network_Firewall_Module_Context_Interface_AccessControlList_Network_Component object. You can only get objects for servers attached to your account that have a network firewall enabled. func (r Network_Component_Firewall) GetObject() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getObject", nil, &r.Options, &resp) @@ -3278,12 +5646,60 @@ func (r Network_Component_Firewall) GetRules() (resp []datatypes.Network_Compone return } +func (r Network_Component_Firewall) GetRulesIter() (resp []datatypes.Network_Component_Firewall_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getRules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Firewall_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getRules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The additional subnets linked to this network component firewall. func (r Network_Component_Firewall) GetSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getSubnets", nil, &r.Options, &resp) return } +func (r Network_Component_Firewall) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Check for active transactions for the shared Firewall. func (r Network_Component_Firewall) HasActiveTransactions() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "hasActiveTransactions", nil, &r.Options, &resp) @@ -3345,6 +5761,30 @@ func (r Network_Customer_Subnet) GetIpAddresses() (resp []datatypes.Network_Cust return } +func (r Network_Customer_Subnet) GetIpAddressesIter() (resp []datatypes.Network_Customer_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Customer_Subnet", "getIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Customer_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Customer_Subnet", "getIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Network_Customer_Subnet object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Customer_Subnet service. You can only retrieve the subnet whose account matches the account that your portal user is assigned to. func (r Network_Customer_Subnet) GetObject() (resp datatypes.Network_Customer_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Customer_Subnet", "getObject", nil, &r.Options, &resp) @@ -3397,6 +5837,30 @@ func (r Network_DirectLink_Location) GetAllObjects() (resp []datatypes.Network_D return } +func (r Network_DirectLink_Location) GetAllObjectsIter() (resp []datatypes.Network_DirectLink_Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_DirectLink_Location", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_DirectLink_Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_DirectLink_Location", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The location of Direct Link facility. func (r Network_DirectLink_Location) GetLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_DirectLink_Location", "getLocation", nil, &r.Options, &resp) @@ -3559,6 +6023,30 @@ func (r Network_Firewall_AccessControlList) GetNetworkFirewallUpdateRequests() ( return } +func (r Network_Firewall_AccessControlList) GetNetworkFirewallUpdateRequestsIter() (resp []datatypes.Network_Firewall_Update_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getNetworkFirewallUpdateRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_Update_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getNetworkFirewallUpdateRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Firewall_AccessControlList) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getNetworkVlan", nil, &r.Options, &resp) @@ -3577,6 +6065,30 @@ func (r Network_Firewall_AccessControlList) GetRules() (resp []datatypes.Network return } +func (r Network_Firewall_AccessControlList) GetRulesIter() (resp []datatypes.Network_Vlan_Firewall_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getRules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan_Firewall_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getRules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Network_Firewall_Interface data type contains general information relating to a single SoftLayer firewall interface. This is the object which ties the firewall context access control list to a firewall. Use the [[SoftLayer Network Firewall Template]] service to pull SoftLayer recommended rule set templates. Use the [[SoftLayer Network Firewall Update Request]] service to submit a firewall update request. type Network_Firewall_Interface struct { Session session.SLSession @@ -3623,6 +6135,30 @@ func (r Network_Firewall_Interface) GetFirewallContextAccessControlLists() (resp return } +func (r Network_Firewall_Interface) GetFirewallContextAccessControlListsIter() (resp []datatypes.Network_Firewall_AccessControlList, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Interface", "getFirewallContextAccessControlLists", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_AccessControlList{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Interface", "getFirewallContextAccessControlLists", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Firewall_Interface) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_Interface", "getNetworkVlan", nil, &r.Options, &resp) @@ -3681,7 +6217,31 @@ func (r Network_Firewall_Module_Context_Interface) GetFirewallContextAccessContr return } -// Retrieve +func (r Network_Firewall_Module_Context_Interface) GetFirewallContextAccessControlListsIter() (resp []datatypes.Network_Firewall_AccessControlList, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Module_Context_Interface", "getFirewallContextAccessControlLists", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_AccessControlList{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Module_Context_Interface", "getFirewallContextAccessControlLists", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve func (r Network_Firewall_Module_Context_Interface) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_Module_Context_Interface", "getNetworkVlan", nil, &r.Options, &resp) return @@ -3743,6 +6303,30 @@ func (r Network_Firewall_Template) GetAllObjects() (resp []datatypes.Network_Fir return } +func (r Network_Firewall_Template) GetAllObjectsIter() (resp []datatypes.Network_Firewall_Template, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_Template{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject returns a SoftLayer_Network_Firewall_Template object. You can retrieve all available firewall templates. getAllObjects returns an array of all available SoftLayer_Network_Firewall_Template objects. You can use these templates to generate a [[SoftLayer Network Firewall Update Request]]. // // @SLDNDocumentation Service See Also SoftLayer_Network_Firewall_Update_Request @@ -3757,6 +6341,30 @@ func (r Network_Firewall_Template) GetRules() (resp []datatypes.Network_Firewall return } +func (r Network_Firewall_Template) GetRulesIter() (resp []datatypes.Network_Firewall_Template_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getRules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_Template_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getRules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Network_Firewall_Update_Request data type contains information relating to a SoftLayer network firewall update request. Use the [[SoftLayer Network Component Firewall]] service to view current rules. Use the [[SoftLayer Network Firewall Template]] service to pull SoftLayer recommended rule set templates. type Network_Firewall_Update_Request struct { Session session.SLSession @@ -3852,6 +6460,30 @@ func (r Network_Firewall_Update_Request) GetRules() (resp []datatypes.Network_Fi return } +func (r Network_Firewall_Update_Request) GetRulesIter() (resp []datatypes.Network_Firewall_Update_Request_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Update_Request", "getRules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_Update_Request_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Firewall_Update_Request", "getRules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Firewall_Update_Request) UpdateRuleNote(fwRule *datatypes.Network_Component_Firewall_Rule, note *string) (resp bool, err error) { params := []interface{}{ @@ -4058,6 +6690,33 @@ func (r Network_Gateway) GetAllowedOsPriceIds(memberId *int) (resp []int, err er return } +func (r Network_Gateway) GetAllowedOsPriceIdsIter(memberId *int) (resp []int, err error) { + params := []interface{}{ + memberId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getAllowedOsPriceIds", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getAllowedOsPriceIds", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns the Gbps capacity of the gateway object func (r Network_Gateway) GetCapacity() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getCapacity", nil, &r.Options, &resp) @@ -4070,6 +6729,30 @@ func (r Network_Gateway) GetInsideVlans() (resp []datatypes.Network_Gateway_Vlan return } +func (r Network_Gateway) GetInsideVlansIter() (resp []datatypes.Network_Gateway_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getInsideVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getInsideVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns manufacturer name for a given gateway object. func (r Network_Gateway) GetManufacturer(checkSameOs *bool, checkOsReloadMember *bool) (resp string, err error) { params := []interface{}{ @@ -4092,6 +6775,30 @@ func (r Network_Gateway) GetMembers() (resp []datatypes.Network_Gateway_Member, return } +func (r Network_Gateway) GetMembersIter() (resp []datatypes.Network_Gateway_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getMembers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getMembers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The firewall associated with this gateway, if any. func (r Network_Gateway) GetNetworkFirewall() (resp datatypes.Network_Vlan_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getNetworkFirewall", nil, &r.Options, &resp) @@ -4116,6 +6823,30 @@ func (r Network_Gateway) GetPossibleInsideVlans() (resp []datatypes.Network_Vlan return } +func (r Network_Gateway) GetPossibleInsideVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getPossibleInsideVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getPossibleInsideVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The private gateway IP address. func (r Network_Gateway) GetPrivateIpAddress() (resp datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getPrivateIpAddress", nil, &r.Options, &resp) @@ -4164,6 +6895,30 @@ func (r Network_Gateway) GetUpgradeItemPrices() (resp []datatypes.Product_Item_P return } +func (r Network_Gateway) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getUpgradeItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getUpgradeItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Gateway) IsAccountWhiteListed(category *string) (resp bool, err error) { params := []interface{}{ @@ -4328,6 +7083,33 @@ func (r Network_Gateway_Member) CreateObjects(templateObjects []datatypes.Networ return } +func (r Network_Gateway_Member) CreateObjectsIter(templateObjects []datatypes.Network_Gateway_Member) (resp []datatypes.Network_Gateway_Member, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Edit this member, only manufacturer and version can be changed func (r Network_Gateway_Member) EditObject(templateObject *datatypes.Network_Gateway_Member) (resp bool, err error) { params := []interface{}{ @@ -4361,6 +7143,30 @@ func (r Network_Gateway_Member) GetLicenses() (resp []datatypes.Network_Gateway_ return } +func (r Network_Gateway_Member) GetLicensesIter() (resp []datatypes.Network_Gateway_Member_Licenses, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_Member_Licenses{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway this member belongs to. func (r Network_Gateway_Member) GetNetworkGateway() (resp datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getNetworkGateway", nil, &r.Options, &resp) @@ -4379,6 +7185,30 @@ func (r Network_Gateway_Member) GetPasswords() (resp []datatypes.Network_Gateway return } +func (r Network_Gateway_Member) GetPasswordsIter() (resp []datatypes.Network_Gateway_Member_Passwords, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getPasswords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_Member_Passwords{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getPasswords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The public gateway IP address. func (r Network_Gateway_Member) GetPublicIpAddress() (resp datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getPublicIpAddress", nil, &r.Options, &resp) @@ -4507,6 +7337,34 @@ func (r Network_Gateway_Precheck) GetPrecheckStatus(gatewayId *int, getRollbackP return } +func (r Network_Gateway_Precheck) GetPrecheckStatusIter(gatewayId *int, getRollbackPrecheck *bool) (resp []datatypes.Network_Gateway_Precheck, err error) { + params := []interface{}{ + gatewayId, + getRollbackPrecheck, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Precheck", "getPrecheckStatus", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_Precheck{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Precheck", "getPrecheckStatus", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Used to create a License Management Network Gateway Precheck transaction. func (r Network_Gateway_Precheck) LicenseManagementPrecheck(gatewayId *int) (resp bool, err error) { params := []interface{}{ @@ -4629,6 +7487,33 @@ func (r Network_Gateway_VersionUpgrade) GetAllByUpgradePkgUrlId(upgradePkgUrlId return } +func (r Network_Gateway_VersionUpgrade) GetAllByUpgradePkgUrlIdIter(upgradePkgUrlId *int) (resp []datatypes.Network_Gateway_VersionUpgrade, err error) { + params := []interface{}{ + upgradePkgUrlId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getAllByUpgradePkgUrlId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_VersionUpgrade{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getAllByUpgradePkgUrlId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Gateway_VersionUpgrade) GetAllUpgradesByGatewayId(gatewayId *int) (resp []datatypes.Network_Gateway_VersionUpgrade, err error) { params := []interface{}{ @@ -4638,6 +7523,33 @@ func (r Network_Gateway_VersionUpgrade) GetAllUpgradesByGatewayId(gatewayId *int return } +func (r Network_Gateway_VersionUpgrade) GetAllUpgradesByGatewayIdIter(gatewayId *int) (resp []datatypes.Network_Gateway_VersionUpgrade, err error) { + params := []interface{}{ + gatewayId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getAllUpgradesByGatewayId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_VersionUpgrade{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getAllUpgradesByGatewayId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + func (r Network_Gateway_VersionUpgrade) GetGwOrdersAllowedLicenses(accountId *int, manufacturer *string) (resp string, err error) { params := []interface{}{ accountId, @@ -4657,6 +7569,34 @@ func (r Network_Gateway_VersionUpgrade) GetGwOrdersAllowedOS(accountId *int, man return } +func (r Network_Gateway_VersionUpgrade) GetGwOrdersAllowedOSIter(accountId *int, manufacturer *string) (resp []datatypes.Product_Package_Item_Prices, err error) { + params := []interface{}{ + accountId, + manufacturer, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getGwOrdersAllowedOS", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Item_Prices{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getGwOrdersAllowedOS", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Gateway_VersionUpgrade) GetObject() (resp datatypes.Network_Gateway_VersionUpgrade, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getObject", nil, &r.Options, &resp) @@ -4738,6 +7678,33 @@ func (r Network_Gateway_Vlan) CreateObjects(templateObjects []datatypes.Network_ return } +func (r Network_Gateway_Vlan) CreateObjectsIter(templateObjects []datatypes.Network_Gateway_Vlan) (resp []datatypes.Network_Gateway_Vlan, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Vlan", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Gateway_Vlan", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Start the asynchronous process to detach this VLANs from the gateway. func (r Network_Gateway_Vlan) DeleteObject() (err error) { var resp datatypes.Void @@ -4867,6 +7834,30 @@ func (r Network_Interconnect_Tenant) GetAllObjects() (resp []datatypes.Network_I return } +func (r Network_Interconnect_Tenant) GetAllObjectsIter() (resp []datatypes.Network_Interconnect_Tenant, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Interconnect_Tenant{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Interconnect_Tenant) GetAllPortLabelsWithCurrentUsage(directLinkLocationId *int) (resp []string, err error) { params := []interface{}{ @@ -4876,6 +7867,33 @@ func (r Network_Interconnect_Tenant) GetAllPortLabelsWithCurrentUsage(directLink return } +func (r Network_Interconnect_Tenant) GetAllPortLabelsWithCurrentUsageIter(directLinkLocationId *int) (resp []string, err error) { + params := []interface{}{ + directLinkLocationId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getAllPortLabelsWithCurrentUsage", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getAllPortLabelsWithCurrentUsage", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Interconnect_Tenant) GetBgpIpRange() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getBgpIpRange", nil, &r.Options, &resp) @@ -4919,6 +7937,30 @@ func (r Network_Interconnect_Tenant) GetNetworkZones() (resp []string, err error return } +func (r Network_Interconnect_Tenant) GetNetworkZonesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getNetworkZones", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getNetworkZones", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Interconnect_Tenant) GetObject() (resp datatypes.Network_Interconnect_Tenant, err error) { err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getObject", nil, &r.Options, &resp) @@ -5179,6 +8221,30 @@ func (r Network_LBaaS_L7Policy) GetL7Rules() (resp []datatypes.Network_LBaaS_L7R return } +func (r Network_LBaaS_L7Policy) GetL7RulesIter() (resp []datatypes.Network_LBaaS_L7Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Policy", "getL7Rules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_L7Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Policy", "getL7Rules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_LBaaS_L7Policy) GetObject() (resp datatypes.Network_LBaaS_L7Policy, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Policy", "getObject", nil, &r.Options, &resp) @@ -5256,12 +8322,60 @@ func (r Network_LBaaS_L7Pool) GetL7Members() (resp []datatypes.Network_LBaaS_L7M return } +func (r Network_LBaaS_L7Pool) GetL7MembersIter() (resp []datatypes.Network_LBaaS_L7Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Members", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_L7Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Members", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_LBaaS_L7Pool) GetL7Policies() (resp []datatypes.Network_LBaaS_L7Policy, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Policies", nil, &r.Options, &resp) return } +func (r Network_LBaaS_L7Pool) GetL7PoliciesIter() (resp []datatypes.Network_LBaaS_L7Policy, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Policies", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_L7Policy{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Policies", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns the health of all L7 pool's members which are created under load balancer. L7 members health status is available only after a L7 pool is associated with the L7 policy and that L7 policy has at least one L7 rule. func (r Network_LBaaS_L7Pool) GetL7PoolMemberHealth(loadBalancerUuid *string) (resp []datatypes.Network_LBaaS_L7PoolMembersHealth, err error) { params := []interface{}{ @@ -5271,6 +8385,33 @@ func (r Network_LBaaS_L7Pool) GetL7PoolMemberHealth(loadBalancerUuid *string) (r return } +func (r Network_LBaaS_L7Pool) GetL7PoolMemberHealthIter(loadBalancerUuid *string) (resp []datatypes.Network_LBaaS_L7PoolMembersHealth, err error) { + params := []interface{}{ + loadBalancerUuid, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7PoolMemberHealth", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_L7PoolMembersHealth{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7PoolMemberHealth", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_LBaaS_L7Pool) GetL7SessionAffinity() (resp datatypes.Network_LBaaS_L7SessionAffinity, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7SessionAffinity", nil, &r.Options, &resp) @@ -5433,6 +8574,30 @@ func (r Network_LBaaS_Listener) GetL7Policies() (resp []datatypes.Network_LBaaS_ return } +func (r Network_LBaaS_Listener) GetL7PoliciesIter() (resp []datatypes.Network_LBaaS_L7Policy, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_Listener", "getL7Policies", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_L7Policy{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_Listener", "getL7Policies", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_LBaaS_Listener) GetObject() (resp datatypes.Network_LBaaS_Listener, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_Listener", "getObject", nil, &r.Options, &resp) @@ -5514,6 +8679,30 @@ func (r Network_LBaaS_LoadBalancer) GetAllObjects() (resp []datatypes.Network_LB return } +func (r Network_LBaaS_LoadBalancer) GetAllObjectsIter() (resp []datatypes.Network_LBaaS_LoadBalancer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_LoadBalancer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the load balancer appliances for the given lb id. func (r Network_LBaaS_LoadBalancer) GetAppliances(lbId *string) (resp []datatypes.Network_LBaaS_LoadBalancerAppliance, err error) { params := []interface{}{ @@ -5523,6 +8712,33 @@ func (r Network_LBaaS_LoadBalancer) GetAppliances(lbId *string) (resp []datatype return } +func (r Network_LBaaS_LoadBalancer) GetAppliancesIter(lbId *string) (resp []datatypes.Network_LBaaS_LoadBalancerAppliance, err error) { + params := []interface{}{ + lbId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getAppliances", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_LoadBalancerAppliance{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getAppliances", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Datacenter, where load balancer is located. func (r Network_LBaaS_LoadBalancer) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getDatacenter", nil, &r.Options, &resp) @@ -5535,12 +8751,60 @@ func (r Network_LBaaS_LoadBalancer) GetHealthMonitors() (resp []datatypes.Networ return } +func (r Network_LBaaS_LoadBalancer) GetHealthMonitorsIter() (resp []datatypes.Network_LBaaS_HealthMonitor, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getHealthMonitors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_HealthMonitor{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getHealthMonitors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve L7Pools for load balancer. func (r Network_LBaaS_LoadBalancer) GetL7Pools() (resp []datatypes.Network_LBaaS_L7Pool, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getL7Pools", nil, &r.Options, &resp) return } +func (r Network_LBaaS_LoadBalancer) GetL7PoolsIter() (resp []datatypes.Network_LBaaS_L7Pool, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getL7Pools", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_L7Pool{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getL7Pools", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Return listener time series datapoints. The time series data is available for Throughput, ConnectionRate and ActiveConnections. Throughput is in bits per second. The values are an average over the time range. The time series data is available for 1hour, 6hours, 12hours, 1day, 1week or 2weeks. func (r Network_LBaaS_LoadBalancer) GetListenerTimeSeriesData(loadBalancerUuid *string, metricName *string, timeRange *string, listenerUuid *string) (resp []datatypes.Network_LBaaS_LoadBalancerMonitoringMetricDataPoint, err error) { params := []interface{}{ @@ -5553,12 +8817,66 @@ func (r Network_LBaaS_LoadBalancer) GetListenerTimeSeriesData(loadBalancerUuid * return } +func (r Network_LBaaS_LoadBalancer) GetListenerTimeSeriesDataIter(loadBalancerUuid *string, metricName *string, timeRange *string, listenerUuid *string) (resp []datatypes.Network_LBaaS_LoadBalancerMonitoringMetricDataPoint, err error) { + params := []interface{}{ + loadBalancerUuid, + metricName, + timeRange, + listenerUuid, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListenerTimeSeriesData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_LoadBalancerMonitoringMetricDataPoint{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListenerTimeSeriesData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Listeners assigned to load balancer. func (r Network_LBaaS_LoadBalancer) GetListeners() (resp []datatypes.Network_LBaaS_Listener, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListeners", nil, &r.Options, &resp) return } +func (r Network_LBaaS_LoadBalancer) GetListenersIter() (resp []datatypes.Network_LBaaS_Listener, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListeners", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_Listener{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListeners", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the load balancer object with given uuid. func (r Network_LBaaS_LoadBalancer) GetLoadBalancer(uuid *string) (resp datatypes.Network_LBaaS_LoadBalancer, err error) { params := []interface{}{ @@ -5577,6 +8895,33 @@ func (r Network_LBaaS_LoadBalancer) GetLoadBalancerMemberHealth(uuid *string) (r return } +func (r Network_LBaaS_LoadBalancer) GetLoadBalancerMemberHealthIter(uuid *string) (resp []datatypes.Network_LBaaS_PoolMembersHealth, err error) { + params := []interface{}{ + uuid, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getLoadBalancerMemberHealth", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_PoolMembersHealth{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getLoadBalancerMemberHealth", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Return load balancers statistics such as total number of current sessions and total number of accumulated connections. func (r Network_LBaaS_LoadBalancer) GetLoadBalancerStatistics(uuid *string) (resp datatypes.Network_LBaaS_LoadBalancerStatistics, err error) { params := []interface{}{ @@ -5595,12 +8940,63 @@ func (r Network_LBaaS_LoadBalancer) GetLoadBalancers(data *string) (resp []datat return } +func (r Network_LBaaS_LoadBalancer) GetLoadBalancersIter(data *string) (resp []datatypes.Network_LBaaS_LoadBalancer, err error) { + params := []interface{}{ + data, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getLoadBalancers", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_LoadBalancer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getLoadBalancers", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Members assigned to load balancer. func (r Network_LBaaS_LoadBalancer) GetMembers() (resp []datatypes.Network_LBaaS_Member, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getMembers", nil, &r.Options, &resp) return } +func (r Network_LBaaS_LoadBalancer) GetMembersIter() (resp []datatypes.Network_LBaaS_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getMembers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getMembers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_LBaaS_LoadBalancer) GetObject() (resp datatypes.Network_LBaaS_LoadBalancer, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getObject", nil, &r.Options, &resp) @@ -5613,6 +9009,30 @@ func (r Network_LBaaS_LoadBalancer) GetSslCiphers() (resp []datatypes.Network_LB return } +func (r Network_LBaaS_LoadBalancer) GetSslCiphersIter() (resp []datatypes.Network_LBaaS_SSLCipher, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getSslCiphers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_SSLCipher{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getSslCiphers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_LBaaS_LoadBalancer) ServiceDNS(data *string) (err error) { var resp datatypes.Void @@ -5820,7 +9240,31 @@ func (r Network_LBaaS_SSLCipher) GetAllObjects() (resp []datatypes.Network_LBaaS return } -// no documentation yet +func (r Network_LBaaS_SSLCipher) GetAllObjectsIter() (resp []datatypes.Network_LBaaS_SSLCipher, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_SSLCipher", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_SSLCipher{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LBaaS_SSLCipher", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// no documentation yet func (r Network_LBaaS_SSLCipher) GetObject() (resp datatypes.Network_LBaaS_SSLCipher, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_SSLCipher", "getObject", nil, &r.Options, &resp) return @@ -5906,6 +9350,30 @@ func (r Network_LoadBalancer_Global_Account) GetHosts() (resp []datatypes.Networ return } +func (r Network_LoadBalancer_Global_Account) GetHostsIter() (resp []datatypes.Network_LoadBalancer_Global_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Global_Account", "getHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LoadBalancer_Global_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Global_Account", "getHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The load balance method of a global load balancer account func (r Network_LoadBalancer_Global_Account) GetLoadBalanceType() (resp datatypes.Network_LoadBalancer_Global_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Global_Account", "getLoadBalanceType", nil, &r.Options, &resp) @@ -6080,6 +9548,30 @@ func (r Network_LoadBalancer_Service) GetStatus() (resp []datatypes.Container_Ne return } +func (r Network_LoadBalancer_Service) GetStatusIter() (resp []datatypes.Container_Network_LoadBalancer_StatusEntry, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Service", "getStatus", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_LoadBalancer_StatusEntry{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Service", "getStatus", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The load balancer that this service belongs to. func (r Network_LoadBalancer_Service) GetVip() (resp datatypes.Network_LoadBalancer_VirtualIpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Service", "getVip", nil, &r.Options, &resp) @@ -6191,6 +9683,30 @@ func (r Network_LoadBalancer_VirtualIpAddress) GetServices() (resp []datatypes.N return } +func (r Network_LoadBalancer_VirtualIpAddress) GetServicesIter() (resp []datatypes.Network_LoadBalancer_Service, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_VirtualIpAddress", "getServices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LoadBalancer_Service{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_VirtualIpAddress", "getServices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Quickly remove all active external connections to a Virtual IP Address. func (r Network_LoadBalancer_VirtualIpAddress) KickAllConnections() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_VirtualIpAddress", "kickAllConnections", nil, &r.Options, &resp) @@ -6282,6 +9798,30 @@ func (r Network_Message_Delivery) GetUpgradeItemPrices() (resp []datatypes.Produ return } +func (r Network_Message_Delivery) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery", "getUpgradeItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery", "getUpgradeItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The vendor for a network message delivery account. func (r Network_Message_Delivery) GetVendor() (resp datatypes.Network_Message_Delivery_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery", "getVendor", nil, &r.Options, &resp) @@ -6407,6 +9947,33 @@ func (r Network_Message_Delivery_Email_Sendgrid) GetEmailList(list *string) (res return } +func (r Network_Message_Delivery_Email_Sendgrid) GetEmailListIter(list *string) (resp []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_List_Entry, err error) { + params := []interface{}{ + list, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getEmailList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_List_Entry{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getEmailList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Message_Delivery_Email_Sendgrid) GetObject() (resp datatypes.Network_Message_Delivery_Email_Sendgrid, err error) { err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getObject", nil, &r.Options, &resp) @@ -6419,6 +9986,30 @@ func (r Network_Message_Delivery_Email_Sendgrid) GetOfferingsList() (resp []data return } +func (r Network_Message_Delivery_Email_Sendgrid) GetOfferingsListIter() (resp []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Catalog_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getOfferingsList", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Catalog_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getOfferingsList", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag that determines if a SendGrid e-mail delivery account has access to send mail through the SendGrid SMTP server. func (r Network_Message_Delivery_Email_Sendgrid) GetSmtpAccess() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getSmtpAccess", nil, &r.Options, &resp) @@ -6434,6 +10025,33 @@ func (r Network_Message_Delivery_Email_Sendgrid) GetStatistics(options *datatype return } +func (r Network_Message_Delivery_Email_Sendgrid) GetStatisticsIter(options *datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics_Options) (resp []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics, err error) { + params := []interface{}{ + options, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getStatistics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getStatistics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Message_Delivery_Email_Sendgrid) GetStatisticsGraph(options *datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics_Options) (resp datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics_Graph, err error) { params := []interface{}{ @@ -6455,6 +10073,30 @@ func (r Network_Message_Delivery_Email_Sendgrid) GetUpgradeItemPrices() (resp [] return } +func (r Network_Message_Delivery_Email_Sendgrid) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getUpgradeItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getUpgradeItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The vendor for a network message delivery account. func (r Network_Message_Delivery_Email_Sendgrid) GetVendor() (resp datatypes.Network_Message_Delivery_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getVendor", nil, &r.Options, &resp) @@ -6526,6 +10168,34 @@ func (r Network_Monitor) GetIpAddressesByHardware(hardware *datatypes.Hardware, return } +func (r Network_Monitor) GetIpAddressesByHardwareIter(hardware *datatypes.Hardware, partialIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { + params := []interface{}{ + hardware, + partialIpAddress, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Monitor", "getIpAddressesByHardware", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Monitor", "getIpAddressesByHardware", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This will return an arrayObject of objects containing the ipaddresses. Using an string parameter you can send a partial ipaddress to search within a given ipaddress. You can also set the max limit as well using the setting the resultLimit. func (r Network_Monitor) GetIpAddressesByVirtualGuest(guest *datatypes.Virtual_Guest, partialIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -6536,6 +10206,34 @@ func (r Network_Monitor) GetIpAddressesByVirtualGuest(guest *datatypes.Virtual_G return } +func (r Network_Monitor) GetIpAddressesByVirtualGuestIter(guest *datatypes.Virtual_Guest, partialIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { + params := []interface{}{ + guest, + partialIpAddress, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Monitor", "getIpAddressesByVirtualGuest", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Monitor", "getIpAddressesByVirtualGuest", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The Monitoring_Query_Host type represents a monitoring instance. It consists of a hardware ID to monitor, an IP address attached to that hardware ID, a method of monitoring, and what to do in the instance that the monitor ever fails. type Network_Monitor_Version1_Query_Host struct { Session session.SLSession @@ -6594,6 +10292,33 @@ func (r Network_Monitor_Version1_Query_Host) CreateObjects(templateObjects []dat return } +func (r Network_Monitor_Version1_Query_Host) CreateObjectsIter(templateObjects []datatypes.Network_Monitor_Version1_Query_Host) (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Like any other API object, the monitoring objects can be deleted by passing an instance of them into this function. The ID on the object must be set. func (r Network_Monitor_Version1_Query_Host) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "deleteObject", nil, &r.Options, &resp) @@ -6638,6 +10363,33 @@ func (r Network_Monitor_Version1_Query_Host) FindByHardwareId(hardwareId *int) ( return } +func (r Network_Monitor_Version1_Query_Host) FindByHardwareIdIter(hardwareId *int) (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { + params := []interface{}{ + hardwareId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "findByHardwareId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "findByHardwareId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware that is being monitored by this monitoring instance func (r Network_Monitor_Version1_Query_Host) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "getHardware", nil, &r.Options, &resp) @@ -6720,12 +10472,60 @@ func (r Network_Monitor_Version1_Query_Host_Stratum) GetAllQueryTypes() (resp [] return } +func (r Network_Monitor_Version1_Query_Host_Stratum) GetAllQueryTypesIter() (resp []datatypes.Network_Monitor_Version1_Query_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllQueryTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllQueryTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Calling this function returns all possible response type objects. These objects are to be used to set the values on the SoftLayer_Network_Monitor_Version1_Query_Host when creating new monitoring instances. func (r Network_Monitor_Version1_Query_Host_Stratum) GetAllResponseTypes() (resp []datatypes.Network_Monitor_Version1_Query_ResponseType, err error) { err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllResponseTypes", nil, &r.Options, &resp) return } +func (r Network_Monitor_Version1_Query_Host_Stratum) GetAllResponseTypesIter() (resp []datatypes.Network_Monitor_Version1_Query_ResponseType, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllResponseTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_ResponseType{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllResponseTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware object that these monitoring permissions applies to. func (r Network_Monitor_Version1_Query_Host_Stratum) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getHardware", nil, &r.Options, &resp) @@ -6792,12 +10592,60 @@ func (r Network_Pod) GetAllObjects() (resp []datatypes.Network_Pod, err error) { return } +func (r Network_Pod) GetAllObjectsIter() (resp []datatypes.Network_Pod, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Pod", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Pod{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Pod", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Provides the list of capabilities a Pod fulfills. See [[SoftLayer_Network_Pod/listCapabilities]] for more information on capabilities. func (r Network_Pod) GetCapabilities() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Pod", "getCapabilities", nil, &r.Options, &resp) return } +func (r Network_Pod) GetCapabilitiesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Pod", "getCapabilities", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Pod", "getCapabilities", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Set the initialization parameter to the “name“ of the Pod to retrieve. func (r Network_Pod) GetObject() (resp datatypes.Network_Pod, err error) { err = r.Session.DoRequest("SoftLayer_Network_Pod", "getObject", nil, &r.Options, &resp) @@ -6810,6 +10658,30 @@ func (r Network_Pod) ListCapabilities() (resp []string, err error) { return } +func (r Network_Pod) ListCapabilitiesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Pod", "listCapabilities", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Pod", "listCapabilities", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Network_SecurityGroup data type contains general information for a single security group. A security group contains a set of IP filter [[SoftLayer_Network_SecurityGroup_Rule (type)|rules]] that define how to handle incoming (ingress) and outgoing (egress) traffic to both the public and private interfaces of a virtual server instance and a set of [[SoftLayer_Virtual_Network_SecurityGroup_NetworkComponentBinding (type)|bindings]] to associate virtual guest network components with the security group. type Network_SecurityGroup struct { Session session.SLSession @@ -6886,6 +10758,33 @@ func (r Network_SecurityGroup) CreateObjects(templateObjects []datatypes.Network return } +func (r Network_SecurityGroup) CreateObjectsIter(templateObjects []datatypes.Network_SecurityGroup) (resp []datatypes.Network_SecurityGroup, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_SecurityGroup{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Delete a security group for an account. A security group cannot be deleted if any network components are attached or if the security group is a remote security group for a [[SoftLayer_Network_SecurityGroup_Rule (type)|rule]]. func (r Network_SecurityGroup) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "deleteObject", nil, &r.Options, &resp) @@ -6949,18 +10848,90 @@ func (r Network_SecurityGroup) GetAllObjects() (resp []datatypes.Network_Securit return } +func (r Network_SecurityGroup) GetAllObjectsIter() (resp []datatypes.Network_SecurityGroup, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_SecurityGroup{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // List the current security group limits func (r Network_SecurityGroup) GetLimits() (resp []datatypes.Container_Network_SecurityGroup_Limit, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getLimits", nil, &r.Options, &resp) return } +func (r Network_SecurityGroup) GetLimitsIter() (resp []datatypes.Container_Network_SecurityGroup_Limit, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getLimits", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_SecurityGroup_Limit{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getLimits", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network component bindings for this security group. func (r Network_SecurityGroup) GetNetworkComponentBindings() (resp []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getNetworkComponentBindings", nil, &r.Options, &resp) return } +func (r Network_SecurityGroup) GetNetworkComponentBindingsIter() (resp []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getNetworkComponentBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getNetworkComponentBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_SecurityGroup) GetObject() (resp datatypes.Network_SecurityGroup, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getObject", nil, &r.Options, &resp) @@ -6973,18 +10944,90 @@ func (r Network_SecurityGroup) GetOrderBindings() (resp []datatypes.Network_Secu return } +func (r Network_SecurityGroup) GetOrderBindingsIter() (resp []datatypes.Network_SecurityGroup_OrderBinding, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getOrderBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_SecurityGroup_OrderBinding{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getOrderBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The rules for this security group. func (r Network_SecurityGroup) GetRules() (resp []datatypes.Network_SecurityGroup_Rule, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getRules", nil, &r.Options, &resp) return } +func (r Network_SecurityGroup) GetRulesIter() (resp []datatypes.Network_SecurityGroup_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getRules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_SecurityGroup_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getRules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // List the data centers that currently support the use of security groups. func (r Network_SecurityGroup) GetSupportedDataCenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getSupportedDataCenters", nil, &r.Options, &resp) return } +func (r Network_SecurityGroup) GetSupportedDataCentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getSupportedDataCenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getSupportedDataCenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Remove rules from a security group. func (r Network_SecurityGroup) RemoveRules(ruleIds []int) (resp datatypes.Network_SecurityGroup_RequestRules, err error) { params := []interface{}{ @@ -7249,6 +11292,33 @@ func (r Network_Storage) AllowAccessFromHostList(hostObjectTemplates []datatypes return } +func (r Network_Storage) AllowAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "allowAccessFromHostList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "allowAccessFromHostList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is used to modify the access control list for this Storage volume. The SoftLayer_Network_Subnet_IpAddress objects which have been allowed access to this storage will be listed in the allowedIpAddresses property of this storage volume. func (r Network_Storage) AllowAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -7607,12 +11677,60 @@ func (r Network_Storage) GetActiveTransactions() (resp []datatypes.Provisioning_ return } +func (r Network_Storage) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getActiveTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getActiveTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files in a Storage account's root directory. This does not download file content. func (r Network_Storage) GetAllFiles() (resp []datatypes.Container_Utility_File_Entity, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFiles", nil, &r.Options, &resp) return } +func (r Network_Storage) GetAllFilesIter() (resp []datatypes.Container_Utility_File_Entity, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files matching the filter's criteria in a Storage account's root directory. This does not download file content. func (r Network_Storage) GetAllFilesByFilter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -7622,6 +11740,33 @@ func (r Network_Storage) GetAllFilesByFilter(filter *datatypes.Container_Utility return } +func (r Network_Storage) GetAllFilesByFilterIter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { + params := []interface{}{ + filter, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFilesByFilter", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFilesByFilter", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage) GetAllowDisasterRecoveryFailback() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowDisasterRecoveryFailback", nil, &r.Options, &resp) @@ -7643,6 +11788,33 @@ func (r Network_Storage) GetAllowableHardware(filterHostname *string) (resp []da return } +func (r Network_Storage) GetAllowableHardwareIter(filterHostname *string) (resp []datatypes.Hardware, err error) { + params := []interface{}{ + filterHostname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableHardware", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableHardware", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Subnet_IpAddress that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage) GetAllowableIpAddresses(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -7653,6 +11825,34 @@ func (r Network_Storage) GetAllowableIpAddresses(subnetId *int, filterIpAddress return } +func (r Network_Storage) GetAllowableIpAddressesIter(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { + params := []interface{}{ + subnetId, + filterIpAddress, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableIpAddresses", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableIpAddresses", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Subnet that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage) GetAllowableSubnets(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { params := []interface{}{ @@ -7662,6 +11862,33 @@ func (r Network_Storage) GetAllowableSubnets(filterNetworkIdentifier *string) (r return } +func (r Network_Storage) GetAllowableSubnetsIter(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { + params := []interface{}{ + filterNetworkIdentifier, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableSubnets", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableSubnets", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Virtual_Guest that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage) GetAllowableVirtualGuests(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -7671,12 +11898,63 @@ func (r Network_Storage) GetAllowableVirtualGuests(filterHostname *string) (resp return } +func (r Network_Storage) GetAllowableVirtualGuestsIter(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { + params := []interface{}{ + filterHostname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableVirtualGuests", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableVirtualGuests", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume. func (r Network_Storage) GetAllowedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedHardware", nil, &r.Options, &resp) return } +func (r Network_Storage) GetAllowedHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the total number of allowed hosts limit per volume. func (r Network_Storage) GetAllowedHostsLimit() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedHostsLimit", nil, &r.Options, &resp) @@ -7689,15 +11967,87 @@ func (r Network_Storage) GetAllowedIpAddresses() (resp []datatypes.Network_Subne return } +func (r Network_Storage) GetAllowedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage) GetAllowedReplicationHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationHardware", nil, &r.Options, &resp) return } -// Retrieve The SoftLayer_Network_Subnet_IpAddress objects which are allowed access to this storage volume's Replicant. -func (r Network_Storage) GetAllowedReplicationIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) +func (r Network_Storage) GetAllowedReplicationHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve The SoftLayer_Network_Subnet_IpAddress objects which are allowed access to this storage volume's Replicant. +func (r Network_Storage) GetAllowedReplicationIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) + return +} + +func (r Network_Storage) GetAllowedReplicationIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -7707,24 +12057,120 @@ func (r Network_Storage) GetAllowedReplicationSubnets() (resp []datatypes.Networ return } +func (r Network_Storage) GetAllowedReplicationSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage) GetAllowedReplicationVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) return } +func (r Network_Storage) GetAllowedReplicationVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume. func (r Network_Storage) GetAllowedSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedSubnets", nil, &r.Options, &resp) return } +func (r Network_Storage) GetAllowedSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Virtual_Guest objects which are allowed access to this storage volume. func (r Network_Storage) GetAllowedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedVirtualGuests", nil, &r.Options, &resp) return } +func (r Network_Storage) GetAllowedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current billing item for a Storage volume. func (r Network_Storage) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getBillingItem", nil, &r.Options, &resp) @@ -7747,6 +12193,34 @@ func (r Network_Storage) GetByUsername(username *string, typ *string) (resp []da return } +func (r Network_Storage) GetByUsernameIter(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + username, + typ, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getByUsername", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getByUsername", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of space used by the volume, in bytes. func (r Network_Storage) GetBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getBytesUsed", nil, &r.Options, &resp) @@ -7759,6 +12233,30 @@ func (r Network_Storage) GetCdnUrls() (resp []datatypes.Container_Network_Storag return } +func (r Network_Storage) GetCdnUrlsIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getCdnUrls", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getCdnUrls", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage) GetClusterResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getClusterResource", nil, &r.Options, &resp) @@ -7777,6 +12275,30 @@ func (r Network_Storage) GetCredentials() (resp []datatypes.Network_Storage_Cred return } +func (r Network_Storage) GetCredentialsIter() (resp []datatypes.Network_Storage_Credential, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getCredentials", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Credential{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getCredentials", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Daily Schedule which is associated with this network storage volume. func (r Network_Storage) GetDailySchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getDailySchedule", nil, &r.Options, &resp) @@ -7795,6 +12317,30 @@ func (r Network_Storage) GetDependentDuplicates() (resp []datatypes.Network_Stor return } +func (r Network_Storage) GetDependentDuplicatesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getDependentDuplicates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getDependentDuplicates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is used to check, if for the given classic file block storage volume, a transaction performing dependent to independent duplicate conversion is active. If yes, then this returns the current percentage of its progress along with its start time as [SoftLayer_Container_Network_Storage_DuplicateConversionStatusInformation] object with its name, percentage and transaction start timestamp. func (r Network_Storage) GetDuplicateConversionStatus() (resp datatypes.Container_Network_Storage_DuplicateConversionStatusInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getDuplicateConversionStatus", nil, &r.Options, &resp) @@ -7807,6 +12353,30 @@ func (r Network_Storage) GetEvents() (resp []datatypes.Network_Storage_Event, er return } +func (r Network_Storage) GetEventsIter() (resp []datatypes.Network_Storage_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determines whether the volume is allowed to failback func (r Network_Storage) GetFailbackNotAllowed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFailbackNotAllowed", nil, &r.Options, &resp) @@ -7824,6 +12394,30 @@ func (r Network_Storage) GetFileBlockEncryptedLocations() (resp []datatypes.Loca return } +func (r Network_Storage) GetFileBlockEncryptedLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileBlockEncryptedLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date of a file within a Storage account. This does not download file content. func (r Network_Storage) GetFileByIdentifier(identifier *string) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -7849,6 +12443,34 @@ func (r Network_Storage) GetFileList(folder *string, path *string) (resp []datat return } +func (r Network_Storage) GetFileListIter(folder *string, path *string) (resp []datatypes.Container_Utility_File_Entity, err error) { + params := []interface{}{ + folder, + path, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Retrieves the NFS Network Mount Address Name for a given File Storage Volume. func (r Network_Storage) GetFileNetworkMountAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileNetworkMountAddress", nil, &r.Options, &resp) @@ -7867,6 +12489,30 @@ func (r Network_Storage) GetFilesPendingDelete() (resp []datatypes.Container_Uti return } +func (r Network_Storage) GetFilesPendingDeleteIter() (resp []datatypes.Container_Utility_File_Entity, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFilesPendingDelete", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFilesPendingDelete", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage) GetFixReplicationCurrentStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFixReplicationCurrentStatus", nil, &r.Options, &resp) @@ -7879,6 +12525,30 @@ func (r Network_Storage) GetFolderList() (resp []datatypes.Container_Network_Sto return } +func (r Network_Storage) GetFolderListIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFolderList", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFolderList", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} // // getGraph() retrieves a Storage account's usage and returns a PNG graph image, title, and the minimum and maximum dates included in the graphed date range. Virtual Server storage accounts can also graph upload and download bandwidth usage. @@ -7970,6 +12640,30 @@ func (r Network_Storage) GetIscsiLuns() (resp []datatypes.Network_Storage, err e return } +func (r Network_Storage) GetIscsiLunsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiLuns", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiLuns", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes configured to be replicants of this volume. func (r Network_Storage) GetIscsiReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiReplicatingVolume", nil, &r.Options, &resp) @@ -7982,6 +12676,30 @@ func (r Network_Storage) GetIscsiTargetIpAddresses() (resp []string, err error) return } +func (r Network_Storage) GetIscsiTargetIpAddressesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiTargetIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiTargetIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The ID of the LUN volume. func (r Network_Storage) GetLunId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getLunId", nil, &r.Options, &resp) @@ -7994,6 +12712,30 @@ func (r Network_Storage) GetManualSnapshots() (resp []datatypes.Network_Storage, return } +func (r Network_Storage) GetManualSnapshotsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getManualSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getManualSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage) GetMaximumExpansionSize() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getMaximumExpansionSize", nil, &r.Options, &resp) @@ -8048,6 +12790,30 @@ func (r Network_Storage) GetNotificationSubscribers() (resp []datatypes.Notifica return } +func (r Network_Storage) GetNotificationSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getNotificationSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getNotificationSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Network_Storage object whose ID corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Storage service. // // Please use the associated methods in the [[SoftLayer_Network_Storage]] service to retrieve a Storage account's id. @@ -8062,6 +12828,30 @@ func (r Network_Storage) GetObjectStorageConnectionInformation() (resp []datatyp return } +func (r Network_Storage) GetObjectStorageConnectionInformationIter() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getObjectStorageConnectionInformation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getObjectStorageConnectionInformation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve network storage accounts by SoftLayer_Network_Storage_Credential object. Use this method if you wish to retrieve a storage record by a credential rather than by id. func (r Network_Storage) GetObjectsByCredential(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -8071,6 +12861,33 @@ func (r Network_Storage) GetObjectsByCredential(credentialObject *datatypes.Netw return } +func (r Network_Storage) GetObjectsByCredentialIter(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + credentialObject, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getObjectsByCredential", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getObjectsByCredential", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The name of the snapshot that this volume was duplicated from. func (r Network_Storage) GetOriginalSnapshotName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getOriginalSnapshotName", nil, &r.Options, &resp) @@ -8113,6 +12930,30 @@ func (r Network_Storage) GetParentPartnerships() (resp []datatypes.Network_Stora return } +func (r Network_Storage) GetParentPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getParentPartnerships", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Partnership{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getParentPartnerships", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The parent volume of a volume in a complex storage relationship. func (r Network_Storage) GetParentVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getParentVolume", nil, &r.Options, &resp) @@ -8125,18 +12966,90 @@ func (r Network_Storage) GetPartnerships() (resp []datatypes.Network_Storage_Par return } +func (r Network_Storage) GetPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPartnerships", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Partnership{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPartnerships", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All permissions group(s) this volume is in. func (r Network_Storage) GetPermissionsGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPermissionsGroups", nil, &r.Options, &resp) return } +func (r Network_Storage) GetPermissionsGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPermissionsGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPermissionsGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The properties used to provide additional details about a network storage volume. func (r Network_Storage) GetProperties() (resp []datatypes.Network_Storage_Property, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getProperties", nil, &r.Options, &resp) return } +func (r Network_Storage) GetPropertiesIter() (resp []datatypes.Network_Storage_Property, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getProperties", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Property{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getProperties", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The number of IOPs provisioned for this volume. func (r Network_Storage) GetProvisionedIops() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getProvisionedIops", nil, &r.Options, &resp) @@ -8170,6 +13083,30 @@ func (r Network_Storage) GetReplicatingLuns() (resp []datatypes.Network_Storage, return } +func (r Network_Storage) GetReplicatingLunsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicatingLuns", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicatingLuns", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volume being replicated by a volume. func (r Network_Storage) GetReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicatingVolume", nil, &r.Options, &resp) @@ -8182,12 +13119,60 @@ func (r Network_Storage) GetReplicationEvents() (resp []datatypes.Network_Storag return } +func (r Network_Storage) GetReplicationEventsIter() (resp []datatypes.Network_Storage_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes configured to be replicants of a volume. func (r Network_Storage) GetReplicationPartners() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationPartners", nil, &r.Options, &resp) return } +func (r Network_Storage) GetReplicationPartnersIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationPartners", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationPartners", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Replication Schedule associated with a network storage volume. func (r Network_Storage) GetReplicationSchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationSchedule", nil, &r.Options, &resp) @@ -8212,6 +13197,30 @@ func (r Network_Storage) GetSchedules() (resp []datatypes.Network_Storage_Schedu return } +func (r Network_Storage) GetSchedulesIter() (resp []datatypes.Network_Storage_Schedule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSchedules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Schedule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSchedules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network resource a Storage service is connected to. func (r Network_Storage) GetServiceResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getServiceResource", nil, &r.Options, &resp) @@ -8272,12 +13281,60 @@ func (r Network_Storage) GetSnapshots() (resp []datatypes.Network_Storage, err e return } +func (r Network_Storage) GetSnapshotsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of snapshots for this SoftLayer_Network_Storage volume. This method works with the result limits and offset to support pagination. func (r Network_Storage) GetSnapshotsForVolume() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshotsForVolume", nil, &r.Options, &resp) return } +func (r Network_Storage) GetSnapshotsForVolumeIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshotsForVolume", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshotsForVolume", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage) GetStaasVersion() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStaasVersion", nil, &r.Options, &resp) @@ -8290,12 +13347,60 @@ func (r Network_Storage) GetStorageGroups() (resp []datatypes.Network_Storage_Gr return } +func (r Network_Storage) GetStorageGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage) GetStorageGroupsNetworkConnectionDetails() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) return } +func (r Network_Storage) GetStorageGroupsNetworkConnectionDetailsIter() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_NetworkConnectionInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroupsNetworkConnectionDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage) GetStorageTierLevel() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageTierLevel", nil, &r.Options, &resp) @@ -8314,6 +13419,30 @@ func (r Network_Storage) GetTargetIpAddresses() (resp []string, err error) { return } +func (r Network_Storage) GetTargetIpAddressesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getTargetIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getTargetIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of space used by the volume. func (r Network_Storage) GetTotalBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getTotalBytesUsed", nil, &r.Options, &resp) @@ -8338,6 +13467,30 @@ func (r Network_Storage) GetValidReplicationTargetDatacenterLocations() (resp [] return } +func (r Network_Storage) GetValidReplicationTargetDatacenterLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getValidReplicationTargetDatacenterLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getValidReplicationTargetDatacenterLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type of network storage service. func (r Network_Storage) GetVendorName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVendorName", nil, &r.Options, &resp) @@ -8356,6 +13509,30 @@ func (r Network_Storage) GetVolumeCountLimits() (resp []datatypes.Container_Netw return } +func (r Network_Storage) GetVolumeCountLimitsIter() (resp []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeCountLimits", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeCountLimits", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns the parameters for cloning a volume func (r Network_Storage) GetVolumeDuplicateParameters() (resp datatypes.Container_Network_Storage_VolumeDuplicateParameters, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeDuplicateParameters", nil, &r.Options, &resp) @@ -8368,6 +13545,30 @@ func (r Network_Storage) GetVolumeHistory() (resp []datatypes.Network_Storage_Hi return } +func (r Network_Storage) GetVolumeHistoryIter() (resp []datatypes.Network_Storage_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current status of a network storage volume. func (r Network_Storage) GetVolumeStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeStatus", nil, &r.Options, &resp) @@ -8490,6 +13691,33 @@ func (r Network_Storage) RemoveAccessFromHostList(hostObjectTemplates []datatype return } +func (r Network_Storage) RemoveAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "removeAccessFromHostList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "removeAccessFromHostList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is used to modify the access control list for this Storage volume. The SoftLayer_Network_Subnet_IpAddress objects which have been allowed access to this storage will be listed in the allowedIpAddresses property of this storage volume. func (r Network_Storage) RemoveAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -8692,6 +13920,33 @@ func (r Network_Storage) ValidateHostsAccess(hostObjectTemplates []datatypes.Con return } +func (r Network_Storage) ValidateHostsAccessIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Container_Network_Storage_HostsGatewayInformation, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage", "validateHostsAccess", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_HostsGatewayInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage", "validateHostsAccess", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Network_Storage_Allowed_Host struct { Session session.SLSession @@ -8741,6 +13996,33 @@ func (r Network_Storage_Allowed_Host) AssignSubnetsToAcl(subnetIds []int) (resp return } +func (r Network_Storage_Allowed_Host) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "assignSubnetsToAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "assignSubnetsToAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -8756,36 +14038,180 @@ func (r Network_Storage_Allowed_Host) GetAllObjects() (resp []datatypes.Network_ return } +func (r Network_Storage_Allowed_Host) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. func (r Network_Storage_Allowed_Host) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedGroups", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedIscsiVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedIscsiVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedNfsVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedNfsVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedReplicationVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedReplicationVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getCredential", nil, &r.Options, &resp) @@ -8810,6 +14236,30 @@ func (r Network_Storage_Allowed_Host) GetSubnetsInAcl() (resp []datatypes.Networ return } +func (r Network_Storage_Allowed_Host) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getSubnetsInAcl", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getSubnetsInAcl", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -8819,6 +14269,33 @@ func (r Network_Storage_Allowed_Host) RemoveSubnetsFromAcl(subnetIds []int) (res return } +func (r Network_Storage_Allowed_Host) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "removeSubnetsFromAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "removeSubnetsFromAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -8877,6 +14354,33 @@ func (r Network_Storage_Allowed_Host_Hardware) AssignSubnetsToAcl(subnetIds []in return } +func (r Network_Storage_Allowed_Host_Hardware) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "assignSubnetsToAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "assignSubnetsToAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host_Hardware) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -8898,36 +14402,180 @@ func (r Network_Storage_Allowed_Host_Hardware) GetAllObjects() (resp []datatypes return } +func (r Network_Storage_Allowed_Host_Hardware) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedGroups", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Hardware) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Hardware) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedIscsiVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedIscsiVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Hardware) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedNfsVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedNfsVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Hardware) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedReplicationVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedReplicationVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Hardware) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host_Hardware) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getCredential", nil, &r.Options, &resp) @@ -8958,6 +14606,30 @@ func (r Network_Storage_Allowed_Host_Hardware) GetSubnetsInAcl() (resp []datatyp return } +func (r Network_Storage_Allowed_Host_Hardware) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getSubnetsInAcl", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getSubnetsInAcl", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host_Hardware) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -8967,6 +14639,33 @@ func (r Network_Storage_Allowed_Host_Hardware) RemoveSubnetsFromAcl(subnetIds [] return } +func (r Network_Storage_Allowed_Host_Hardware) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "removeSubnetsFromAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "removeSubnetsFromAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host_Hardware) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -9025,6 +14724,33 @@ func (r Network_Storage_Allowed_Host_IpAddress) AssignSubnetsToAcl(subnetIds []i return } +func (r Network_Storage_Allowed_Host_IpAddress) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "assignSubnetsToAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "assignSubnetsToAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host_IpAddress) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -9046,36 +14772,180 @@ func (r Network_Storage_Allowed_Host_IpAddress) GetAllObjects() (resp []datatype return } +func (r Network_Storage_Allowed_Host_IpAddress) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedGroups", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedIscsiVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedIscsiVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedNfsVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedNfsVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedReplicationVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedReplicationVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host_IpAddress) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getCredential", nil, &r.Options, &resp) @@ -9106,6 +14976,30 @@ func (r Network_Storage_Allowed_Host_IpAddress) GetSubnetsInAcl() (resp []dataty return } +func (r Network_Storage_Allowed_Host_IpAddress) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getSubnetsInAcl", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getSubnetsInAcl", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host_IpAddress) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -9115,6 +15009,33 @@ func (r Network_Storage_Allowed_Host_IpAddress) RemoveSubnetsFromAcl(subnetIds [ return } +func (r Network_Storage_Allowed_Host_IpAddress) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "removeSubnetsFromAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "removeSubnetsFromAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host_IpAddress) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -9173,6 +15094,33 @@ func (r Network_Storage_Allowed_Host_Subnet) AssignSubnetsToAcl(subnetIds []int) return } +func (r Network_Storage_Allowed_Host_Subnet) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "assignSubnetsToAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "assignSubnetsToAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host_Subnet) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -9194,36 +15142,180 @@ func (r Network_Storage_Allowed_Host_Subnet) GetAllObjects() (resp []datatypes.N return } +func (r Network_Storage_Allowed_Host_Subnet) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedGroups", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Subnet) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Subnet) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedIscsiVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedIscsiVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Subnet) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedNfsVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedNfsVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Subnet) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedReplicationVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedReplicationVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_Subnet) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host_Subnet) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getCredential", nil, &r.Options, &resp) @@ -9254,6 +15346,30 @@ func (r Network_Storage_Allowed_Host_Subnet) GetSubnetsInAcl() (resp []datatypes return } +func (r Network_Storage_Allowed_Host_Subnet) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getSubnetsInAcl", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getSubnetsInAcl", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host_Subnet) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -9263,6 +15379,33 @@ func (r Network_Storage_Allowed_Host_Subnet) RemoveSubnetsFromAcl(subnetIds []in return } +func (r Network_Storage_Allowed_Host_Subnet) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "removeSubnetsFromAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "removeSubnetsFromAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host_Subnet) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -9321,6 +15464,33 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) AssignSubnetsToAcl(subnetIds return } +func (r Network_Storage_Allowed_Host_VirtualGuest) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "assignSubnetsToAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "assignSubnetsToAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host_VirtualGuest) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -9336,9 +15506,33 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) GetAccount() (resp datatypes. return } -// no documentation yet -func (r Network_Storage_Allowed_Host_VirtualGuest) GetAllObjects() (resp []datatypes.Network_Storage_Allowed_Host, err error) { +// no documentation yet +func (r Network_Storage_Allowed_Host_VirtualGuest) GetAllObjects() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAllObjects", nil, &r.Options, &resp) + return +} + +func (r Network_Storage_Allowed_Host_VirtualGuest) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -9348,30 +15542,150 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedGroups() (resp []d return } +func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedIscsiVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedIscsiVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedNfsVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedNfsVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedReplicationVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedReplicationVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host_VirtualGuest) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getCredential", nil, &r.Options, &resp) @@ -9402,6 +15716,30 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) GetSubnetsInAcl() (resp []dat return } +func (r Network_Storage_Allowed_Host_VirtualGuest) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getSubnetsInAcl", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getSubnetsInAcl", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Allowed_Host_VirtualGuest) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -9411,6 +15749,33 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) RemoveSubnetsFromAcl(subnetId return } +func (r Network_Storage_Allowed_Host_VirtualGuest) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { + params := []interface{}{ + subnetIds, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "removeSubnetsFromAcl", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "removeSubnetsFromAcl", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host_VirtualGuest) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -9497,6 +15862,33 @@ func (r Network_Storage_Backup_Evault) AllowAccessFromHostList(hostObjectTemplat return } +func (r Network_Storage_Backup_Evault) AllowAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "allowAccessFromHostList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "allowAccessFromHostList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is used to modify the access control list for this Storage volume. The SoftLayer_Network_Subnet_IpAddress objects which have been allowed access to this storage will be listed in the allowedIpAddresses property of this storage volume. func (r Network_Storage_Backup_Evault) AllowAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -9866,12 +16258,60 @@ func (r Network_Storage_Backup_Evault) GetActiveTransactions() (resp []datatypes return } +func (r Network_Storage_Backup_Evault) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getActiveTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getActiveTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files in a Storage account's root directory. This does not download file content. func (r Network_Storage_Backup_Evault) GetAllFiles() (resp []datatypes.Container_Utility_File_Entity, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFiles", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetAllFilesIter() (resp []datatypes.Container_Utility_File_Entity, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files matching the filter's criteria in a Storage account's root directory. This does not download file content. func (r Network_Storage_Backup_Evault) GetAllFilesByFilter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -9881,6 +16321,33 @@ func (r Network_Storage_Backup_Evault) GetAllFilesByFilter(filter *datatypes.Con return } +func (r Network_Storage_Backup_Evault) GetAllFilesByFilterIter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { + params := []interface{}{ + filter, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFilesByFilter", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFilesByFilter", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Backup_Evault) GetAllowDisasterRecoveryFailback() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowDisasterRecoveryFailback", nil, &r.Options, &resp) @@ -9902,6 +16369,33 @@ func (r Network_Storage_Backup_Evault) GetAllowableHardware(filterHostname *stri return } +func (r Network_Storage_Backup_Evault) GetAllowableHardwareIter(filterHostname *string) (resp []datatypes.Hardware, err error) { + params := []interface{}{ + filterHostname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableHardware", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableHardware", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Subnet_IpAddress that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Backup_Evault) GetAllowableIpAddresses(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -9912,6 +16406,34 @@ func (r Network_Storage_Backup_Evault) GetAllowableIpAddresses(subnetId *int, fi return } +func (r Network_Storage_Backup_Evault) GetAllowableIpAddressesIter(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { + params := []interface{}{ + subnetId, + filterIpAddress, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableIpAddresses", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableIpAddresses", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Subnet that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Backup_Evault) GetAllowableSubnets(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { params := []interface{}{ @@ -9921,6 +16443,33 @@ func (r Network_Storage_Backup_Evault) GetAllowableSubnets(filterNetworkIdentifi return } +func (r Network_Storage_Backup_Evault) GetAllowableSubnetsIter(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { + params := []interface{}{ + filterNetworkIdentifier, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableSubnets", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableSubnets", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Virtual_Guest that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Backup_Evault) GetAllowableVirtualGuests(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -9930,12 +16479,63 @@ func (r Network_Storage_Backup_Evault) GetAllowableVirtualGuests(filterHostname return } +func (r Network_Storage_Backup_Evault) GetAllowableVirtualGuestsIter(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { + params := []interface{}{ + filterHostname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableVirtualGuests", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableVirtualGuests", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume. func (r Network_Storage_Backup_Evault) GetAllowedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedHardware", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetAllowedHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the total number of allowed hosts limit per volume. func (r Network_Storage_Backup_Evault) GetAllowedHostsLimit() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedHostsLimit", nil, &r.Options, &resp) @@ -9948,42 +16548,210 @@ func (r Network_Storage_Backup_Evault) GetAllowedIpAddresses() (resp []datatypes return } +func (r Network_Storage_Backup_Evault) GetAllowedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Backup_Evault) GetAllowedReplicationHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationHardware", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetAllowedReplicationHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Subnet_IpAddress objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Backup_Evault) GetAllowedReplicationIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetAllowedReplicationIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Backup_Evault) GetAllowedReplicationSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationSubnets", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetAllowedReplicationSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Backup_Evault) GetAllowedReplicationVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetAllowedReplicationVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume. func (r Network_Storage_Backup_Evault) GetAllowedSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedSubnets", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetAllowedSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Virtual_Guest objects which are allowed access to this storage volume. func (r Network_Storage_Backup_Evault) GetAllowedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedVirtualGuests", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetAllowedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current billing item for a Storage volume. func (r Network_Storage_Backup_Evault) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getBillingItem", nil, &r.Options, &resp) @@ -10006,6 +16774,34 @@ func (r Network_Storage_Backup_Evault) GetByUsername(username *string, typ *stri return } +func (r Network_Storage_Backup_Evault) GetByUsernameIter(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + username, + typ, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getByUsername", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getByUsername", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of space used by the volume, in bytes. func (r Network_Storage_Backup_Evault) GetBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getBytesUsed", nil, &r.Options, &resp) @@ -10018,6 +16814,30 @@ func (r Network_Storage_Backup_Evault) GetCdnUrls() (resp []datatypes.Container_ return } +func (r Network_Storage_Backup_Evault) GetCdnUrlsIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getCdnUrls", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getCdnUrls", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Backup_Evault) GetClusterResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getClusterResource", nil, &r.Options, &resp) @@ -10036,6 +16856,30 @@ func (r Network_Storage_Backup_Evault) GetCredentials() (resp []datatypes.Networ return } +func (r Network_Storage_Backup_Evault) GetCredentialsIter() (resp []datatypes.Network_Storage_Credential, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getCredentials", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Credential{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getCredentials", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Daily Schedule which is associated with this network storage volume. func (r Network_Storage_Backup_Evault) GetDailySchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getDailySchedule", nil, &r.Options, &resp) @@ -10054,6 +16898,30 @@ func (r Network_Storage_Backup_Evault) GetDependentDuplicates() (resp []datatype return } +func (r Network_Storage_Backup_Evault) GetDependentDuplicatesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getDependentDuplicates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getDependentDuplicates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is used to check, if for the given classic file block storage volume, a transaction performing dependent to independent duplicate conversion is active. If yes, then this returns the current percentage of its progress along with its start time as [SoftLayer_Container_Network_Storage_DuplicateConversionStatusInformation] object with its name, percentage and transaction start timestamp. func (r Network_Storage_Backup_Evault) GetDuplicateConversionStatus() (resp datatypes.Container_Network_Storage_DuplicateConversionStatusInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getDuplicateConversionStatus", nil, &r.Options, &resp) @@ -10066,6 +16934,30 @@ func (r Network_Storage_Backup_Evault) GetEvents() (resp []datatypes.Network_Sto return } +func (r Network_Storage_Backup_Evault) GetEventsIter() (resp []datatypes.Network_Storage_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determines whether the volume is allowed to failback func (r Network_Storage_Backup_Evault) GetFailbackNotAllowed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFailbackNotAllowed", nil, &r.Options, &resp) @@ -10083,6 +16975,30 @@ func (r Network_Storage_Backup_Evault) GetFileBlockEncryptedLocations() (resp [] return } +func (r Network_Storage_Backup_Evault) GetFileBlockEncryptedLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileBlockEncryptedLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date of a file within a Storage account. This does not download file content. func (r Network_Storage_Backup_Evault) GetFileByIdentifier(identifier *string) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -10108,6 +17024,34 @@ func (r Network_Storage_Backup_Evault) GetFileList(folder *string, path *string) return } +func (r Network_Storage_Backup_Evault) GetFileListIter(folder *string, path *string) (resp []datatypes.Container_Utility_File_Entity, err error) { + params := []interface{}{ + folder, + path, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Retrieves the NFS Network Mount Address Name for a given File Storage Volume. func (r Network_Storage_Backup_Evault) GetFileNetworkMountAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileNetworkMountAddress", nil, &r.Options, &resp) @@ -10126,6 +17070,30 @@ func (r Network_Storage_Backup_Evault) GetFilesPendingDelete() (resp []datatypes return } +func (r Network_Storage_Backup_Evault) GetFilesPendingDeleteIter() (resp []datatypes.Container_Utility_File_Entity, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFilesPendingDelete", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFilesPendingDelete", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Backup_Evault) GetFixReplicationCurrentStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFixReplicationCurrentStatus", nil, &r.Options, &resp) @@ -10138,6 +17106,30 @@ func (r Network_Storage_Backup_Evault) GetFolderList() (resp []datatypes.Contain return } +func (r Network_Storage_Backup_Evault) GetFolderListIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFolderList", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFolderList", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} // // getGraph() retrieves a Storage account's usage and returns a PNG graph image, title, and the minimum and maximum dates included in the graphed date range. Virtual Server storage accounts can also graph upload and download bandwidth usage. @@ -10173,6 +17165,36 @@ func (r Network_Storage_Backup_Evault) GetHardwareWithEvaultFirst(option *string return } +func (r Network_Storage_Backup_Evault) GetHardwareWithEvaultFirstIter(option *string, exactMatch *bool, criteria *string, mode *string) (resp []datatypes.Hardware, err error) { + params := []interface{}{ + option, + exactMatch, + criteria, + mode, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getHardwareWithEvaultFirst", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getHardwareWithEvaultFirst", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Backup_Evault) GetHasEncryptionAtRest() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getHasEncryptionAtRest", nil, &r.Options, &resp) @@ -10245,6 +17267,30 @@ func (r Network_Storage_Backup_Evault) GetIscsiLuns() (resp []datatypes.Network_ return } +func (r Network_Storage_Backup_Evault) GetIscsiLunsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiLuns", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiLuns", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes configured to be replicants of this volume. func (r Network_Storage_Backup_Evault) GetIscsiReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiReplicatingVolume", nil, &r.Options, &resp) @@ -10257,6 +17303,30 @@ func (r Network_Storage_Backup_Evault) GetIscsiTargetIpAddresses() (resp []strin return } +func (r Network_Storage_Backup_Evault) GetIscsiTargetIpAddressesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiTargetIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiTargetIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The ID of the LUN volume. func (r Network_Storage_Backup_Evault) GetLunId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getLunId", nil, &r.Options, &resp) @@ -10269,6 +17339,30 @@ func (r Network_Storage_Backup_Evault) GetManualSnapshots() (resp []datatypes.Ne return } +func (r Network_Storage_Backup_Evault) GetManualSnapshotsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getManualSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getManualSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Backup_Evault) GetMaximumExpansionSize() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getMaximumExpansionSize", nil, &r.Options, &resp) @@ -10323,6 +17417,30 @@ func (r Network_Storage_Backup_Evault) GetNotificationSubscribers() (resp []data return } +func (r Network_Storage_Backup_Evault) GetNotificationSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getNotificationSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getNotificationSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Network_Storage_Backup_Evault object whose ID corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Storage_Backup_Evault service. func (r Network_Storage_Backup_Evault) GetObject() (resp datatypes.Network_Storage_Backup_Evault, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObject", nil, &r.Options, &resp) @@ -10335,6 +17453,30 @@ func (r Network_Storage_Backup_Evault) GetObjectStorageConnectionInformation() ( return } +func (r Network_Storage_Backup_Evault) GetObjectStorageConnectionInformationIter() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObjectStorageConnectionInformation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObjectStorageConnectionInformation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve network storage accounts by SoftLayer_Network_Storage_Credential object. Use this method if you wish to retrieve a storage record by a credential rather than by id. func (r Network_Storage_Backup_Evault) GetObjectsByCredential(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -10344,6 +17486,33 @@ func (r Network_Storage_Backup_Evault) GetObjectsByCredential(credentialObject * return } +func (r Network_Storage_Backup_Evault) GetObjectsByCredentialIter(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + credentialObject, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObjectsByCredential", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObjectsByCredential", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The name of the snapshot that this volume was duplicated from. func (r Network_Storage_Backup_Evault) GetOriginalSnapshotName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getOriginalSnapshotName", nil, &r.Options, &resp) @@ -10386,6 +17555,30 @@ func (r Network_Storage_Backup_Evault) GetParentPartnerships() (resp []datatypes return } +func (r Network_Storage_Backup_Evault) GetParentPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getParentPartnerships", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Partnership{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getParentPartnerships", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The parent volume of a volume in a complex storage relationship. func (r Network_Storage_Backup_Evault) GetParentVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getParentVolume", nil, &r.Options, &resp) @@ -10398,18 +17591,90 @@ func (r Network_Storage_Backup_Evault) GetPartnerships() (resp []datatypes.Netwo return } +func (r Network_Storage_Backup_Evault) GetPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPartnerships", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Partnership{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPartnerships", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All permissions group(s) this volume is in. func (r Network_Storage_Backup_Evault) GetPermissionsGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPermissionsGroups", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetPermissionsGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPermissionsGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPermissionsGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The properties used to provide additional details about a network storage volume. func (r Network_Storage_Backup_Evault) GetProperties() (resp []datatypes.Network_Storage_Property, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getProperties", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetPropertiesIter() (resp []datatypes.Network_Storage_Property, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getProperties", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Property{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getProperties", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The number of IOPs provisioned for this volume. func (r Network_Storage_Backup_Evault) GetProvisionedIops() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getProvisionedIops", nil, &r.Options, &resp) @@ -10443,6 +17708,30 @@ func (r Network_Storage_Backup_Evault) GetReplicatingLuns() (resp []datatypes.Ne return } +func (r Network_Storage_Backup_Evault) GetReplicatingLunsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicatingLuns", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicatingLuns", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volume being replicated by a volume. func (r Network_Storage_Backup_Evault) GetReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicatingVolume", nil, &r.Options, &resp) @@ -10455,12 +17744,60 @@ func (r Network_Storage_Backup_Evault) GetReplicationEvents() (resp []datatypes. return } +func (r Network_Storage_Backup_Evault) GetReplicationEventsIter() (resp []datatypes.Network_Storage_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes configured to be replicants of a volume. func (r Network_Storage_Backup_Evault) GetReplicationPartners() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationPartners", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetReplicationPartnersIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationPartners", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationPartners", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Replication Schedule associated with a network storage volume. func (r Network_Storage_Backup_Evault) GetReplicationSchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationSchedule", nil, &r.Options, &resp) @@ -10485,6 +17822,30 @@ func (r Network_Storage_Backup_Evault) GetSchedules() (resp []datatypes.Network_ return } +func (r Network_Storage_Backup_Evault) GetSchedulesIter() (resp []datatypes.Network_Storage_Schedule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSchedules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Schedule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSchedules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network resource a Storage service is connected to. func (r Network_Storage_Backup_Evault) GetServiceResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getServiceResource", nil, &r.Options, &resp) @@ -10545,12 +17906,60 @@ func (r Network_Storage_Backup_Evault) GetSnapshots() (resp []datatypes.Network_ return } +func (r Network_Storage_Backup_Evault) GetSnapshotsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of snapshots for this SoftLayer_Network_Storage volume. This method works with the result limits and offset to support pagination. func (r Network_Storage_Backup_Evault) GetSnapshotsForVolume() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshotsForVolume", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetSnapshotsForVolumeIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshotsForVolume", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshotsForVolume", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Backup_Evault) GetStaasVersion() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStaasVersion", nil, &r.Options, &resp) @@ -10563,12 +17972,60 @@ func (r Network_Storage_Backup_Evault) GetStorageGroups() (resp []datatypes.Netw return } +func (r Network_Storage_Backup_Evault) GetStorageGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Backup_Evault) GetStorageGroupsNetworkConnectionDetails() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) return } +func (r Network_Storage_Backup_Evault) GetStorageGroupsNetworkConnectionDetailsIter() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_NetworkConnectionInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroupsNetworkConnectionDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Backup_Evault) GetStorageTierLevel() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageTierLevel", nil, &r.Options, &resp) @@ -10587,6 +18044,30 @@ func (r Network_Storage_Backup_Evault) GetTargetIpAddresses() (resp []string, er return } +func (r Network_Storage_Backup_Evault) GetTargetIpAddressesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getTargetIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getTargetIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of space used by the volume. func (r Network_Storage_Backup_Evault) GetTotalBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getTotalBytesUsed", nil, &r.Options, &resp) @@ -10611,6 +18092,30 @@ func (r Network_Storage_Backup_Evault) GetValidReplicationTargetDatacenterLocati return } +func (r Network_Storage_Backup_Evault) GetValidReplicationTargetDatacenterLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getValidReplicationTargetDatacenterLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getValidReplicationTargetDatacenterLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type of network storage service. func (r Network_Storage_Backup_Evault) GetVendorName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVendorName", nil, &r.Options, &resp) @@ -10629,6 +18134,30 @@ func (r Network_Storage_Backup_Evault) GetVolumeCountLimits() (resp []datatypes. return } +func (r Network_Storage_Backup_Evault) GetVolumeCountLimitsIter() (resp []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeCountLimits", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeCountLimits", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns the parameters for cloning a volume func (r Network_Storage_Backup_Evault) GetVolumeDuplicateParameters() (resp datatypes.Container_Network_Storage_VolumeDuplicateParameters, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeDuplicateParameters", nil, &r.Options, &resp) @@ -10641,6 +18170,30 @@ func (r Network_Storage_Backup_Evault) GetVolumeHistory() (resp []datatypes.Netw return } +func (r Network_Storage_Backup_Evault) GetVolumeHistoryIter() (resp []datatypes.Network_Storage_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current status of a network storage volume. func (r Network_Storage_Backup_Evault) GetVolumeStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeStatus", nil, &r.Options, &resp) @@ -10784,6 +18337,33 @@ func (r Network_Storage_Backup_Evault) RemoveAccessFromHostList(hostObjectTempla return } +func (r Network_Storage_Backup_Evault) RemoveAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "removeAccessFromHostList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "removeAccessFromHostList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is used to modify the access control list for this Storage volume. The SoftLayer_Network_Subnet_IpAddress objects which have been allowed access to this storage will be listed in the allowedIpAddresses property of this storage volume. func (r Network_Storage_Backup_Evault) RemoveAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -10986,6 +18566,33 @@ func (r Network_Storage_Backup_Evault) ValidateHostsAccess(hostObjectTemplates [ return } +func (r Network_Storage_Backup_Evault) ValidateHostsAccessIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Container_Network_Storage_HostsGatewayInformation, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "validateHostsAccess", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_HostsGatewayInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "validateHostsAccess", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Network_Storage_DedicatedCluster struct { Session session.SLSession @@ -11038,6 +18645,30 @@ func (r Network_Storage_DedicatedCluster) GetDedicatedClusterList() (resp []int, return } +func (r Network_Storage_DedicatedCluster) GetDedicatedClusterListIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_DedicatedCluster", "getDedicatedClusterList", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_DedicatedCluster", "getDedicatedClusterList", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_DedicatedCluster) GetObject() (resp datatypes.Network_Storage_DedicatedCluster, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_DedicatedCluster", "getObject", nil, &r.Options, &resp) @@ -11144,18 +18775,90 @@ func (r Network_Storage_Group) GetAllObjects() (resp []datatypes.Network_Storage return } +func (r Network_Storage_Group) GetAllObjectsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The allowed hosts list for this group. func (r Network_Storage_Group) GetAllowedHosts() (resp []datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllowedHosts", nil, &r.Options, &resp) return } +func (r Network_Storage_Group) GetAllowedHostsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllowedHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllowedHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes this group is attached to. func (r Network_Storage_Group) GetAttachedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAttachedVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Group) GetAttachedVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAttachedVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAttachedVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type which defines this group. func (r Network_Storage_Group) GetGroupType() (resp datatypes.Network_Storage_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getGroupType", nil, &r.Options, &resp) @@ -11298,18 +19001,90 @@ func (r Network_Storage_Group_Iscsi) GetAllObjects() (resp []datatypes.Network_S return } +func (r Network_Storage_Group_Iscsi) GetAllObjectsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The allowed hosts list for this group. func (r Network_Storage_Group_Iscsi) GetAllowedHosts() (resp []datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllowedHosts", nil, &r.Options, &resp) return } +func (r Network_Storage_Group_Iscsi) GetAllowedHostsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllowedHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllowedHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes this group is attached to. func (r Network_Storage_Group_Iscsi) GetAttachedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAttachedVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Group_Iscsi) GetAttachedVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAttachedVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAttachedVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type which defines this group. func (r Network_Storage_Group_Iscsi) GetGroupType() (resp datatypes.Network_Storage_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getGroupType", nil, &r.Options, &resp) @@ -11452,18 +19227,90 @@ func (r Network_Storage_Group_Nfs) GetAllObjects() (resp []datatypes.Network_Sto return } +func (r Network_Storage_Group_Nfs) GetAllObjectsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The allowed hosts list for this group. func (r Network_Storage_Group_Nfs) GetAllowedHosts() (resp []datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllowedHosts", nil, &r.Options, &resp) return } +func (r Network_Storage_Group_Nfs) GetAllowedHostsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllowedHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllowedHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes this group is attached to. func (r Network_Storage_Group_Nfs) GetAttachedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAttachedVolumes", nil, &r.Options, &resp) return } +func (r Network_Storage_Group_Nfs) GetAttachedVolumesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAttachedVolumes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAttachedVolumes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type which defines this group. func (r Network_Storage_Group_Nfs) GetGroupType() (resp datatypes.Network_Storage_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getGroupType", nil, &r.Options, &resp) @@ -11558,6 +19405,30 @@ func (r Network_Storage_Group_Type) GetAllObjects() (resp []datatypes.Network_St return } +func (r Network_Storage_Group_Type) GetAllObjectsIter() (resp []datatypes.Network_Storage_Group_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Group_Type) GetObject() (resp datatypes.Network_Storage_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Type", "getObject", nil, &r.Options, &resp) @@ -11610,6 +19481,30 @@ func (r Network_Storage_Hub_Cleversafe_Account) CredentialCreate() (resp []datat return } +func (r Network_Storage_Hub_Cleversafe_Account) CredentialCreateIter() (resp []datatypes.Network_Storage_Credential, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "credentialCreate", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Credential{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "credentialCreate", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Delete a credential func (r Network_Storage_Hub_Cleversafe_Account) CredentialDelete(credential *datatypes.Network_Storage_Credential) (resp bool, err error) { params := []interface{}{ @@ -11631,6 +19526,30 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetAllObjects() (resp []datatype return } +func (r Network_Storage_Hub_Cleversafe_Account) GetAllObjectsIter() (resp []datatypes.Network_Storage_Hub_Cleversafe_Account, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Hub_Cleversafe_Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An associated parent billing item which is active. Includes billing items which are scheduled to be cancelled in the future. func (r Network_Storage_Hub_Cleversafe_Account) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getBillingItem", nil, &r.Options, &resp) @@ -11643,6 +19562,30 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetBuckets() (resp []datatypes.C return } +func (r Network_Storage_Hub_Cleversafe_Account) GetBucketsIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Bucket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getBuckets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Bucket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getBuckets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An associated parent billing item which has been cancelled. func (r Network_Storage_Hub_Cleversafe_Account) GetCancelledBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCancelledBillingItem", nil, &r.Options, &resp) @@ -11680,6 +19623,37 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetCloudObjectStorageMetrics(sta return } +func (r Network_Storage_Hub_Cleversafe_Account) GetCloudObjectStorageMetricsIter(start *string, end *string, storageLocation *string, storageClass *string, metrics *string) (resp []string, err error) { + params := []interface{}{ + start, + end, + storageLocation, + storageClass, + metrics, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCloudObjectStorageMetrics", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCloudObjectStorageMetrics", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns credential limits for this IBM Cloud Object Storage account. func (r Network_Storage_Hub_Cleversafe_Account) GetCredentialLimit() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCredentialLimit", nil, &r.Options, &resp) @@ -11692,22 +19666,101 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetCredentials() (resp []datatyp return } +func (r Network_Storage_Hub_Cleversafe_Account) GetCredentialsIter() (resp []datatypes.Network_Storage_Credential, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCredentials", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Credential{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCredentials", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Returns a collection of endpoint URLs available to this IBM Cloud Object Storage account. +func (r Network_Storage_Hub_Cleversafe_Account) GetEndpoints(accountId *int) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { + params := []interface{}{ + accountId, + } + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpoints", params, &r.Options, &resp) + return +} + +func (r Network_Storage_Hub_Cleversafe_Account) GetEndpointsIter(accountId *int) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { + params := []interface{}{ + accountId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpoints", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpoints", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns a collection of endpoint URLs available to this IBM Cloud Object Storage account. -func (r Network_Storage_Hub_Cleversafe_Account) GetEndpoints(accountId *int) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { +func (r Network_Storage_Hub_Cleversafe_Account) GetEndpointsWithRefetch(accountId *int, refetch *bool) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { params := []interface{}{ accountId, + refetch, } - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpoints", params, &r.Options, &resp) + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpointsWithRefetch", params, &r.Options, &resp) return } -// Returns a collection of endpoint URLs available to this IBM Cloud Object Storage account. -func (r Network_Storage_Hub_Cleversafe_Account) GetEndpointsWithRefetch(accountId *int, refetch *bool) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { +func (r Network_Storage_Hub_Cleversafe_Account) GetEndpointsWithRefetchIter(accountId *int, refetch *bool) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { params := []interface{}{ accountId, refetch, } + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpointsWithRefetch", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpointsWithRefetch", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -11781,6 +19834,36 @@ func (r Network_Storage_Hub_Swift_Metrics) GetMetricData(startDateTime *datatype return } +func (r Network_Storage_Hub_Swift_Metrics) GetMetricDataIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, metricKey *string, location *string) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + metricKey, + location, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Metrics", "getMetricData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Metrics", "getMetricData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Hub_Swift_Metrics) GetSummaryData(startDateTime *datatypes.Time, endDateTime *datatypes.Time, validTypes []datatypes.Container_Metric_Data_Type, summaryPeriod *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -11793,6 +19876,36 @@ func (r Network_Storage_Hub_Swift_Metrics) GetSummaryData(startDateTime *datatyp return } +func (r Network_Storage_Hub_Swift_Metrics) GetSummaryDataIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, validTypes []datatypes.Container_Metric_Data_Type, summaryPeriod *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + validTypes, + summaryPeriod, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Metrics", "getSummaryData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Metrics", "getSummaryData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Network_Storage_Hub_Swift_Share struct { Session session.SLSession @@ -11839,6 +19952,30 @@ func (r Network_Storage_Hub_Swift_Share) GetContainerList() (resp []datatypes.Co return } +func (r Network_Storage_Hub_Swift_Share) GetContainerListIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Share", "getContainerList", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Share", "getContainerList", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns a file object given the file's full name. func (r Network_Storage_Hub_Swift_Share) GetFile(fileName *string, container *string) (resp datatypes.Container_Network_Storage_Hub_ObjectStorage_File, err error) { params := []interface{}{ @@ -11859,6 +19996,34 @@ func (r Network_Storage_Hub_Swift_Share) GetFileList(container *string, path *st return } +func (r Network_Storage_Hub_Swift_Share) GetFileListIter(container *string, path *string) (resp []datatypes.Container_Utility_File_Entity, err error) { + params := []interface{}{ + container, + path, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Share", "getFileList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Share", "getFileList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The iscsi data type provides access to additional information about an iscsi volume such as the snapshot capacity limit and replication partners. type Network_Storage_Iscsi struct { Session session.SLSession @@ -11936,6 +20101,33 @@ func (r Network_Storage_Iscsi) AllowAccessFromHostList(hostObjectTemplates []dat return } +func (r Network_Storage_Iscsi) AllowAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "allowAccessFromHostList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "allowAccessFromHostList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Iscsi) AllowAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -12294,12 +20486,60 @@ func (r Network_Storage_Iscsi) GetActiveTransactions() (resp []datatypes.Provisi return } +func (r Network_Storage_Iscsi) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getActiveTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getActiveTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files in a Storage account's root directory. This does not download file content. func (r Network_Storage_Iscsi) GetAllFiles() (resp []datatypes.Container_Utility_File_Entity, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFiles", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetAllFilesIter() (resp []datatypes.Container_Utility_File_Entity, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files matching the filter's criteria in a Storage account's root directory. This does not download file content. func (r Network_Storage_Iscsi) GetAllFilesByFilter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -12309,6 +20549,33 @@ func (r Network_Storage_Iscsi) GetAllFilesByFilter(filter *datatypes.Container_U return } +func (r Network_Storage_Iscsi) GetAllFilesByFilterIter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { + params := []interface{}{ + filter, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFilesByFilter", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFilesByFilter", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Iscsi) GetAllowDisasterRecoveryFailback() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowDisasterRecoveryFailback", nil, &r.Options, &resp) @@ -12330,6 +20597,33 @@ func (r Network_Storage_Iscsi) GetAllowableHardware(filterHostname *string) (res return } +func (r Network_Storage_Iscsi) GetAllowableHardwareIter(filterHostname *string) (resp []datatypes.Hardware, err error) { + params := []interface{}{ + filterHostname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableHardware", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableHardware", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Subnet_IpAddress that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Iscsi) GetAllowableIpAddresses(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -12340,6 +20634,34 @@ func (r Network_Storage_Iscsi) GetAllowableIpAddresses(subnetId *int, filterIpAd return } +func (r Network_Storage_Iscsi) GetAllowableIpAddressesIter(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { + params := []interface{}{ + subnetId, + filterIpAddress, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableIpAddresses", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableIpAddresses", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Subnet that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Iscsi) GetAllowableSubnets(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { params := []interface{}{ @@ -12349,6 +20671,33 @@ func (r Network_Storage_Iscsi) GetAllowableSubnets(filterNetworkIdentifier *stri return } +func (r Network_Storage_Iscsi) GetAllowableSubnetsIter(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { + params := []interface{}{ + filterNetworkIdentifier, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableSubnets", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableSubnets", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Virtual_Guest that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Iscsi) GetAllowableVirtualGuests(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -12358,12 +20707,63 @@ func (r Network_Storage_Iscsi) GetAllowableVirtualGuests(filterHostname *string) return } +func (r Network_Storage_Iscsi) GetAllowableVirtualGuestsIter(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { + params := []interface{}{ + filterHostname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableVirtualGuests", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableVirtualGuests", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume. func (r Network_Storage_Iscsi) GetAllowedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedHardware", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetAllowedHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the total number of allowed hosts limit per volume. func (r Network_Storage_Iscsi) GetAllowedHostsLimit() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedHostsLimit", nil, &r.Options, &resp) @@ -12376,42 +20776,210 @@ func (r Network_Storage_Iscsi) GetAllowedIpAddresses() (resp []datatypes.Network return } +func (r Network_Storage_Iscsi) GetAllowedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Iscsi) GetAllowedReplicationHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationHardware", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetAllowedReplicationHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Subnet_IpAddress objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Iscsi) GetAllowedReplicationIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetAllowedReplicationIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Iscsi) GetAllowedReplicationSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationSubnets", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetAllowedReplicationSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Iscsi) GetAllowedReplicationVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetAllowedReplicationVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume. func (r Network_Storage_Iscsi) GetAllowedSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedSubnets", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetAllowedSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Virtual_Guest objects which are allowed access to this storage volume. func (r Network_Storage_Iscsi) GetAllowedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedVirtualGuests", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetAllowedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current billing item for a Storage volume. func (r Network_Storage_Iscsi) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getBillingItem", nil, &r.Options, &resp) @@ -12434,6 +21002,34 @@ func (r Network_Storage_Iscsi) GetByUsername(username *string, typ *string) (res return } +func (r Network_Storage_Iscsi) GetByUsernameIter(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + username, + typ, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getByUsername", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getByUsername", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of space used by the volume, in bytes. func (r Network_Storage_Iscsi) GetBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getBytesUsed", nil, &r.Options, &resp) @@ -12446,6 +21042,30 @@ func (r Network_Storage_Iscsi) GetCdnUrls() (resp []datatypes.Container_Network_ return } +func (r Network_Storage_Iscsi) GetCdnUrlsIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getCdnUrls", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getCdnUrls", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Iscsi) GetClusterResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getClusterResource", nil, &r.Options, &resp) @@ -12464,6 +21084,30 @@ func (r Network_Storage_Iscsi) GetCredentials() (resp []datatypes.Network_Storag return } +func (r Network_Storage_Iscsi) GetCredentialsIter() (resp []datatypes.Network_Storage_Credential, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getCredentials", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Credential{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getCredentials", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Daily Schedule which is associated with this network storage volume. func (r Network_Storage_Iscsi) GetDailySchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getDailySchedule", nil, &r.Options, &resp) @@ -12482,6 +21126,30 @@ func (r Network_Storage_Iscsi) GetDependentDuplicates() (resp []datatypes.Networ return } +func (r Network_Storage_Iscsi) GetDependentDuplicatesIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getDependentDuplicates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getDependentDuplicates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is used to check, if for the given classic file block storage volume, a transaction performing dependent to independent duplicate conversion is active. If yes, then this returns the current percentage of its progress along with its start time as [SoftLayer_Container_Network_Storage_DuplicateConversionStatusInformation] object with its name, percentage and transaction start timestamp. func (r Network_Storage_Iscsi) GetDuplicateConversionStatus() (resp datatypes.Container_Network_Storage_DuplicateConversionStatusInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getDuplicateConversionStatus", nil, &r.Options, &resp) @@ -12494,6 +21162,30 @@ func (r Network_Storage_Iscsi) GetEvents() (resp []datatypes.Network_Storage_Eve return } +func (r Network_Storage_Iscsi) GetEventsIter() (resp []datatypes.Network_Storage_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Determines whether the volume is allowed to failback func (r Network_Storage_Iscsi) GetFailbackNotAllowed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFailbackNotAllowed", nil, &r.Options, &resp) @@ -12511,6 +21203,30 @@ func (r Network_Storage_Iscsi) GetFileBlockEncryptedLocations() (resp []datatype return } +func (r Network_Storage_Iscsi) GetFileBlockEncryptedLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileBlockEncryptedLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date of a file within a Storage account. This does not download file content. func (r Network_Storage_Iscsi) GetFileByIdentifier(identifier *string) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -12536,6 +21252,34 @@ func (r Network_Storage_Iscsi) GetFileList(folder *string, path *string) (resp [ return } +func (r Network_Storage_Iscsi) GetFileListIter(folder *string, path *string) (resp []datatypes.Container_Utility_File_Entity, err error) { + params := []interface{}{ + folder, + path, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Retrieves the NFS Network Mount Address Name for a given File Storage Volume. func (r Network_Storage_Iscsi) GetFileNetworkMountAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileNetworkMountAddress", nil, &r.Options, &resp) @@ -12554,6 +21298,30 @@ func (r Network_Storage_Iscsi) GetFilesPendingDelete() (resp []datatypes.Contain return } +func (r Network_Storage_Iscsi) GetFilesPendingDeleteIter() (resp []datatypes.Container_Utility_File_Entity, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFilesPendingDelete", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Utility_File_Entity{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFilesPendingDelete", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Iscsi) GetFixReplicationCurrentStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFixReplicationCurrentStatus", nil, &r.Options, &resp) @@ -12566,6 +21334,30 @@ func (r Network_Storage_Iscsi) GetFolderList() (resp []datatypes.Container_Netwo return } +func (r Network_Storage_Iscsi) GetFolderListIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFolderList", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFolderList", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // {{CloudLayerOnlyMethod}} // // getGraph() retrieves a Storage account's usage and returns a PNG graph image, title, and the minimum and maximum dates included in the graphed date range. Virtual Server storage accounts can also graph upload and download bandwidth usage. @@ -12657,6 +21449,30 @@ func (r Network_Storage_Iscsi) GetIscsiLuns() (resp []datatypes.Network_Storage, return } +func (r Network_Storage_Iscsi) GetIscsiLunsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiLuns", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiLuns", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes configured to be replicants of this volume. func (r Network_Storage_Iscsi) GetIscsiReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiReplicatingVolume", nil, &r.Options, &resp) @@ -12669,6 +21485,30 @@ func (r Network_Storage_Iscsi) GetIscsiTargetIpAddresses() (resp []string, err e return } +func (r Network_Storage_Iscsi) GetIscsiTargetIpAddressesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiTargetIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiTargetIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The ID of the LUN volume. func (r Network_Storage_Iscsi) GetLunId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getLunId", nil, &r.Options, &resp) @@ -12681,6 +21521,30 @@ func (r Network_Storage_Iscsi) GetManualSnapshots() (resp []datatypes.Network_St return } +func (r Network_Storage_Iscsi) GetManualSnapshotsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getManualSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getManualSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Iscsi) GetMaximumExpansionSize() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getMaximumExpansionSize", nil, &r.Options, &resp) @@ -12735,15 +21599,63 @@ func (r Network_Storage_Iscsi) GetNotificationSubscribers() (resp []datatypes.No return } +func (r Network_Storage_Iscsi) GetNotificationSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getNotificationSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getNotificationSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Iscsi) GetObject() (resp datatypes.Network_Storage_Iscsi, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObject", nil, &r.Options, &resp) return } -// no documentation yet -func (r Network_Storage_Iscsi) GetObjectStorageConnectionInformation() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { +// no documentation yet +func (r Network_Storage_Iscsi) GetObjectStorageConnectionInformation() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectStorageConnectionInformation", nil, &r.Options, &resp) + return +} + +func (r Network_Storage_Iscsi) GetObjectStorageConnectionInformationIter() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectStorageConnectionInformation", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectStorageConnectionInformation", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -12756,6 +21668,33 @@ func (r Network_Storage_Iscsi) GetObjectsByCredential(credentialObject *datatype return } +func (r Network_Storage_Iscsi) GetObjectsByCredentialIter(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + credentialObject, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectsByCredential", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectsByCredential", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The name of the snapshot that this volume was duplicated from. func (r Network_Storage_Iscsi) GetOriginalSnapshotName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getOriginalSnapshotName", nil, &r.Options, &resp) @@ -12798,6 +21737,30 @@ func (r Network_Storage_Iscsi) GetParentPartnerships() (resp []datatypes.Network return } +func (r Network_Storage_Iscsi) GetParentPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getParentPartnerships", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Partnership{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getParentPartnerships", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The parent volume of a volume in a complex storage relationship. func (r Network_Storage_Iscsi) GetParentVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getParentVolume", nil, &r.Options, &resp) @@ -12810,18 +21773,90 @@ func (r Network_Storage_Iscsi) GetPartnerships() (resp []datatypes.Network_Stora return } +func (r Network_Storage_Iscsi) GetPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPartnerships", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Partnership{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPartnerships", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All permissions group(s) this volume is in. func (r Network_Storage_Iscsi) GetPermissionsGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPermissionsGroups", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetPermissionsGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPermissionsGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPermissionsGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The properties used to provide additional details about a network storage volume. func (r Network_Storage_Iscsi) GetProperties() (resp []datatypes.Network_Storage_Property, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getProperties", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetPropertiesIter() (resp []datatypes.Network_Storage_Property, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getProperties", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Property{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getProperties", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The number of IOPs provisioned for this volume. func (r Network_Storage_Iscsi) GetProvisionedIops() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getProvisionedIops", nil, &r.Options, &resp) @@ -12855,6 +21890,30 @@ func (r Network_Storage_Iscsi) GetReplicatingLuns() (resp []datatypes.Network_St return } +func (r Network_Storage_Iscsi) GetReplicatingLunsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicatingLuns", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicatingLuns", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volume being replicated by a volume. func (r Network_Storage_Iscsi) GetReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicatingVolume", nil, &r.Options, &resp) @@ -12867,12 +21926,60 @@ func (r Network_Storage_Iscsi) GetReplicationEvents() (resp []datatypes.Network_ return } +func (r Network_Storage_Iscsi) GetReplicationEventsIter() (resp []datatypes.Network_Storage_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage volumes configured to be replicants of a volume. func (r Network_Storage_Iscsi) GetReplicationPartners() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationPartners", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetReplicationPartnersIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationPartners", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationPartners", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Replication Schedule associated with a network storage volume. func (r Network_Storage_Iscsi) GetReplicationSchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationSchedule", nil, &r.Options, &resp) @@ -12897,6 +22004,30 @@ func (r Network_Storage_Iscsi) GetSchedules() (resp []datatypes.Network_Storage_ return } +func (r Network_Storage_Iscsi) GetSchedulesIter() (resp []datatypes.Network_Storage_Schedule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSchedules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Schedule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSchedules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network resource a Storage service is connected to. func (r Network_Storage_Iscsi) GetServiceResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getServiceResource", nil, &r.Options, &resp) @@ -12957,12 +22088,60 @@ func (r Network_Storage_Iscsi) GetSnapshots() (resp []datatypes.Network_Storage, return } +func (r Network_Storage_Iscsi) GetSnapshotsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of snapshots for this SoftLayer_Network_Storage volume. This method works with the result limits and offset to support pagination. func (r Network_Storage_Iscsi) GetSnapshotsForVolume() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshotsForVolume", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetSnapshotsForVolumeIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshotsForVolume", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshotsForVolume", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Iscsi) GetStaasVersion() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStaasVersion", nil, &r.Options, &resp) @@ -12975,12 +22154,60 @@ func (r Network_Storage_Iscsi) GetStorageGroups() (resp []datatypes.Network_Stor return } +func (r Network_Storage_Iscsi) GetStorageGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Iscsi) GetStorageGroupsNetworkConnectionDetails() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) return } +func (r Network_Storage_Iscsi) GetStorageGroupsNetworkConnectionDetailsIter() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_NetworkConnectionInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroupsNetworkConnectionDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Storage_Iscsi) GetStorageTierLevel() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageTierLevel", nil, &r.Options, &resp) @@ -12999,6 +22226,30 @@ func (r Network_Storage_Iscsi) GetTargetIpAddresses() (resp []string, err error) return } +func (r Network_Storage_Iscsi) GetTargetIpAddressesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getTargetIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getTargetIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The amount of space used by the volume. func (r Network_Storage_Iscsi) GetTotalBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getTotalBytesUsed", nil, &r.Options, &resp) @@ -13023,6 +22274,30 @@ func (r Network_Storage_Iscsi) GetValidReplicationTargetDatacenterLocations() (r return } +func (r Network_Storage_Iscsi) GetValidReplicationTargetDatacenterLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getValidReplicationTargetDatacenterLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getValidReplicationTargetDatacenterLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type of network storage service. func (r Network_Storage_Iscsi) GetVendorName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVendorName", nil, &r.Options, &resp) @@ -13041,6 +22316,30 @@ func (r Network_Storage_Iscsi) GetVolumeCountLimits() (resp []datatypes.Containe return } +func (r Network_Storage_Iscsi) GetVolumeCountLimitsIter() (resp []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeCountLimits", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeCountLimits", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns the parameters for cloning a volume func (r Network_Storage_Iscsi) GetVolumeDuplicateParameters() (resp datatypes.Container_Network_Storage_VolumeDuplicateParameters, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeDuplicateParameters", nil, &r.Options, &resp) @@ -13053,6 +22352,30 @@ func (r Network_Storage_Iscsi) GetVolumeHistory() (resp []datatypes.Network_Stor return } +func (r Network_Storage_Iscsi) GetVolumeHistoryIter() (resp []datatypes.Network_Storage_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current status of a network storage volume. func (r Network_Storage_Iscsi) GetVolumeStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeStatus", nil, &r.Options, &resp) @@ -13175,6 +22498,33 @@ func (r Network_Storage_Iscsi) RemoveAccessFromHostList(hostObjectTemplates []da return } +func (r Network_Storage_Iscsi) RemoveAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "removeAccessFromHostList", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Allowed_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "removeAccessFromHostList", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Iscsi) RemoveAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -13377,6 +22727,33 @@ func (r Network_Storage_Iscsi) ValidateHostsAccess(hostObjectTemplates []datatyp return } +func (r Network_Storage_Iscsi) ValidateHostsAccessIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Container_Network_Storage_HostsGatewayInformation, err error) { + params := []interface{}{ + hostObjectTemplates, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "validateHostsAccess", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Network_Storage_HostsGatewayInformation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "validateHostsAccess", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Network_Storage_Iscsi_OS_Type struct { Session session.SLSession @@ -13423,6 +22800,30 @@ func (r Network_Storage_Iscsi_OS_Type) GetAllObjects() (resp []datatypes.Network return } +func (r Network_Storage_Iscsi_OS_Type) GetAllObjectsIter() (resp []datatypes.Network_Storage_Iscsi_OS_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi_OS_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Iscsi_OS_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi_OS_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Iscsi_OS_Type) GetObject() (resp datatypes.Network_Storage_Iscsi_OS_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi_OS_Type", "getObject", nil, &r.Options, &resp) @@ -13475,6 +22876,30 @@ func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetAllObject return } +func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetAllObjectsIter() (resp []datatypes.Network_Storage_MassDataMigration_CrossRegion_Country_Xref, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_MassDataMigration_CrossRegion_Country_Xref{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve SoftLayer_Locale_Country Id. func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetCountry() (resp datatypes.Locale_Country, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getCountry", nil, &r.Options, &resp) @@ -13502,6 +22927,33 @@ func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetValidCoun return } +func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetValidCountriesForRegionIter(locationGroupName *string) (resp []datatypes.Network_Storage_MassDataMigration_CrossRegion_Country_Xref, err error) { + params := []interface{}{ + locationGroupName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getValidCountriesForRegion", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_MassDataMigration_CrossRegion_Country_Xref{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getValidCountriesForRegion", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Network_Storage_MassDataMigration_Request data type contains information on a single Mass Data Migration request. Creation of these requests is limited to SoftLayer customers through the SoftLayer Customer Portal. type Network_Storage_MassDataMigration_Request struct { Session session.SLSession @@ -13554,6 +23006,30 @@ func (r Network_Storage_MassDataMigration_Request) GetActiveTickets() (resp []da return } +func (r Network_Storage_MassDataMigration_Request) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getActiveTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getActiveTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The customer address where the device is shipped to. func (r Network_Storage_MassDataMigration_Request) GetAddress() (resp datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAddress", nil, &r.Options, &resp) @@ -13566,12 +23042,60 @@ func (r Network_Storage_MassDataMigration_Request) GetAllObjects() (resp []datat return } +func (r Network_Storage_MassDataMigration_Request) GetAllObjectsIter() (resp []datatypes.Network_Storage_MassDataMigration_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_MassDataMigration_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves a list of all the possible statuses to which a request may be set. func (r Network_Storage_MassDataMigration_Request) GetAllRequestStatuses() (resp []datatypes.Network_Storage_MassDataMigration_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllRequestStatuses", nil, &r.Options, &resp) return } +func (r Network_Storage_MassDataMigration_Request) GetAllRequestStatusesIter() (resp []datatypes.Network_Storage_MassDataMigration_Request_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllRequestStatuses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_MassDataMigration_Request_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllRequestStatuses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An associated parent billing item which is active. Includes billing items which are scheduled to be cancelled in the future. func (r Network_Storage_MassDataMigration_Request) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getBillingItem", nil, &r.Options, &resp) @@ -13608,6 +23132,30 @@ func (r Network_Storage_MassDataMigration_Request) GetKeyContacts() (resp []data return } +func (r Network_Storage_MassDataMigration_Request) GetKeyContactsIter() (resp []datatypes.Network_Storage_MassDataMigration_Request_KeyContact, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getKeyContacts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_MassDataMigration_Request_KeyContact{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getKeyContacts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The employee who last modified the request. func (r Network_Storage_MassDataMigration_Request) GetModifyEmployee() (resp datatypes.User_Employee, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getModifyEmployee", nil, &r.Options, &resp) @@ -13632,12 +23180,60 @@ func (r Network_Storage_MassDataMigration_Request) GetPendingRequests() (resp [] return } +func (r Network_Storage_MassDataMigration_Request) GetPendingRequestsIter() (resp []datatypes.Network_Storage_MassDataMigration_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getPendingRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_MassDataMigration_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getPendingRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The shipments of the request. func (r Network_Storage_MassDataMigration_Request) GetShipments() (resp []datatypes.Account_Shipment, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getShipments", nil, &r.Options, &resp) return } +func (r Network_Storage_MassDataMigration_Request) GetShipmentsIter() (resp []datatypes.Account_Shipment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getShipments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Shipment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getShipments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of the request. func (r Network_Storage_MassDataMigration_Request) GetStatus() (resp datatypes.Network_Storage_MassDataMigration_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getStatus", nil, &r.Options, &resp) @@ -13656,6 +23252,30 @@ func (r Network_Storage_MassDataMigration_Request) GetTickets() (resp []datatype return } +func (r Network_Storage_MassDataMigration_Request) GetTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Network_Storage_MassDataMigration_Request_KeyContact data type contains name, email, and phone for key contact at customer location who will handle Mass Data Migration. type Network_Storage_MassDataMigration_Request_KeyContact struct { Session session.SLSession @@ -13848,6 +23468,30 @@ func (r Network_Storage_Schedule) GetEvents() (resp []datatypes.Network_Storage_ return } +func (r Network_Storage_Schedule) GetEventsIter() (resp []datatypes.Network_Storage_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hour parameter of this schedule. func (r Network_Storage_Schedule) GetHour() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getHour", nil, &r.Options, &resp) @@ -13884,12 +23528,60 @@ func (r Network_Storage_Schedule) GetProperties() (resp []datatypes.Network_Stor return } +func (r Network_Storage_Schedule) GetPropertiesIter() (resp []datatypes.Network_Storage_Schedule_Property, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getProperties", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Schedule_Property{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getProperties", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Replica snapshots which have been created as the result of this schedule's execution. func (r Network_Storage_Schedule) GetReplicaSnapshots() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getReplicaSnapshots", nil, &r.Options, &resp) return } +func (r Network_Storage_Schedule) GetReplicaSnapshotsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getReplicaSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getReplicaSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The number of snapshots this schedule is configured to retain. func (r Network_Storage_Schedule) GetRetentionCount() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getRetentionCount", nil, &r.Options, &resp) @@ -13908,6 +23600,30 @@ func (r Network_Storage_Schedule) GetSnapshots() (resp []datatypes.Network_Stora return } +func (r Network_Storage_Schedule) GetSnapshotsIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getSnapshots", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getSnapshots", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type provides a standardized definition for a schedule. func (r Network_Storage_Schedule) GetType() (resp datatypes.Network_Storage_Schedule_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getType", nil, &r.Options, &resp) @@ -13966,6 +23682,30 @@ func (r Network_Storage_Schedule_Property_Type) GetAllObjects() (resp []datatype return } +func (r Network_Storage_Schedule_Property_Type) GetAllObjectsIter() (resp []datatypes.Network_Storage_Schedule_Property_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule_Property_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage_Schedule_Property_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule_Property_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Storage_Schedule_Property_Type) GetObject() (resp datatypes.Network_Storage_Schedule_Property_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule_Property_Type", "getObject", nil, &r.Options, &resp) @@ -14096,6 +23836,30 @@ func (r Network_Subnet) FindAllSubnetsAndActiveSwipTransactionStatus() (resp []d return } +func (r Network_Subnet) FindAllSubnetsAndActiveSwipTransactionStatusIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "findAllSubnetsAndActiveSwipTransactionStatus", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "findAllSubnetsAndActiveSwipTransactionStatus", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Subnet) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAccount", nil, &r.Options, &resp) @@ -14138,27 +23902,129 @@ func (r Network_Subnet) GetAllowedNetworkStorage() (resp []datatypes.Network_Sto return } +func (r Network_Subnet) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network storage device replicas this subnet has been granted access to. func (r Network_Subnet) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } +func (r Network_Subnet) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the combination of network storage devices and replicas this subnet has been granted access to. Allows for filtering based on storage device type. func (r Network_Subnet) GetAttachedNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ nasType, } - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAttachedNetworkStorages", params, &r.Options, &resp) + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAttachedNetworkStorages", params, &r.Options, &resp) + return +} + +func (r Network_Subnet) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAttachedNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAttachedNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieves the combination of network storage devices and replicas this subnet has NOT been granted access to. Allows for filtering based on storage device type. +func (r Network_Subnet) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAvailableNetworkStorages", params, &r.Options, &resp) return } -// Retrieves the combination of network storage devices and replicas this subnet has NOT been granted access to. Allows for filtering based on storage device type. -func (r Network_Subnet) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { +func (r Network_Subnet) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ nasType, } + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAvailableNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAvailableNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -14174,6 +24040,30 @@ func (r Network_Subnet) GetBoundDescendants() (resp []datatypes.Network_Subnet, return } +func (r Network_Subnet) GetBoundDescendantsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundDescendants", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundDescendants", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Indicates whether this subnet is associated to a network router and is routable on the network. func (r Network_Subnet) GetBoundRouterFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundRouterFlag", nil, &r.Options, &resp) @@ -14186,12 +24076,60 @@ func (r Network_Subnet) GetBoundRouters() (resp []datatypes.Hardware, err error) return } +func (r Network_Subnet) GetBoundRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The immediate descendants of this subnet. func (r Network_Subnet) GetChildren() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getChildren", nil, &r.Options, &resp) return } +func (r Network_Subnet) GetChildrenIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The datacenter this subnet is primarily associated with. func (r Network_Subnet) GetDatacenter() (resp datatypes.Location_Datacenter, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getDatacenter", nil, &r.Options, &resp) @@ -14204,6 +24142,30 @@ func (r Network_Subnet) GetDescendants() (resp []datatypes.Network_Subnet, err e return } +func (r Network_Subnet) GetDescendantsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getDescendants", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getDescendants", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [DEPRECATED] The description of this subnet. func (r Network_Subnet) GetDisplayLabel() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getDisplayLabel", nil, &r.Options, &resp) @@ -14228,6 +24190,30 @@ func (r Network_Subnet) GetHardware() (resp []datatypes.Hardware, err error) { return } +func (r Network_Subnet) GetHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns a list of IP address assignment details. Only assigned IP addresses are reported on. IP address assignments are presently only recorded and available for Primary Subnets. // // Details on the resource assigned to each IP address will only be provided to users with access to the underlying resource. If the user cannot access the resource, a detail record will still be returned for the assignment but without any accompanying resource data. @@ -14236,12 +24222,60 @@ func (r Network_Subnet) GetIpAddressUsage() (resp []datatypes.Network_Subnet_IpA return } +func (r Network_Subnet) GetIpAddressUsageIter() (resp []datatypes.Network_Subnet_IpAddress_UsageDetail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddressUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress_UsageDetail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddressUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The IP address records belonging to this subnet. func (r Network_Subnet) GetIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddresses", nil, &r.Options, &resp) return } +func (r Network_Subnet) GetIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware firewall associated to this subnet via access control list. func (r Network_Subnet) GetNetworkComponentFirewall() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkComponentFirewall", nil, &r.Options, &resp) @@ -14254,12 +24288,60 @@ func (r Network_Subnet) GetNetworkProtectionAddresses() (resp []datatypes.Networ return } +func (r Network_Subnet) GetNetworkProtectionAddressesIter() (resp []datatypes.Network_Protection_Address, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkProtectionAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Protection_Address{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkProtectionAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The IPSec VPN tunnels associated to this subnet. func (r Network_Subnet) GetNetworkTunnelContexts() (resp []datatypes.Network_Tunnel_Module_Context, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkTunnelContexts", nil, &r.Options, &resp) return } +func (r Network_Subnet) GetNetworkTunnelContextsIter() (resp []datatypes.Network_Tunnel_Module_Context, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkTunnelContexts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Tunnel_Module_Context{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkTunnelContexts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The VLAN this subnet is associated with. func (r Network_Subnet) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkVlan", nil, &r.Options, &resp) @@ -14284,6 +24366,30 @@ func (r Network_Subnet) GetProtectedIpAddresses() (resp []datatypes.Network_Subn return } +func (r Network_Subnet) GetProtectedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getProtectedIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getProtectedIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The RIR which is authoritative over the network in which this subnet resides. func (r Network_Subnet) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRegionalInternetRegistry", nil, &r.Options, &resp) @@ -14296,6 +24402,30 @@ func (r Network_Subnet) GetRegistrations() (resp []datatypes.Network_Subnet_Regi return } +func (r Network_Subnet) GetRegistrationsIter() (resp []datatypes.Network_Subnet_Registration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRegistrations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Registration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRegistrations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The reverse DNS domain associated with this subnet. func (r Network_Subnet) GetReverseDomain() (resp datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getReverseDomain", nil, &r.Options, &resp) @@ -14308,6 +24438,30 @@ func (r Network_Subnet) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, return } +func (r Network_Subnet) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getReverseDomainRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getReverseDomainRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The role identifier that this subnet is participating in. Roles dictate how a subnet may be used. func (r Network_Subnet) GetRoleKeyName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRoleKeyName", nil, &r.Options, &resp) @@ -14326,6 +24480,30 @@ func (r Network_Subnet) GetRoutableEndpointIpAddresses() (resp []datatypes.Netwo return } +func (r Network_Subnet) GetRoutableEndpointIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRoutableEndpointIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRoutableEndpointIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The product and route classifier for this routed subnet, with the following values: PRIMARY, SECONDARY, STATIC_TO_IP, GLOBAL_IP, IPSEC_STATIC_NAT. func (r Network_Subnet) GetRoutingTypeKeyName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRoutingTypeKeyName", nil, &r.Options, &resp) @@ -14353,18 +24531,90 @@ func (r Network_Subnet) GetSwipTransaction() (resp []datatypes.Network_Subnet_Sw return } +func (r Network_Subnet) GetSwipTransactionIter() (resp []datatypes.Network_Subnet_Swip_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getSwipTransaction", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Swip_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getSwipTransaction", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The tags associated to this subnet. func (r Network_Subnet) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getTagReferences", nil, &r.Options, &resp) return } +func (r Network_Subnet) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Subnet) GetUnboundDescendants() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getUnboundDescendants", nil, &r.Options, &resp) return } +func (r Network_Subnet) GetUnboundDescendantsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getUnboundDescendants", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getUnboundDescendants", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The total number of utilized IP addresses on this subnet. The primary consumer of IP addresses are compute resources, which can consume more than one address. This value is only supported for primary subnets. func (r Network_Subnet) GetUtilizedIpAddressCount() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getUtilizedIpAddressCount", nil, &r.Options, &resp) @@ -14377,6 +24627,30 @@ func (r Network_Subnet) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err return } +func (r Network_Subnet) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Subnet) RemoveAccessToNetworkStorageList(networkStorageTemplateObjects []datatypes.Network_Storage) (resp bool, err error) { params := []interface{}{ @@ -14530,6 +24804,30 @@ func (r Network_Subnet_IpAddress) FindUsage() (resp []datatypes.Network_Subnet_I return } +func (r Network_Subnet_IpAddress) FindUsageIter() (resp []datatypes.Network_Subnet_IpAddress_UsageDetail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "findUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress_UsageDetail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "findUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this IP Address to Network Storage supporting access control lists. func (r Network_Subnet_IpAddress) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedHost", nil, &r.Options, &resp) @@ -14542,12 +24840,60 @@ func (r Network_Subnet_IpAddress) GetAllowedNetworkStorage() (resp []datatypes.N return } +func (r Network_Subnet_IpAddress) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Network_Subnet_IpAddress) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The application delivery controller using this address. func (r Network_Subnet_IpAddress) GetApplicationDeliveryController() (resp datatypes.Network_Application_Delivery_Controller, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getApplicationDeliveryController", nil, &r.Options, &resp) @@ -14563,6 +24909,33 @@ func (r Network_Subnet_IpAddress) GetAttachedNetworkStorages(nasType *string) (r return } +func (r Network_Subnet_IpAddress) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAttachedNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAttachedNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Network_Subnet_IpAddress. func (r Network_Subnet_IpAddress) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -14572,6 +24945,33 @@ func (r Network_Subnet_IpAddress) GetAvailableNetworkStorages(nasType *string) ( return } +func (r Network_Subnet_IpAddress) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAvailableNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAvailableNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Search for an IP address record by IP address. func (r Network_Subnet_IpAddress) GetByIpAddress(ipAddress *string) (resp datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -14587,12 +24987,60 @@ func (r Network_Subnet_IpAddress) GetContextTunnelTranslations() (resp []datatyp return } +func (r Network_Subnet_IpAddress) GetContextTunnelTranslationsIter() (resp []datatypes.Network_Tunnel_Module_Context_Address_Translation, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getContextTunnelTranslations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Tunnel_Module_Context_Address_Translation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getContextTunnelTranslations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All the subnets routed to an IP address. func (r Network_Subnet_IpAddress) GetEndpointSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getEndpointSubnets", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetEndpointSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getEndpointSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getEndpointSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A network component that is statically routed to an IP address. func (r Network_Subnet_IpAddress) GetGuestNetworkComponent() (resp datatypes.Virtual_Guest_Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getGuestNetworkComponent", nil, &r.Options, &resp) @@ -14635,6 +25083,30 @@ func (r Network_Subnet_IpAddress) GetProtectionAddress() (resp []datatypes.Netwo return } +func (r Network_Subnet_IpAddress) GetProtectionAddressIter() (resp []datatypes.Network_Protection_Address, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getProtectionAddress", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Protection_Address{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getProtectionAddress", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network gateway appliance using this address as the public IP address. func (r Network_Subnet_IpAddress) GetPublicNetworkGateway() (resp datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getPublicNetworkGateway", nil, &r.Options, &resp) @@ -14659,60 +25131,300 @@ func (r Network_Subnet_IpAddress) GetSyslogEventsOneDay() (resp []datatypes.Netw return } +func (r Network_Subnet_IpAddress) GetSyslogEventsOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsOneDay", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsOneDay", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All events for this IP address stored in the datacenter syslogs from the last 7 days func (r Network_Subnet_IpAddress) GetSyslogEventsSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsSevenDays", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetSyslogEventsSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsSevenDays", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsSevenDays", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Top Ten network datacenter syslog events, grouped by destination port, for the last 24 hours func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByDestinationPortOneDay() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortOneDay", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByDestinationPortOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortOneDay", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortOneDay", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Top Ten network datacenter syslog events, grouped by destination port, for the last 7 days func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByDestinationPortSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortSevenDays", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByDestinationPortSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortSevenDays", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortSevenDays", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Top Ten network datacenter syslog events, grouped by source port, for the last 24 hours func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByProtocolsOneDay() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsOneDay", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByProtocolsOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsOneDay", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsOneDay", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Top Ten network datacenter syslog events, grouped by source port, for the last 7 days func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByProtocolsSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsSevenDays", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByProtocolsSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsSevenDays", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsSevenDays", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Top Ten network datacenter syslog events, grouped by source ip address, for the last 24 hours func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourceIpOneDay() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpOneDay", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourceIpOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpOneDay", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpOneDay", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Top Ten network datacenter syslog events, grouped by source ip address, for the last 7 days func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourceIpSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpSevenDays", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourceIpSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpSevenDays", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpSevenDays", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Top Ten network datacenter syslog events, grouped by source port, for the last 24 hours func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourcePortOneDay() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortOneDay", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourcePortOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortOneDay", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortOneDay", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Top Ten network datacenter syslog events, grouped by source port, for the last 7 days func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourcePortSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortSevenDays", nil, &r.Options, &resp) return } +func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourcePortSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortSevenDays", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortSevenDays", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A virtual guest that this IP address is routed to. func (r Network_Subnet_IpAddress) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getVirtualGuest", nil, &r.Options, &resp) @@ -14725,6 +25437,30 @@ func (r Network_Subnet_IpAddress) GetVirtualLicenses() (resp []datatypes.Softwar return } +func (r Network_Subnet_IpAddress) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getVirtualLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_VirtualLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getVirtualLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is used to remove access to multiple SoftLayer_Network_Storage volumes func (r Network_Subnet_IpAddress) RemoveAccessToNetworkStorageList(networkStorageTemplateObjects []datatypes.Network_Storage) (resp bool, err error) { params := []interface{}{ @@ -14919,6 +25655,33 @@ func (r Network_Subnet_Registration) CreateObjects(templateObjects []datatypes.N return } +func (r Network_Subnet_Registration) CreateObjectsIter(templateObjects []datatypes.Network_Subnet_Registration) (resp []datatypes.Network_Subnet_Registration, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Registration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The subnet registration service has been deprecated. // // This method will edit an existing SoftLayer_Network_Subnet_Registration object. For more detail, see [[SoftLayer_Network_Subnet_Registration::createObject|createObject]]. @@ -14956,12 +25719,60 @@ func (r Network_Subnet_Registration) GetDetailReferences() (resp []datatypes.Net return } +func (r Network_Subnet_Registration) GetDetailReferencesIter() (resp []datatypes.Network_Subnet_Registration_Details, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getDetailReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Registration_Details{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getDetailReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [Deprecated] The related registration events. func (r Network_Subnet_Registration) GetEvents() (resp []datatypes.Network_Subnet_Registration_Event, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getEvents", nil, &r.Options, &resp) return } +func (r Network_Subnet_Registration) GetEventsIter() (resp []datatypes.Network_Subnet_Registration_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Registration_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve [Deprecated] The "network" detail object. func (r Network_Subnet_Registration) GetNetworkDetail() (resp datatypes.Account_Regional_Registry_Detail, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getNetworkDetail", nil, &r.Options, &resp) @@ -15140,6 +25951,30 @@ func (r Network_Subnet_Registration_Status) GetAllObjects() (resp []datatypes.Ne return } +func (r Network_Subnet_Registration_Status) GetAllObjectsIter() (resp []datatypes.Network_Subnet_Registration_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration_Status", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Registration_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration_Status", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Network_Subnet_Registration_Status) GetObject() (resp datatypes.Network_Subnet_Registration_Status, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration_Status", "getObject", nil, &r.Options, &resp) @@ -15273,6 +26108,30 @@ func (r Network_Subnet_Swip_Transaction) FindMyTransactions() (resp []datatypes. return } +func (r Network_Subnet_Swip_Transaction) FindMyTransactionsIter() (resp []datatypes.Network_Subnet_Swip_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Swip_Transaction", "findMyTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_Swip_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Subnet_Swip_Transaction", "findMyTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Account whose RWHOIS data was used to SWIP this subnet func (r Network_Subnet_Swip_Transaction) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_Swip_Transaction", "getAccount", nil, &r.Options, &resp) @@ -15435,6 +26294,33 @@ func (r Network_Tunnel_Module_Context) CreateAddressTranslations(translations [] return } +func (r Network_Tunnel_Module_Context) CreateAddressTranslationsIter(translations []datatypes.Network_Tunnel_Module_Context_Address_Translation) (resp []datatypes.Network_Tunnel_Module_Context_Address_Translation, err error) { + params := []interface{}{ + translations, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "createAddressTranslations", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Tunnel_Module_Context_Address_Translation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "createAddressTranslations", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Remove an existing address translation from a network tunnel. // // Address translations deliver packets to a destination ip address that is on a customer subnet (remote). @@ -15486,6 +26372,33 @@ func (r Network_Tunnel_Module_Context) EditAddressTranslations(translations []da return } +func (r Network_Tunnel_Module_Context) EditAddressTranslationsIter(translations []datatypes.Network_Tunnel_Module_Context_Address_Translation) (resp []datatypes.Network_Tunnel_Module_Context_Address_Translation, err error) { + params := []interface{}{ + translations, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "editAddressTranslations", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Tunnel_Module_Context_Address_Translation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "editAddressTranslations", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Negotiation parameters for both phases one and two are editable. Here are the phase one and two parameters that can modified: // // *Phase One @@ -15569,12 +26482,60 @@ func (r Network_Tunnel_Module_Context) GetAddressTranslations() (resp []datatype return } +func (r Network_Tunnel_Module_Context) GetAddressTranslationsIter() (resp []datatypes.Network_Tunnel_Module_Context_Address_Translation, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAddressTranslations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Tunnel_Module_Context_Address_Translation{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAddressTranslations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Subnets that provide access to SoftLayer services such as the management portal and the SoftLayer API. func (r Network_Tunnel_Module_Context) GetAllAvailableServiceSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAllAvailableServiceSubnets", nil, &r.Options, &resp) return } +func (r Network_Tunnel_Module_Context) GetAllAvailableServiceSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAllAvailableServiceSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAllAvailableServiceSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The default authentication type used for both phases of the negotiation process. The default value is set to MD5. func (r Network_Tunnel_Module_Context) GetAuthenticationDefault() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAuthenticationDefault", nil, &r.Options, &resp) @@ -15592,6 +26553,30 @@ func (r Network_Tunnel_Module_Context) GetAuthenticationOptions() (resp []string return } +func (r Network_Tunnel_Module_Context) GetAuthenticationOptionsIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAuthenticationOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAuthenticationOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The current billing item for network tunnel. func (r Network_Tunnel_Module_Context) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getBillingItem", nil, &r.Options, &resp) @@ -15604,6 +26589,30 @@ func (r Network_Tunnel_Module_Context) GetCustomerSubnets() (resp []datatypes.Ne return } +func (r Network_Tunnel_Module_Context) GetCustomerSubnetsIter() (resp []datatypes.Network_Customer_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getCustomerSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Customer_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getCustomerSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The datacenter location for one end of the network tunnel that allows access to account's private subnets. func (r Network_Tunnel_Module_Context) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getDatacenter", nil, &r.Options, &resp) @@ -15628,6 +26637,30 @@ func (r Network_Tunnel_Module_Context) GetDiffieHellmanGroupOptions() (resp []in return } +func (r Network_Tunnel_Module_Context) GetDiffieHellmanGroupOptionsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getDiffieHellmanGroupOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getDiffieHellmanGroupOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The default encryption type used for both phases of the negotiation process. The default value is set to 3DES. func (r Network_Tunnel_Module_Context) GetEncryptionDefault() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getEncryptionDefault", nil, &r.Options, &resp) @@ -15647,18 +26680,90 @@ func (r Network_Tunnel_Module_Context) GetEncryptionOptions() (resp []string, er return } +func (r Network_Tunnel_Module_Context) GetEncryptionOptionsIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getEncryptionOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getEncryptionOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Private subnets that can be accessed through the network tunnel. func (r Network_Tunnel_Module_Context) GetInternalSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getInternalSubnets", nil, &r.Options, &resp) return } +func (r Network_Tunnel_Module_Context) GetInternalSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getInternalSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getInternalSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The keylife limits. Keylife max limit is set to 120. Keylife min limit is set to 172800. func (r Network_Tunnel_Module_Context) GetKeylifeLimits() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getKeylifeLimits", nil, &r.Options, &resp) return } +func (r Network_Tunnel_Module_Context) GetKeylifeLimitsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getKeylifeLimits", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getKeylifeLimits", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Network_Tunnel_Module_Context object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Tunnel_Module_Context service. The IPSec network tunnel will be returned if it is associated with the account and the user has proper permission to manage network tunnels. func (r Network_Tunnel_Module_Context) GetObject() (resp datatypes.Network_Tunnel_Module_Context, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getObject", nil, &r.Options, &resp) @@ -15689,18 +26794,90 @@ func (r Network_Tunnel_Module_Context) GetServiceSubnets() (resp []datatypes.Net return } +func (r Network_Tunnel_Module_Context) GetServiceSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getServiceSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getServiceSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Subnets used for a network tunnel's address translations. func (r Network_Tunnel_Module_Context) GetStaticRouteSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getStaticRouteSubnets", nil, &r.Options, &resp) return } +func (r Network_Tunnel_Module_Context) GetStaticRouteSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getStaticRouteSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getStaticRouteSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve DEPRECATED func (r Network_Tunnel_Module_Context) GetTransactionHistory() (resp []datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getTransactionHistory", nil, &r.Options, &resp) return } +func (r Network_Tunnel_Module_Context) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getTransactionHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getTransactionHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Disassociate a customer subnet (remote) from a network tunnel. When a remote subnet is disassociated, that subnet will not able to communicate with private and service subnets on the SoftLayer network. // // NOTE: A network tunnel's configurations must be applied to the network device in order for the disassociation described above to take effect. @@ -15805,6 +26982,30 @@ func (r Network_Vlan) GetAdditionalPrimarySubnets() (resp []datatypes.Network_Su return } +func (r Network_Vlan) GetAdditionalPrimarySubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getAdditionalPrimarySubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getAdditionalPrimarySubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway device this VLAN is associated with for routing purposes. func (r Network_Vlan) GetAttachedNetworkGateway() (resp datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getAttachedNetworkGateway", nil, &r.Options, &resp) @@ -15835,6 +27036,30 @@ func (r Network_Vlan) GetCancelFailureReasons() (resp []string, err error) { return } +func (r Network_Vlan) GetCancelFailureReasonsIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getCancelFailureReasons", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getCancelFailureReasons", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The datacenter this VLAN is associated with. func (r Network_Vlan) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getDatacenter", nil, &r.Options, &resp) @@ -15859,18 +27084,90 @@ func (r Network_Vlan) GetFirewallGuestNetworkComponents() (resp []datatypes.Netw return } +func (r Network_Vlan) GetFirewallGuestNetworkComponentsIter() (resp []datatypes.Network_Component_Firewall, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallGuestNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Firewall{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallGuestNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The context for the firewall device associated with this VLAN. func (r Network_Vlan) GetFirewallInterfaces() (resp []datatypes.Network_Firewall_Module_Context_Interface, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallInterfaces", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetFirewallInterfacesIter() (resp []datatypes.Network_Firewall_Module_Context_Interface, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallInterfaces", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_Module_Context_Interface{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallInterfaces", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The uplinks of the hardware network interfaces connected natively to this VLAN and associated with a Hardware Firewall. func (r Network_Vlan) GetFirewallNetworkComponents() (resp []datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallNetworkComponents", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetFirewallNetworkComponentsIter() (resp []datatypes.Network_Component_Firewall, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Firewall{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // *** DEPRECATED *** // Retrieves the IP addresses routed on this VLAN that are protectable by a Hardware Firewall. // Deprecated: This function has been marked as deprecated. @@ -15879,6 +27176,30 @@ func (r Network_Vlan) GetFirewallProtectableIpAddresses() (resp []datatypes.Netw return } +func (r Network_Vlan) GetFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallProtectableIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallProtectableIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // *** DEPRECATED *** // Retrieves the subnets routed on this VLAN that are protectable by a Hardware Firewall. // Deprecated: This function has been marked as deprecated. @@ -15887,24 +27208,120 @@ func (r Network_Vlan) GetFirewallProtectableSubnets() (resp []datatypes.Network_ return } +func (r Network_Vlan) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallProtectableSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallProtectableSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The access rules for the firewall device associated with this VLAN. func (r Network_Vlan) GetFirewallRules() (resp []datatypes.Network_Vlan_Firewall_Rule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallRules", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetFirewallRulesIter() (resp []datatypes.Network_Vlan_Firewall_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallRules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan_Firewall_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallRules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The VSI network interfaces connected to this VLAN. func (r Network_Vlan) GetGuestNetworkComponents() (resp []datatypes.Virtual_Guest_Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getGuestNetworkComponents", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetGuestNetworkComponentsIter() (resp []datatypes.Virtual_Guest_Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getGuestNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getGuestNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware with network interfaces connected natively to this VLAN. func (r Network_Vlan) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getHardware", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A value of '1' indicates this VLAN is associated with a firewall device in a high availability configuration. func (r Network_Vlan) GetHighAvailabilityFirewallFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getHighAvailabilityFirewallFlag", nil, &r.Options, &resp) @@ -15919,6 +27336,30 @@ func (r Network_Vlan) GetIpAddressUsage() (resp []datatypes.Network_Subnet_IpAdd return } +func (r Network_Vlan) GetIpAddressUsageIter() (resp []datatypes.Network_Subnet_IpAddress_UsageDetail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getIpAddressUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress_UsageDetail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getIpAddressUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A value of '1' indicates this VLAN's pod has VSI local disk storage capability. func (r Network_Vlan) GetLocalDiskStorageCapabilityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getLocalDiskStorageCapabilityFlag", nil, &r.Options, &resp) @@ -15931,18 +27372,90 @@ func (r Network_Vlan) GetNetworkComponentTrunks() (resp []datatypes.Network_Comp return } +func (r Network_Vlan) GetNetworkComponentTrunksIter() (resp []datatypes.Network_Component_Network_Vlan_Trunk, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentTrunks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component_Network_Vlan_Trunk{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentTrunks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware network interfaces connected natively to this VLAN. func (r Network_Vlan) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponents", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The viable hardware network interface trunking targets of this VLAN. Viable targets include accessible components of assigned hardware in the same pod and network as this VLAN, which are not already connected, either natively or trunked. func (r Network_Vlan) GetNetworkComponentsTrunkable() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentsTrunkable", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetNetworkComponentsTrunkableIter() (resp []datatypes.Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentsTrunkable", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentsTrunkable", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network that this VLAN is on, either PUBLIC or PRIVATE, if applicable. func (r Network_Vlan) GetNetworkSpace() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkSpace", nil, &r.Options, &resp) @@ -15991,12 +27504,60 @@ func (r Network_Vlan) GetPrimarySubnets() (resp []datatypes.Network_Subnet, err return } +func (r Network_Vlan) GetPrimarySubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrimarySubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrimarySubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway devices with connectivity supported by this private VLAN. func (r Network_Vlan) GetPrivateNetworkGateways() (resp []datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrivateNetworkGateways", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetPrivateNetworkGatewaysIter() (resp []datatypes.Network_Gateway, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrivateNetworkGateways", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrivateNetworkGateways", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // *** DEPRECATED *** // Retrieves a private VLAN associated to one or more hosts also associated to this public VLAN. // Deprecated: This function has been marked as deprecated. @@ -16022,12 +27583,60 @@ func (r Network_Vlan) GetProtectedIpAddresses() (resp []datatypes.Network_Subnet return } +func (r Network_Vlan) GetProtectedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getProtectedIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getProtectedIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway devices with connectivity supported by this public VLAN. func (r Network_Vlan) GetPublicNetworkGateways() (resp []datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPublicNetworkGateways", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetPublicNetworkGatewaysIter() (resp []datatypes.Network_Gateway, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPublicNetworkGateways", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Gateway{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPublicNetworkGateways", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // *** DEPRECATED *** // Retrieves a public VLAN associated to the host matched by the given fully-qualified domain name. // Deprecated: This function has been marked as deprecated. @@ -16047,6 +27656,30 @@ func (r Network_Vlan) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, er return } +func (r Network_Vlan) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getReverseDomainRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getReverseDomainRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A value of '1' indicates this VLAN's pod has VSI SAN disk storage capability. func (r Network_Vlan) GetSanStorageCapabilityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSanStorageCapabilityFlag", nil, &r.Options, &resp) @@ -16065,18 +27698,90 @@ func (r Network_Vlan) GetSecondarySubnets() (resp []datatypes.Network_Subnet, er return } +func (r Network_Vlan) GetSecondarySubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSecondarySubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSecondarySubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All subnets routed on this VLAN. func (r Network_Vlan) GetSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSubnets", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The tags associated to this VLAN. func (r Network_Vlan) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getTagReferences", nil, &r.Options, &resp) return } +func (r Network_Vlan) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The number of primary IPv4 addresses routed on this VLAN. func (r Network_Vlan) GetTotalPrimaryIpAddressCount() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getTotalPrimaryIpAddressCount", nil, &r.Options, &resp) @@ -16095,6 +27800,30 @@ func (r Network_Vlan) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err er return } +func (r Network_Vlan) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the VLAN on which the given IP address is routed. func (r Network_Vlan) GetVlanForIpAddress(ipAddress *string) (resp datatypes.Network_Vlan, err error) { params := []interface{}{ @@ -16198,6 +27927,30 @@ func (r Network_Vlan_Firewall) GetBillingCycleBandwidthUsage() (resp []datatypes return } +func (r Network_Vlan_Firewall) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Usage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Network_Vlan_Firewall) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -16270,6 +28023,30 @@ func (r Network_Vlan_Firewall) GetNetworkFirewallUpdateRequests() (resp []dataty return } +func (r Network_Vlan_Firewall) GetNetworkFirewallUpdateRequestsIter() (resp []datatypes.Network_Firewall_Update_Request, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkFirewallUpdateRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Firewall_Update_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkFirewallUpdateRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The gateway associated with this firewall, if any. func (r Network_Vlan_Firewall) GetNetworkGateway() (resp datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkGateway", nil, &r.Options, &resp) @@ -16288,6 +28065,30 @@ func (r Network_Vlan_Firewall) GetNetworkVlans() (resp []datatypes.Network_Vlan, return } +func (r Network_Vlan_Firewall) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject returns a SoftLayer_Network_Vlan_Firewall object. You can only get objects for vlans attached to your account that have a network firewall enabled. func (r Network_Vlan_Firewall) GetObject() (resp datatypes.Network_Vlan_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getObject", nil, &r.Options, &resp) @@ -16300,12 +28101,60 @@ func (r Network_Vlan_Firewall) GetRules() (resp []datatypes.Network_Vlan_Firewal return } +func (r Network_Vlan_Firewall) GetRulesIter() (resp []datatypes.Network_Vlan_Firewall_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getRules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan_Firewall_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getRules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Network_Vlan_Firewall) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getTagReferences", nil, &r.Options, &resp) return } +func (r Network_Vlan_Firewall) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A firewall's associated upgrade request object, if any. func (r Network_Vlan_Firewall) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getUpgradeRequest", nil, &r.Options, &resp) diff --git a/services/notification.go b/services/notification.go index 67dec55..3880a49 100644 --- a/services/notification.go +++ b/services/notification.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,6 +69,30 @@ func (r Notification) GetAllObjects() (resp []datatypes.Notification, err error) return } +func (r Notification) GetAllObjectsIter() (resp []datatypes.Notification, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Notification) GetObject() (resp datatypes.Notification, err error) { err = r.Session.DoRequest("SoftLayer_Notification", "getObject", nil, &r.Options, &resp) @@ -80,12 +105,60 @@ func (r Notification) GetPreferences() (resp []datatypes.Notification_Preference return } +func (r Notification) GetPreferencesIter() (resp []datatypes.Notification_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification", "getPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification", "getPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The required preferences related to the notification. While configurable, the subscriber does not have the option whether to use the preference. func (r Notification) GetRequiredPreferences() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification", "getRequiredPreferences", nil, &r.Options, &resp) return } +func (r Notification) GetRequiredPreferencesIter() (resp []datatypes.Notification_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification", "getRequiredPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification", "getRequiredPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This is an extension of the SoftLayer_Notification class. These are implementation details specific to those notifications which can be subscribed to and received on a mobile device. type Notification_Mobile struct { Session session.SLSession @@ -143,6 +216,30 @@ func (r Notification_Mobile) GetAllObjects() (resp []datatypes.Notification, err return } +func (r Notification_Mobile) GetAllObjectsIter() (resp []datatypes.Notification, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Notification_Mobile) GetObject() (resp datatypes.Notification_Mobile, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getObject", nil, &r.Options, &resp) @@ -155,12 +252,60 @@ func (r Notification_Mobile) GetPreferences() (resp []datatypes.Notification_Pre return } +func (r Notification_Mobile) GetPreferencesIter() (resp []datatypes.Notification_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The required preferences related to the notification. While configurable, the subscriber does not have the option whether to use the preference. func (r Notification_Mobile) GetRequiredPreferences() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getRequiredPreferences", nil, &r.Options, &resp) return } +func (r Notification_Mobile) GetRequiredPreferencesIter() (resp []datatypes.Notification_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getRequiredPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getRequiredPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Notification_Occurrence_Event struct { Session session.SLSession @@ -219,6 +364,30 @@ func (r Notification_Occurrence_Event) GetAllObjects() (resp []datatypes.Notific return } +func (r Notification_Occurrence_Event) GetAllObjectsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the contents of the file attached to a SoftLayer event by it's given identifier. func (r Notification_Occurrence_Event) GetAttachedFile(attachmentId *int) (resp []byte, err error) { params := []interface{}{ @@ -234,6 +403,30 @@ func (r Notification_Occurrence_Event) GetAttachments() (resp []datatypes.Notifi return } +func (r Notification_Occurrence_Event) GetAttachmentsIter() (resp []datatypes.Notification_Occurrence_Event_Attachment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAttachments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event_Attachment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAttachments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The first update for this event. func (r Notification_Occurrence_Event) GetFirstUpdate() (resp datatypes.Notification_Occurrence_Update, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getFirstUpdate", nil, &r.Options, &resp) @@ -252,6 +445,30 @@ func (r Notification_Occurrence_Event) GetImpactedAccounts() (resp []datatypes.N return } +func (r Notification_Occurrence_Event) GetImpactedAccountsIter() (resp []datatypes.Notification_Occurrence_Account, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedAccounts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedAccounts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return the number of impacted devices associated with this event for the current user. func (r Notification_Occurrence_Event) GetImpactedDeviceCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedDeviceCount", nil, &r.Options, &resp) @@ -264,18 +481,90 @@ func (r Notification_Occurrence_Event) GetImpactedDevices() (resp []datatypes.No return } +func (r Notification_Occurrence_Event) GetImpactedDevicesIter() (resp []datatypes.Notification_Occurrence_Resource, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedDevices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Resource{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedDevices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of resources impacted by this event. Each record will relate to some physical resource that the user has access to such as [[SoftLayer_Hardware]] or [[SoftLayer_Virtual_Guest]]. func (r Notification_Occurrence_Event) GetImpactedResources() (resp []datatypes.Notification_Occurrence_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedResources", nil, &r.Options, &resp) return } +func (r Notification_Occurrence_Event) GetImpactedResourcesIter() (resp []datatypes.Notification_Occurrence_Resource, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedResources", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Resource{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedResources", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of users impacted by this event. Each impacted user record relates directly to a [[SoftLayer_User_Customer]]. func (r Notification_Occurrence_Event) GetImpactedUsers() (resp []datatypes.Notification_Occurrence_User, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedUsers", nil, &r.Options, &resp) return } +func (r Notification_Occurrence_Event) GetImpactedUsersIter() (resp []datatypes.Notification_Occurrence_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The last update for this event. func (r Notification_Occurrence_Event) GetLastUpdate() (resp datatypes.Notification_Occurrence_Update, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getLastUpdate", nil, &r.Options, &resp) @@ -306,6 +595,30 @@ func (r Notification_Occurrence_Event) GetUpdates() (resp []datatypes.Notificati return } +func (r Notification_Occurrence_Event) GetUpdatesIter() (resp []datatypes.Notification_Occurrence_Update, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getUpdates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Update{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getUpdates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This type contains general information relating to a user that may be impacted by a [[SoftLayer_Notification_Occurrence_Event]]. type Notification_Occurrence_User struct { Session session.SLSession @@ -358,6 +671,30 @@ func (r Notification_Occurrence_User) GetAllObjects() (resp []datatypes.Notifica return } +func (r Notification_Occurrence_User) GetAllObjectsIter() (resp []datatypes.Notification_Occurrence_User, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_User{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Notification_Occurrence_User) GetImpactedDeviceCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getImpactedDeviceCount", nil, &r.Options, &resp) @@ -370,6 +707,30 @@ func (r Notification_Occurrence_User) GetImpactedResources() (resp []datatypes.N return } +func (r Notification_Occurrence_User) GetImpactedResourcesIter() (resp []datatypes.Notification_Occurrence_Resource, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getImpactedResources", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Resource{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getImpactedResources", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The associated event. func (r Notification_Occurrence_User) GetNotificationOccurrenceEvent() (resp datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getNotificationOccurrenceEvent", nil, &r.Options, &resp) @@ -482,6 +843,30 @@ func (r Notification_User_Subscriber) GetDeliveryMethods() (resp []datatypes.Not return } +func (r Notification_User_Subscriber) GetDeliveryMethodsIter() (resp []datatypes.Notification_Delivery_Method, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getDeliveryMethods", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Delivery_Method{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getDeliveryMethods", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Notification subscribed to. func (r Notification_User_Subscriber) GetNotification() (resp datatypes.Notification, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getNotification", nil, &r.Options, &resp) @@ -500,12 +885,60 @@ func (r Notification_User_Subscriber) GetPreferences() (resp []datatypes.Notific return } +func (r Notification_User_Subscriber) GetPreferencesIter() (resp []datatypes.Notification_User_Subscriber_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure. func (r Notification_User_Subscriber) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferencesDetails", nil, &r.Options, &resp) return } +func (r Notification_User_Subscriber) GetPreferencesDetailsIter() (resp []datatypes.Notification_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferencesDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferencesDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The subscriber id to resource id mapping. func (r Notification_User_Subscriber) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getResourceRecord", nil, &r.Options, &resp) @@ -612,6 +1045,30 @@ func (r Notification_User_Subscriber_Billing) GetDeliveryMethods() (resp []datat return } +func (r Notification_User_Subscriber_Billing) GetDeliveryMethodsIter() (resp []datatypes.Notification_Delivery_Method, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getDeliveryMethods", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Delivery_Method{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getDeliveryMethods", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Notification subscribed to. func (r Notification_User_Subscriber_Billing) GetNotification() (resp datatypes.Notification, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getNotification", nil, &r.Options, &resp) @@ -630,12 +1087,60 @@ func (r Notification_User_Subscriber_Billing) GetPreferences() (resp []datatypes return } +func (r Notification_User_Subscriber_Billing) GetPreferencesIter() (resp []datatypes.Notification_User_Subscriber_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure. func (r Notification_User_Subscriber_Billing) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferencesDetails", nil, &r.Options, &resp) return } +func (r Notification_User_Subscriber_Billing) GetPreferencesDetailsIter() (resp []datatypes.Notification_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferencesDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferencesDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The subscriber id to resource id mapping. func (r Notification_User_Subscriber_Billing) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getResourceRecord", nil, &r.Options, &resp) @@ -748,6 +1253,30 @@ func (r Notification_User_Subscriber_Mobile) GetDeliveryMethods() (resp []dataty return } +func (r Notification_User_Subscriber_Mobile) GetDeliveryMethodsIter() (resp []datatypes.Notification_Delivery_Method, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getDeliveryMethods", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Delivery_Method{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getDeliveryMethods", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Notification subscribed to. func (r Notification_User_Subscriber_Mobile) GetNotification() (resp datatypes.Notification, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getNotification", nil, &r.Options, &resp) @@ -766,12 +1295,60 @@ func (r Notification_User_Subscriber_Mobile) GetPreferences() (resp []datatypes. return } +func (r Notification_User_Subscriber_Mobile) GetPreferencesIter() (resp []datatypes.Notification_User_Subscriber_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure. func (r Notification_User_Subscriber_Mobile) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferencesDetails", nil, &r.Options, &resp) return } +func (r Notification_User_Subscriber_Mobile) GetPreferencesDetailsIter() (resp []datatypes.Notification_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferencesDetails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferencesDetails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The subscriber id to resource id mapping. func (r Notification_User_Subscriber_Mobile) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getResourceRecord", nil, &r.Options, &resp) diff --git a/services/product.go b/services/product.go index 006bbd0..f94e726 100644 --- a/services/product.go +++ b/services/product.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -68,24 +69,120 @@ func (r Product_Item) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_E return } +func (r Product_Item) GetActivePresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getActivePresaleEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Sales_Presale_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getActivePresaleEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Active usage based prices. func (r Product_Item) GetActiveUsagePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getActiveUsagePrices", nil, &r.Options, &resp) return } +func (r Product_Item) GetActiveUsagePricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getActiveUsagePrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getActiveUsagePrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The attribute values for a product item. These are additional properties that give extra information about the product being sold. func (r Product_Item) GetAttributes() (resp []datatypes.Product_Item_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getAttributes", nil, &r.Options, &resp) return } +func (r Product_Item) GetAttributesIter() (resp []datatypes.Product_Item_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Attributes that govern when an item may no longer be available. func (r Product_Item) GetAvailabilityAttributes() (resp []datatypes.Product_Item_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getAvailabilityAttributes", nil, &r.Options, &resp) return } +func (r Product_Item) GetAvailabilityAttributesIter() (resp []datatypes.Product_Item_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getAvailabilityAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getAvailabilityAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An item's special billing type, if applicable. func (r Product_Item) GetBillingType() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getBillingType", nil, &r.Options, &resp) @@ -98,12 +195,60 @@ func (r Product_Item) GetBundle() (resp []datatypes.Product_Item_Bundles, err er return } +func (r Product_Item) GetBundleIter() (resp []datatypes.Product_Item_Bundles, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundle", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Bundles{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundle", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An item's included products. Some items have other items included in them that we specifically detail. They are here called Bundled Items. An example is Plesk unlimited. It as a bundled item labeled 'SiteBuilder'. These are the SoftLayer_Product_Item objects. func (r Product_Item) GetBundleItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundleItems", nil, &r.Options, &resp) return } +func (r Product_Item) GetBundleItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundleItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundleItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve When the product capacity is best described as a range, this holds the ceiling of the range. func (r Product_Item) GetCapacityMaximum() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getCapacityMaximum", nil, &r.Options, &resp) @@ -128,18 +273,90 @@ func (r Product_Item) GetCategories() (resp []datatypes.Product_Item_Category, e return } +func (r Product_Item) GetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Some product items have configuration templates which can be used to during provisioning of that product. func (r Product_Item) GetConfigurationTemplates() (resp []datatypes.Configuration_Template, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getConfigurationTemplates", nil, &r.Options, &resp) return } +func (r Product_Item) GetConfigurationTemplatesIter() (resp []datatypes.Configuration_Template, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getConfigurationTemplates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Template{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getConfigurationTemplates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An item's conflicts. For example, McAfee LinuxShield cannot be ordered with Windows. It was not meant for that operating system and as such is a conflict. func (r Product_Item) GetConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getConflicts", nil, &r.Options, &resp) return } +func (r Product_Item) GetConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getConflicts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Resource_Conflict{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getConflicts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This flag indicates that this product is restricted by the number of cores on the compute instance. This is deprecated. Use [[SoftLayer_Product_Item/getCapacityRestrictedProductFlag|getCapacityRestrictedProductFlag]] func (r Product_Item) GetCoreRestrictedItemFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getCoreRestrictedItemFlag", nil, &r.Options, &resp) @@ -158,12 +375,60 @@ func (r Product_Item) GetDowngradeItems() (resp []datatypes.Product_Item, err er return } +func (r Product_Item) GetDowngradeItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getDowngradeItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getDowngradeItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An item's category conflicts. For example, 10 Gbps redundant network functionality cannot be ordered with a secondary GPU and as such is a conflict. func (r Product_Item) GetGlobalCategoryConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getGlobalCategoryConflicts", nil, &r.Options, &resp) return } +func (r Product_Item) GetGlobalCategoryConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getGlobalCategoryConflicts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Resource_Conflict{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getGlobalCategoryConflicts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The generic hardware component that this item represents. func (r Product_Item) GetHardwareGenericComponentModel() (resp datatypes.Hardware_Component_Model_Generic, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getHardwareGenericComponentModel", nil, &r.Options, &resp) @@ -188,6 +453,30 @@ func (r Product_Item) GetInventory() (resp []datatypes.Product_Package_Inventory return } +func (r Product_Item) GetInventoryIter() (resp []datatypes.Product_Package_Inventory, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getInventory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Inventory{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getInventory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Flag to indicate the server product is engineered for a multi-server solution. (Deprecated) func (r Product_Item) GetIsEngineeredServerProduct() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getIsEngineeredServerProduct", nil, &r.Options, &resp) @@ -212,6 +501,30 @@ func (r Product_Item) GetLocationConflicts() (resp []datatypes.Product_Item_Reso return } +func (r Product_Item) GetLocationConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getLocationConflicts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Resource_Conflict{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getLocationConflicts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Indicates whether an item is a M.2 disk controller. func (r Product_Item) GetM2ControllerFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getM2ControllerFlag", nil, &r.Options, &resp) @@ -266,6 +579,30 @@ func (r Product_Item) GetPackages() (resp []datatypes.Product_Package, err error return } +func (r Product_Item) GetPackagesIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getPackages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getPackages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Indicates whether an item is a PCIe drive. func (r Product_Item) GetPcieDriveFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getPcieDriveFlag", nil, &r.Options, &resp) @@ -284,24 +621,120 @@ func (r Product_Item) GetPresaleEvents() (resp []datatypes.Sales_Presale_Event, return } +func (r Product_Item) GetPresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getPresaleEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Sales_Presale_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getPresaleEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A product item's prices. func (r Product_Item) GetPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrices", nil, &r.Options, &resp) return } +func (r Product_Item) GetPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve If an item must be ordered with another item, it will have a requirement item here. func (r Product_Item) GetRequirements() (resp []datatypes.Product_Item_Requirement, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getRequirements", nil, &r.Options, &resp) return } +func (r Product_Item) GetRequirementsIter() (resp []datatypes.Product_Item_Requirement, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getRequirements", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Requirement{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getRequirements", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An item's rules. This includes the requirements and conflicts to resources that an item has. func (r Product_Item) GetRules() (resp []datatypes.Product_Item_Rule, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getRules", nil, &r.Options, &resp) return } +func (r Product_Item) GetRulesIter() (resp []datatypes.Product_Item_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getRules", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getRules", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Software_Description tied to this item. This will only be populated for software items. func (r Product_Item) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getSoftwareDescription", nil, &r.Options, &resp) @@ -332,6 +765,30 @@ func (r Product_Item) GetThirdPartyPolicyAssignments() (resp []datatypes.Product return } +func (r Product_Item) GetThirdPartyPolicyAssignmentsIter() (resp []datatypes.Product_Item_Policy_Assignment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getThirdPartyPolicyAssignments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Policy_Assignment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getThirdPartyPolicyAssignments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The 3rd party vendor for a support subscription item. (Deprecated) func (r Product_Item) GetThirdPartySupportVendor() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getThirdPartySupportVendor", nil, &r.Options, &resp) @@ -368,6 +825,30 @@ func (r Product_Item) GetUpgradeItems() (resp []datatypes.Product_Item, err erro return } +func (r Product_Item) GetUpgradeItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item", "getUpgradeItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item", "getUpgradeItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Product_Item_Category data type contains general category information for prices. type Product_Item_Category struct { Session session.SLSession @@ -414,18 +895,90 @@ func (r Product_Item_Category) GetAdditionalProductsForCategory() (resp []dataty return } +func (r Product_Item_Category) GetAdditionalProductsForCategoryIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getAdditionalProductsForCategory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getAdditionalProductsForCategory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Item_Category) GetBandwidthCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBandwidthCategories", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetBandwidthCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBandwidthCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBandwidthCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing items associated with an account that share a category code with an item category's category code. func (r Product_Item_Category) GetBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBillingItems", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetBillingItemsIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBillingItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBillingItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns a collection of computing categories. These categories are also top level items in a service offering. func (r Product_Item_Category) GetComputingCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { params := []interface{}{ @@ -435,6 +988,33 @@ func (r Product_Item_Category) GetComputingCategories(resetCache *bool) (resp [] return } +func (r Product_Item_Category) GetComputingCategoriesIter(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { + params := []interface{}{ + resetCache, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getComputingCategories", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getComputingCategories", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Item_Category) GetCustomUsageRatesCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { params := []interface{}{ @@ -444,12 +1024,63 @@ func (r Product_Item_Category) GetCustomUsageRatesCategories(resetCache *bool) ( return } +func (r Product_Item_Category) GetCustomUsageRatesCategoriesIter(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { + params := []interface{}{ + resetCache, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getCustomUsageRatesCategories", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getCustomUsageRatesCategories", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Item_Category) GetExternalResourceCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getExternalResourceCategories", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetExternalResourceCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getExternalResourceCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getExternalResourceCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This invoice item's "item category group". func (r Product_Item_Category) GetGroup() (resp datatypes.Product_Item_Category_Group, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getGroup", nil, &r.Options, &resp) @@ -462,6 +1093,30 @@ func (r Product_Item_Category) GetGroups() (resp []datatypes.Product_Package_Ite return } +func (r Product_Item_Category) GetGroupsIter() (resp []datatypes.Product_Package_Item_Category_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Item_Category_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Each product item price must be tied to a category for it to be sold. These categories describe how a particular product item is sold. For example, the 250GB hard drive can be sold as disk0, disk1, ... disk11. There are different prices for this product item depending on which category it is. This keeps down the number of products in total. func (r Product_Item_Category) GetObject() (resp datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getObject", nil, &r.Options, &resp) @@ -477,48 +1132,243 @@ func (r Product_Item_Category) GetObjectStorageCategories(resetCache *bool) (res return } +func (r Product_Item_Category) GetObjectStorageCategoriesIter(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { + params := []interface{}{ + resetCache, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getObjectStorageCategories", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getObjectStorageCategories", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Any unique options associated with an item category. func (r Product_Item_Category) GetOrderOptions() (resp []datatypes.Product_Item_Category_Order_Option_Type, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getOrderOptions", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetOrderOptionsIter() (resp []datatypes.Product_Item_Category_Order_Option_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getOrderOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category_Order_Option_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getOrderOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A list of configuration available in this category.' func (r Product_Item_Category) GetPackageConfigurations() (resp []datatypes.Product_Package_Order_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPackageConfigurations", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetPackageConfigurationsIter() (resp []datatypes.Product_Package_Order_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPackageConfigurations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Order_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPackageConfigurations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A list of preset configurations this category is used in.' func (r Product_Item_Category) GetPresetConfigurations() (resp []datatypes.Product_Package_Preset_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPresetConfigurations", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetPresetConfigurationsIter() (resp []datatypes.Product_Package_Preset_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPresetConfigurations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Preset_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPresetConfigurations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The question references that are associated with an item category. func (r Product_Item_Category) GetQuestionReferences() (resp []datatypes.Product_Item_Category_Question_Xref, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestionReferences", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetQuestionReferencesIter() (resp []datatypes.Product_Item_Category_Question_Xref, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestionReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category_Question_Xref{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestionReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The questions that are associated with an item category. func (r Product_Item_Category) GetQuestions() (resp []datatypes.Product_Item_Category_Question, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestions", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetQuestionsIter() (resp []datatypes.Product_Item_Category_Question, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category_Question{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Item_Category) GetSoftwareCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSoftwareCategories", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetSoftwareCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSoftwareCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSoftwareCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns a list of subnet categories. func (r Product_Item_Category) GetSubnetCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSubnetCategories", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetSubnetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSubnetCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSubnetCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns a collection of computing categories. These categories are also top level items in a service offering. func (r Product_Item_Category) GetTopLevelCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { params := []interface{}{ @@ -528,18 +1378,93 @@ func (r Product_Item_Category) GetTopLevelCategories(resetCache *bool) (resp []d return } +func (r Product_Item_Category) GetTopLevelCategoriesIter(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { + params := []interface{}{ + resetCache, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getTopLevelCategories", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getTopLevelCategories", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns service product categories that can be canceled via API. You can use these categories to find the billing items you wish to cancel. func (r Product_Item_Category) GetValidCancelableServiceItemCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getValidCancelableServiceItemCategories", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetValidCancelableServiceItemCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getValidCancelableServiceItemCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getValidCancelableServiceItemCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Item_Category) GetVlanCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getVlanCategories", nil, &r.Options, &resp) return } +func (r Product_Item_Category) GetVlanCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getVlanCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getVlanCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Product_Item_Category_Group data type contains general category group information. type Product_Item_Category_Group struct { Session session.SLSession @@ -705,12 +1630,60 @@ func (r Product_Item_Price) GetAccountRestrictions() (resp []datatypes.Product_I return } +func (r Product_Item_Price) GetAccountRestrictionsIter() (resp []datatypes.Product_Item_Price_Account_Restriction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAccountRestrictions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price_Account_Restriction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAccountRestrictions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Product_Item_Price) GetAttributes() (resp []datatypes.Product_Item_Price_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAttributes", nil, &r.Options, &resp) return } +func (r Product_Item_Price) GetAttributesIter() (resp []datatypes.Product_Item_Price_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Signifies pricing that is only available on a bare metal reserved capacity order. func (r Product_Item_Price) GetBareMetalReservedCapacityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBareMetalReservedCapacityFlag", nil, &r.Options, &resp) @@ -729,6 +1702,30 @@ func (r Product_Item_Price) GetBundleReferences() (resp []datatypes.Product_Item return } +func (r Product_Item_Price) GetBundleReferencesIter() (resp []datatypes.Product_Item_Bundles, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBundleReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Bundles{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBundleReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The maximum capacity value for which this price is suitable. func (r Product_Item_Price) GetCapacityRestrictionMaximum() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCapacityRestrictionMaximum", nil, &r.Options, &resp) @@ -753,6 +1750,30 @@ func (r Product_Item_Price) GetCategories() (resp []datatypes.Product_Item_Categ return } +func (r Product_Item_Price) GetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Signifies pricing that is only available on a dedicated host virtual server order. func (r Product_Item_Price) GetDedicatedHostInstanceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getDedicatedHostInstanceFlag", nil, &r.Options, &resp) @@ -789,24 +1810,120 @@ func (r Product_Item_Price) GetOrderPremiums() (resp []datatypes.Product_Item_Pr return } +func (r Product_Item_Price) GetOrderPremiumsIter() (resp []datatypes.Product_Item_Price_Premium, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getOrderPremiums", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price_Premium{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getOrderPremiums", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve cross reference for packages func (r Product_Item_Price) GetPackageReferences() (resp []datatypes.Product_Package_Item_Prices, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackageReferences", nil, &r.Options, &resp) return } +func (r Product_Item_Price) GetPackageReferencesIter() (resp []datatypes.Product_Package_Item_Prices, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackageReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Item_Prices{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackageReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A price's packages under which this item is sold. func (r Product_Item_Price) GetPackages() (resp []datatypes.Product_Package, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackages", nil, &r.Options, &resp) return } +func (r Product_Item_Price) GetPackagesIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A list of preset configurations this price is used in.' func (r Product_Item_Price) GetPresetConfigurations() (resp []datatypes.Product_Package_Preset_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPresetConfigurations", nil, &r.Options, &resp) return } +func (r Product_Item_Price) GetPresetConfigurationsIter() (resp []datatypes.Product_Package_Preset_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPresetConfigurations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Preset_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPresetConfigurations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type keyname of this price which can be STANDARD, TIERED, or TERM. func (r Product_Item_Price) GetPriceType() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPriceType", nil, &r.Options, &resp) @@ -841,6 +1958,34 @@ func (r Product_Item_Price) GetUsageRatePrices(location *datatypes.Location, ite return } +func (r Product_Item_Price) GetUsageRatePricesIter(location *datatypes.Location, items []datatypes.Product_Item) (resp []datatypes.Product_Item_Price, err error) { + params := []interface{}{ + location, + items, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getUsageRatePrices", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getUsageRatePrices", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Product_Item_Price_Premium struct { Session session.SLSession @@ -999,6 +2144,35 @@ func (r Product_Order) GetNetworks(locationId *int, packageId *int, accountId *i return } +func (r Product_Order) GetNetworksIter(locationId *int, packageId *int, accountId *int) (resp []datatypes.Container_Product_Order_Network, err error) { + params := []interface{}{ + locationId, + packageId, + accountId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Order", "getNetworks", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Product_Order_Network{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Order", "getNetworks", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // When the account is on an external reseller brand, this service will provide a SoftLayer_Product_Order with the the pricing adjusted by the external reseller. func (r Product_Order) GetResellerOrder(orderContainer *datatypes.Container_Product_Order) (resp datatypes.Container_Product_Order, err error) { params := []interface{}{ @@ -1424,6 +2598,33 @@ func (r Product_Order) RequiredItems(itemPrices []datatypes.Product_Item_Price) return } +func (r Product_Order) RequiredItemsIter(itemPrices []datatypes.Product_Item_Price) (resp []datatypes.Product_Item, err error) { + params := []interface{}{ + itemPrices, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Order", "requiredItems", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Order", "requiredItems", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This service is used to verify that an order meets all the necessary requirements to purchase a server, virtual server or service from SoftLayer. It will verify that the products requested do not conflict. For example, you cannot order a Windows firewall with a Linux operating system. It will also check to make sure you have provided all the products that are required for the [[SoftLayer_Product_Package_Order_Configuration]] associated with the [[SoftLayer_Product_Package]] on each of the [[SoftLayer_Container_Product_Order]] specified.

// // This service returns the same container that was provided, but with additional information that can be used for debugging or validation. It will also contain pricing information (prorated if applicable) for each of the products on the order. If an exception occurs during verification, a container with the SoftLayer_Exception_Order exception type will be specified in the result.

@@ -1487,12 +2688,60 @@ func (r Product_Package) GetAccountRestrictedActivePresets() (resp []datatypes.P return } +func (r Product_Package) GetAccountRestrictedActivePresetsIter() (resp []datatypes.Product_Package_Preset, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedActivePresets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Preset{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedActivePresets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The results from this call are similar to [[SoftLayer_Product_Package/getCategories|getCategories]], but these ONLY include account-restricted prices. Not all accounts have restricted pricing. func (r Product_Package) GetAccountRestrictedCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedCategories", nil, &r.Options, &resp) return } +func (r Product_Package) GetAccountRestrictedCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The flag to indicate if there are any restricted prices in a package for the currently-active account. func (r Product_Package) GetAccountRestrictedPricesFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedPricesFlag", nil, &r.Options, &resp) @@ -1505,6 +2754,30 @@ func (r Product_Package) GetActiveItems() (resp []datatypes.Product_Item, err er return } +func (r Product_Package) GetActiveItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is deprecated and should not be used in production code. // // This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software filtered by an attribute type associated with the package. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information. @@ -1517,12 +2790,63 @@ func (r Product_Package) GetActivePackagesByAttribute(attributeKeyName *string) return } +func (r Product_Package) GetActivePackagesByAttributeIter(attributeKeyName *string) (resp []datatypes.Product_Package, err error) { + params := []interface{}{ + attributeKeyName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePackagesByAttribute", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePackagesByAttribute", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The available preset configurations for this package. func (r Product_Package) GetActivePresets() (resp []datatypes.Product_Package_Preset, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePresets", nil, &r.Options, &resp) return } +func (r Product_Package) GetActivePresetsIter() (resp []datatypes.Product_Package_Preset, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePresets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Preset{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePresets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // [DEPRECATED] This method pulls all the active private hosted cloud packages. This will give you a basic description of the packages that are currently active and from which you can order private hosted cloud configurations. // Deprecated: This function has been marked as deprecated. func (r Product_Package) GetActivePrivateHostedCloudPackages() (resp []datatypes.Product_Package, err error) { @@ -1530,30 +2854,150 @@ func (r Product_Package) GetActivePrivateHostedCloudPackages() (resp []datatypes return } +func (r Product_Package) GetActivePrivateHostedCloudPackagesIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePrivateHostedCloudPackages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePrivateHostedCloudPackages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of valid RAM items available for purchase in this package. func (r Product_Package) GetActiveRamItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveRamItems", nil, &r.Options, &resp) return } +func (r Product_Package) GetActiveRamItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveRamItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveRamItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of valid server items available for purchase in this package. func (r Product_Package) GetActiveServerItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveServerItems", nil, &r.Options, &resp) return } +func (r Product_Package) GetActiveServerItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveServerItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveServerItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of valid software items available for purchase in this package. func (r Product_Package) GetActiveSoftwareItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveSoftwareItems", nil, &r.Options, &resp) return } +func (r Product_Package) GetActiveSoftwareItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveSoftwareItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveSoftwareItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of [[SoftLayer_Product_Item_Price]] objects for pay-as-you-go usage. func (r Product_Package) GetActiveUsagePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsagePrices", nil, &r.Options, &resp) return } +func (r Product_Package) GetActiveUsagePricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsagePrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsagePrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns a collection of active usage rate [[SoftLayer_Product_Item_Price]] objects for the current package and specified datacenter. Optionally you can retrieve the active usage rate prices for a particular [[SoftLayer_Product_Item_Category]] by specifying a category code as the first parameter. This information is useful so that you can see "pay as you go" rates (if any) for the current package, location and optionally category. func (r Product_Package) GetActiveUsageRatePrices(locationId *int, categoryCode *string) (resp []datatypes.Product_Item_Price, err error) { params := []interface{}{ @@ -1564,6 +3008,34 @@ func (r Product_Package) GetActiveUsageRatePrices(locationId *int, categoryCode return } +func (r Product_Package) GetActiveUsageRatePricesIter(locationId *int, categoryCode *string) (resp []datatypes.Product_Item_Price, err error) { + params := []interface{}{ + locationId, + categoryCode, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsageRatePrices", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsageRatePrices", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This flag indicates that the package is an additional service. func (r Product_Package) GetAdditionalServiceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAdditionalServiceFlag", nil, &r.Options, &resp) @@ -1576,18 +3048,90 @@ func (r Product_Package) GetAllObjects() (resp []datatypes.Product_Package, err return } +func (r Product_Package) GetAllObjectsIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Product_Package) GetAttributes() (resp []datatypes.Product_Package_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAttributes", nil, &r.Options, &resp) return } +func (r Product_Package) GetAttributesIter() (resp []datatypes.Product_Package_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of valid locations for this package. (Deprecated - Use [[SoftLayer_Product_Package/getRegions|getRegions]]) func (r Product_Package) GetAvailableLocations() (resp []datatypes.Product_Package_Locations, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableLocations", nil, &r.Options, &resp) return } +func (r Product_Package) GetAvailableLocationsIter() (resp []datatypes.Product_Package_Locations, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Locations{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Package) GetAvailablePackagesForImageTemplate(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Package, err error) { params := []interface{}{ @@ -1597,6 +3141,33 @@ func (r Product_Package) GetAvailablePackagesForImageTemplate(imageTemplate *dat return } +func (r Product_Package) GetAvailablePackagesForImageTemplateIter(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Package, err error) { + params := []interface{}{ + imageTemplate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailablePackagesForImageTemplate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailablePackagesForImageTemplate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The maximum number of available disk storage units associated with the servers in a package. func (r Product_Package) GetAvailableStorageUnits() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableStorageUnits", nil, &r.Options, &resp) @@ -1609,12 +3180,60 @@ func (r Product_Package) GetCategories() (resp []datatypes.Product_Item_Category return } +func (r Product_Package) GetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Package) GetCdnItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getCdnItems", nil, &r.Options, &resp) return } +func (r Product_Package) GetCdnItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getCdnItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getCdnItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Package) GetCloudStorageItems(provider *int) (resp []datatypes.Product_Item, err error) { params := []interface{}{ @@ -1624,12 +3243,63 @@ func (r Product_Package) GetCloudStorageItems(provider *int) (resp []datatypes.P return } +func (r Product_Package) GetCloudStorageItemsIter(provider *int) (resp []datatypes.Product_Item, err error) { + params := []interface{}{ + provider, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getCloudStorageItems", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getCloudStorageItems", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The item categories associated with a package, including information detailing which item categories are required as part of a SoftLayer product order. func (r Product_Package) GetConfiguration() (resp []datatypes.Product_Package_Order_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getConfiguration", nil, &r.Options, &resp) return } +func (r Product_Package) GetConfigurationIter() (resp []datatypes.Product_Package_Order_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getConfiguration", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Order_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getConfiguration", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The default boot category code for the package. func (r Product_Package) GetDefaultBootCategoryCode() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getDefaultBootCategoryCode", nil, &r.Options, &resp) @@ -1642,6 +3312,30 @@ func (r Product_Package) GetDefaultRamItems() (resp []datatypes.Product_Item, er return } +func (r Product_Package) GetDefaultRamItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getDefaultRamItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getDefaultRamItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The node type for a package in a solution deployment. func (r Product_Package) GetDeploymentNodeType() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentNodeType", nil, &r.Options, &resp) @@ -1654,6 +3348,30 @@ func (r Product_Package) GetDeploymentPackages() (resp []datatypes.Product_Packa return } +func (r Product_Package) GetDeploymentPackagesIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentPackages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentPackages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The solution deployment type. func (r Product_Package) GetDeploymentType() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentType", nil, &r.Options, &resp) @@ -1666,6 +3384,30 @@ func (r Product_Package) GetDeployments() (resp []datatypes.Product_Package, err return } +func (r Product_Package) GetDeploymentsIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeployments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeployments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This flag indicates the package does not allow custom disk partitions. func (r Product_Package) GetDisallowCustomDiskPartitions() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getDisallowCustomDiskPartitions", nil, &r.Options, &resp) @@ -1708,30 +3450,150 @@ func (r Product_Package) GetItemAvailabilityTypes() (resp []datatypes.Product_It return } +func (r Product_Package) GetItemAvailabilityTypesIter() (resp []datatypes.Product_Item_Attribute_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemAvailabilityTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Attribute_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemAvailabilityTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The item-item conflicts associated with a package. func (r Product_Package) GetItemConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemConflicts", nil, &r.Options, &resp) return } +func (r Product_Package) GetItemConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemConflicts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Resource_Conflict{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemConflicts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The item-location conflicts associated with a package. func (r Product_Package) GetItemLocationConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemLocationConflicts", nil, &r.Options, &resp) return } +func (r Product_Package) GetItemLocationConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemLocationConflicts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Resource_Conflict{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemLocationConflicts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve cross reference for item prices func (r Product_Package) GetItemPriceReferences() (resp []datatypes.Product_Package_Item_Prices, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPriceReferences", nil, &r.Options, &resp) return } +func (r Product_Package) GetItemPriceReferencesIter() (resp []datatypes.Product_Package_Item_Prices, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPriceReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Item_Prices{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPriceReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of SoftLayer_Product_Item_Prices that are valid for this package. func (r Product_Package) GetItemPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPrices", nil, &r.Options, &resp) return } +func (r Product_Package) GetItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Return a collection of SoftLayer_Item_Price objects from a collection of SoftLayer_Software_Description func (r Product_Package) GetItemPricesFromSoftwareDescriptions(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item_Price, err error) { params := []interface{}{ @@ -1743,12 +3605,65 @@ func (r Product_Package) GetItemPricesFromSoftwareDescriptions(softwareDescripti return } +func (r Product_Package) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item_Price, err error) { + params := []interface{}{ + softwareDescriptions, + includeTranslationsFlag, + returnAllPricesFlag, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of valid items available for purchase in this package. func (r Product_Package) GetItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItems", nil, &r.Options, &resp) return } +func (r Product_Package) GetItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Return a collection of [[SoftLayer_Product_Item]] objects from a [[SoftLayer_Virtual_Guest_Block_Device_Template_Group]] object func (r Product_Package) GetItemsFromImageTemplate(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Item, err error) { params := []interface{}{ @@ -1758,12 +3673,63 @@ func (r Product_Package) GetItemsFromImageTemplate(imageTemplate *datatypes.Virt return } +func (r Product_Package) GetItemsFromImageTemplateIter(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Item, err error) { + params := []interface{}{ + imageTemplate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemsFromImageTemplate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemsFromImageTemplate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A collection of valid locations for this package. (Deprecated - Use [[SoftLayer_Product_Package/getRegions|getRegions]]) func (r Product_Package) GetLocations() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getLocations", nil, &r.Options, &resp) return } +func (r Product_Package) GetLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The lowest server [[SoftLayer_Product_Item_Price]] related to this package. func (r Product_Package) GetLowestServerPrice() (resp datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getLowestServerPrice", nil, &r.Options, &resp) @@ -1782,6 +3748,30 @@ func (r Product_Package) GetMessageQueueItems() (resp []datatypes.Product_Item, return } +func (r Product_Package) GetMessageQueueItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getMessageQueueItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getMessageQueueItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The minimum available network speed associated with the package. func (r Product_Package) GetMinimumPortSpeed() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getMinimumPortSpeed", nil, &r.Options, &resp) @@ -1818,18 +3808,90 @@ func (r Product_Package) GetObjectStorageDatacenters() (resp []datatypes.Contain return } +func (r Product_Package) GetObjectStorageDatacentersIter() (resp []datatypes.Container_Product_Order_Network_Storage_Hub_Datacenter, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Product_Order_Network_Storage_Hub_Datacenter{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return a collection of [[SoftLayer_Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup]] objects which contain a location group and all the associated active usage rate prices where object storage is available. This method is really only applicable to the object storage additional service package which has a [[SoftLayer_Product_Package_Type]] of ”'ADDITIONAL_SERVICES_OBJECT_STORAGE”'. This information is useful so that you can see the "pay as you go" rates per location group. func (r Product_Package) GetObjectStorageLocationGroups() (resp []datatypes.Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageLocationGroups", nil, &r.Options, &resp) return } +func (r Product_Package) GetObjectStorageLocationGroupsIter() (resp []datatypes.Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageLocationGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageLocationGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The premium price modifiers associated with the [[SoftLayer_Product_Item_Price]] and [[SoftLayer_Location]] objects in a package. func (r Product_Package) GetOrderPremiums() (resp []datatypes.Product_Item_Price_Premium, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getOrderPremiums", nil, &r.Options, &resp) return } +func (r Product_Package) GetOrderPremiumsIter() (resp []datatypes.Product_Item_Price_Premium, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getOrderPremiums", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price_Premium{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getOrderPremiums", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This flag indicates if the package may be available in PoP locations in addition to Datacenters. func (r Product_Package) GetPopLocationAvailabilityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getPopLocationAvailabilityFlag", nil, &r.Options, &resp) @@ -1896,12 +3958,60 @@ func (r Product_Package) GetRegions() (resp []datatypes.Location_Region, err err return } +func (r Product_Package) GetRegionsIter() (resp []datatypes.Location_Region, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getRegions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location_Region{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getRegions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This call is similar to [[SoftLayer_Product_Package/getCategories|getCategories]], except that it does not include account-restricted pricing. Not all accounts have restricted pricing. func (r Product_Package) GetStandardCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getStandardCategories", nil, &r.Options, &resp) return } +func (r Product_Package) GetStandardCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package", "getStandardCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package", "getStandardCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The top level category code for this service offering. func (r Product_Package) GetTopLevelItemCategoryCode() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getTopLevelItemCategoryCode", nil, &r.Options, &resp) @@ -1962,6 +4072,30 @@ func (r Product_Package_Preset) GetAllObjects() (resp []datatypes.Product_Packag return } +func (r Product_Package_Preset) GetAllObjectsIter() (resp []datatypes.Product_Package_Preset, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Preset{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Product_Package_Preset) GetAvailableStorageUnits() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getAvailableStorageUnits", nil, &r.Options, &resp) @@ -1980,6 +4114,30 @@ func (r Product_Package_Preset) GetCategories() (resp []datatypes.Product_Item_C return } +func (r Product_Package_Preset) GetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The compute family this configuration belongs to. func (r Product_Package_Preset) GetComputeGroup() (resp datatypes.Product_Item_Server_Group, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getComputeGroup", nil, &r.Options, &resp) @@ -1992,6 +4150,30 @@ func (r Product_Package_Preset) GetConfiguration() (resp []datatypes.Product_Pac return } +func (r Product_Package_Preset) GetConfigurationIter() (resp []datatypes.Product_Package_Preset_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getConfiguration", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Preset_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getConfiguration", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve When true this preset is only allowed to upgrade/downgrade to other presets in the same compute family. func (r Product_Package_Preset) GetDisallowedComputeGroupUpgradeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getDisallowedComputeGroupUpgradeFlag", nil, &r.Options, &resp) @@ -2010,6 +4192,30 @@ func (r Product_Package_Preset) GetLocations() (resp []datatypes.Location, err e return } +func (r Product_Package_Preset) GetLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The lowest server prices related to this package preset. func (r Product_Package_Preset) GetLowestPresetServerPrice() (resp datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getLowestPresetServerPrice", nil, &r.Options, &resp) @@ -2034,18 +4240,90 @@ func (r Product_Package_Preset) GetPackageConfiguration() (resp []datatypes.Prod return } +func (r Product_Package_Preset) GetPackageConfigurationIter() (resp []datatypes.Product_Package_Order_Configuration, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPackageConfiguration", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Order_Configuration{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPackageConfiguration", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The item prices that are included in this package preset configuration. func (r Product_Package_Preset) GetPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPrices", nil, &r.Options, &resp) return } +func (r Product_Package_Preset) GetPricesIter() (resp []datatypes.Product_Item_Price, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPrices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPrices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Describes how all disks in this preset will be configured. func (r Product_Package_Preset) GetStorageGroupTemplateArrays() (resp []datatypes.Configuration_Storage_Group_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getStorageGroupTemplateArrays", nil, &r.Options, &resp) return } +func (r Product_Package_Preset) GetStorageGroupTemplateArraysIter() (resp []datatypes.Configuration_Storage_Group_Template_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getStorageGroupTemplateArrays", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getStorageGroupTemplateArrays", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The starting hourly price for this configuration. Additional options not defined in the preset may increase the cost. func (r Product_Package_Preset) GetTotalMinimumHourlyFee() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getTotalMinimumHourlyFee", nil, &r.Options, &resp) @@ -2104,6 +4382,30 @@ func (r Product_Package_Server) GetAllObjects() (resp []datatypes.Product_Packag return } +func (r Product_Package_Server) GetAllObjectsIter() (resp []datatypes.Product_Package_Server, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Server{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Product_Package_Server) GetCatalog() (resp datatypes.Product_Catalog, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getCatalog", nil, &r.Options, &resp) @@ -2186,6 +4488,30 @@ func (r Product_Package_Server_Option) GetAllOptions() (resp []datatypes.Product return } +func (r Product_Package_Server_Option) GetAllOptionsIter() (resp []datatypes.Product_Package_Server_Option, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getAllOptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Server_Option{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getAllOptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Package_Server_Option) GetObject() (resp datatypes.Product_Package_Server_Option, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getObject", nil, &r.Options, &resp) @@ -2201,6 +4527,33 @@ func (r Product_Package_Server_Option) GetOptions(typ *string) (resp []datatypes return } +func (r Product_Package_Server_Option) GetOptionsIter(typ *string) (resp []datatypes.Product_Package_Server_Option, err error) { + params := []interface{}{ + typ, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getOptions", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Server_Option{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getOptions", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The [[SoftLayer_Product_Package_Type]] object indicates the type for a service offering (package). The type can be used to filter packages. For example, if you are looking for the package representing virtual servers, you can filter on the type's key name of ”'VIRTUAL_SERVER_INSTANCE”'. For bare metal servers by core or CPU, filter on ”'BARE_METAL_CORE”' or ”'BARE_METAL_CPU”', respectively. type Product_Package_Type struct { Session session.SLSession @@ -2247,6 +4600,30 @@ func (r Product_Package_Type) GetAllObjects() (resp []datatypes.Product_Package_ return } +func (r Product_Package_Type) GetAllObjectsIter() (resp []datatypes.Product_Package_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Product_Package_Type) GetObject() (resp datatypes.Product_Package_Type, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getObject", nil, &r.Options, &resp) @@ -2259,6 +4636,30 @@ func (r Product_Package_Type) GetPackages() (resp []datatypes.Product_Package, e return } +func (r Product_Package_Type) GetPackagesIter() (resp []datatypes.Product_Package, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getPackages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Package{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getPackages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Product_Promotion struct { Session session.SLSession diff --git a/services/provisioning.go b/services/provisioning.go index d0861ba..cda79bb 100644 --- a/services/provisioning.go +++ b/services/provisioning.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -150,6 +151,30 @@ func (r Provisioning_Hook_Type) GetAllHookTypes() (resp []datatypes.Provisioning return } +func (r Provisioning_Hook_Type) GetAllHookTypesIter() (resp []datatypes.Provisioning_Hook_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Hook_Type", "getAllHookTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Hook_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Hook_Type", "getAllHookTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Provisioning_Hook_Type) GetObject() (resp datatypes.Provisioning_Hook_Type, err error) { err = r.Session.DoRequest("SoftLayer_Provisioning_Hook_Type", "getObject", nil, &r.Options, &resp) @@ -202,6 +227,30 @@ func (r Provisioning_Maintenance_Classification) GetItemCategories() (resp []dat return } +func (r Provisioning_Maintenance_Classification) GetItemCategoriesIter() (resp []datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getItemCategories", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Maintenance_Classification_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getItemCategories", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve an array of SoftLayer_Provisioning_Maintenance_Classification data types, which contain all maintenance classifications. func (r Provisioning_Maintenance_Classification) GetMaintenanceClassification(maintenanceClassificationId *int) (resp []datatypes.Provisioning_Maintenance_Classification, err error) { params := []interface{}{ @@ -211,12 +260,63 @@ func (r Provisioning_Maintenance_Classification) GetMaintenanceClassification(ma return } +func (r Provisioning_Maintenance_Classification) GetMaintenanceClassificationIter(maintenanceClassificationId *int) (resp []datatypes.Provisioning_Maintenance_Classification, err error) { + params := []interface{}{ + maintenanceClassificationId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassification", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Maintenance_Classification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassification", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve an array of SoftLayer_Provisioning_Maintenance_Classification data types, which contain all maintenance classifications. func (r Provisioning_Maintenance_Classification) GetMaintenanceClassificationsByItemCategory() (resp []datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassificationsByItemCategory", nil, &r.Options, &resp) return } +func (r Provisioning_Maintenance_Classification) GetMaintenanceClassificationsByItemCategoryIter() (resp []datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassificationsByItemCategory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Maintenance_Classification_Item_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassificationsByItemCategory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Provisioning_Maintenance_Classification) GetObject() (resp datatypes.Provisioning_Maintenance_Classification, err error) { err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getObject", nil, &r.Options, &resp) @@ -440,6 +540,30 @@ func (r Provisioning_Maintenance_Window) GetMaintenanceClassifications() (resp [ return } +func (r Provisioning_Maintenance_Window) GetMaintenanceClassificationsIter() (resp []datatypes.Provisioning_Maintenance_Classification, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceClassifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Maintenance_Classification{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceClassifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getMaintenanceStartEndTime() returns a specific maintenance window func (r Provisioning_Maintenance_Window) GetMaintenanceStartEndTime(ticketId *int) (resp datatypes.Provisioning_Maintenance_Window, err error) { params := []interface{}{ @@ -467,6 +591,33 @@ func (r Provisioning_Maintenance_Window) GetMaintenanceWindowTicketsByTicketId(t return } +func (r Provisioning_Maintenance_Window) GetMaintenanceWindowTicketsByTicketIdIter(ticketId *int) (resp []datatypes.Provisioning_Maintenance_Ticket, err error) { + params := []interface{}{ + ticketId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindowTicketsByTicketId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Maintenance_Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindowTicketsByTicketId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns a list of available maintenance windows func (r Provisioning_Maintenance_Window) GetMaintenanceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) { params := []interface{}{ @@ -479,6 +630,36 @@ func (r Provisioning_Maintenance_Window) GetMaintenanceWindows(beginDate *dataty return } +func (r Provisioning_Maintenance_Window) GetMaintenanceWindowsIter(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) { + params := []interface{}{ + beginDate, + endDate, + locationId, + slotsNeeded, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindows", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Maintenance_Window{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindows", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // (DEPRECATED) Use [[SoftLayer_Provisioning_Maintenance_Window::getMaintenanceWindows|getMaintenanceWindows]] method. // Deprecated: This function has been marked as deprecated. func (r Provisioning_Maintenance_Window) GetMaintenceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) { @@ -492,6 +673,36 @@ func (r Provisioning_Maintenance_Window) GetMaintenceWindows(beginDate *datatype return } +func (r Provisioning_Maintenance_Window) GetMaintenceWindowsIter(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) { + params := []interface{}{ + beginDate, + endDate, + locationId, + slotsNeeded, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenceWindows", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Maintenance_Window{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenceWindows", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Provisioning_Version1_Transaction_Group data type contains general information relating to a single SoftLayer hardware transaction group. // // SoftLayer customers are unable to change their hardware transactions or the hardware transaction group. @@ -540,6 +751,30 @@ func (r Provisioning_Version1_Transaction_Group) GetAllObjects() (resp []datatyp return } +func (r Provisioning_Version1_Transaction_Group) GetAllObjectsIter() (resp []datatypes.Provisioning_Version1_Transaction_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Provisioning_Version1_Transaction_Group", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Provisioning_Version1_Transaction_Group", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_Provisioning_Version1_Transaction_Group object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Provisioning_Version1_Transaction_Group service. func (r Provisioning_Version1_Transaction_Group) GetObject() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) { err = r.Session.DoRequest("SoftLayer_Provisioning_Version1_Transaction_Group", "getObject", nil, &r.Options, &resp) diff --git a/services/resource.go b/services/resource.go index c4de181..e7b914a 100644 --- a/services/resource.go +++ b/services/resource.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -126,24 +127,120 @@ func (r Resource_Group) GetAncestorGroups() (resp []datatypes.Resource_Group, er return } +func (r Resource_Group) GetAncestorGroupsIter() (resp []datatypes.Resource_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAncestorGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAncestorGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A resource group's associated attributes. func (r Resource_Group) GetAttributes() (resp []datatypes.Resource_Group_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAttributes", nil, &r.Options, &resp) return } +func (r Resource_Group) GetAttributesIter() (resp []datatypes.Resource_Group_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A resource group's associated hardware members. func (r Resource_Group) GetHardwareMembers() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getHardwareMembers", nil, &r.Options, &resp) return } +func (r Resource_Group) GetHardwareMembersIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getHardwareMembers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getHardwareMembers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A resource group's associated members. func (r Resource_Group) GetMembers() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getMembers", nil, &r.Options, &resp) return } +func (r Resource_Group) GetMembersIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getMembers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getMembers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Resource_Group) GetObject() (resp datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getObject", nil, &r.Options, &resp) @@ -162,6 +259,30 @@ func (r Resource_Group) GetSubnetMembers() (resp []datatypes.Resource_Group_Memb return } +func (r Resource_Group) GetSubnetMembersIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getSubnetMembers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getSubnetMembers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A resource group's associated template. func (r Resource_Group) GetTemplate() (resp datatypes.Resource_Group_Template, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getTemplate", nil, &r.Options, &resp) @@ -174,6 +295,30 @@ func (r Resource_Group) GetVlanMembers() (resp []datatypes.Resource_Group_Member return } +func (r Resource_Group) GetVlanMembersIter() (resp []datatypes.Resource_Group_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getVlanMembers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group", "getVlanMembers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Resource_Group_Template struct { Session session.SLSession @@ -220,18 +365,90 @@ func (r Resource_Group_Template) GetAllObjects() (resp []datatypes.Resource_Grou return } +func (r Resource_Group_Template) GetAllObjectsIter() (resp []datatypes.Resource_Group_Template, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Template{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Resource_Group_Template) GetChildren() (resp []datatypes.Resource_Group_Template, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getChildren", nil, &r.Options, &resp) return } +func (r Resource_Group_Template) GetChildrenIter() (resp []datatypes.Resource_Group_Template, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Template{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Resource_Group_Template) GetMembers() (resp []datatypes.Resource_Group_Template_Member, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getMembers", nil, &r.Options, &resp) return } +func (r Resource_Group_Template) GetMembersIter() (resp []datatypes.Resource_Group_Template_Member, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getMembers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Resource_Group_Template_Member{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getMembers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Resource_Group_Template) GetObject() (resp datatypes.Resource_Group_Template, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getObject", nil, &r.Options, &resp) @@ -290,6 +507,30 @@ func (r Resource_Metadata) GetBackendMacAddresses() (resp []string, err error) { return } +func (r Resource_Metadata) GetBackendMacAddressesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getBackendMacAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getBackendMacAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The getDatacenter method retrieves the name of the datacenter in which the resource is located. func (r Resource_Metadata) GetDatacenter() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getDatacenter", nil, &r.Options, &resp) @@ -314,6 +555,30 @@ func (r Resource_Metadata) GetFrontendMacAddresses() (resp []string, err error) return } +func (r Resource_Metadata) GetFrontendMacAddressesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getFrontendMacAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getFrontendMacAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The getFullyQualifiedDomainName method provides the user with a combined return which includes the hostname and domain for the resource. Because this method returns multiple pieces of information, it avoids the need to use multiple methods to return the desired information. func (r Resource_Metadata) GetFullyQualifiedDomainName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getFullyQualifiedDomainName", nil, &r.Options, &resp) @@ -381,12 +646,60 @@ func (r Resource_Metadata) GetServiceResources() (resp []datatypes.Container_Res return } +func (r Resource_Metadata) GetServiceResourcesIter() (resp []datatypes.Container_Resource_Metadata_ServiceResource, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getServiceResources", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Resource_Metadata_ServiceResource{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getServiceResources", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The getTags method retrieves all tags associated with the resource. Tags are single keywords assigned to a resource that assist the user in identifying the resource and its roles when performing a simple search. Tags are assigned by any user with access to the resource. func (r Resource_Metadata) GetTags() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getTags", nil, &r.Options, &resp) return } +func (r Resource_Metadata) GetTagsIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getTags", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getTags", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The getUserMetadata method retrieves metadata completed by users who interact with the resource. Metadata gathered using this method is unique to parameters set using the ”'setUserMetadata”' method, which must be executed prior to completing this method. User metadata may also be provided while placing an order for a resource. func (r Resource_Metadata) GetUserMetadata() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getUserMetadata", nil, &r.Options, &resp) @@ -402,6 +715,33 @@ func (r Resource_Metadata) GetVlanIds(macAddress *string) (resp []int, err error return } +func (r Resource_Metadata) GetVlanIdsIter(macAddress *string) (resp []int, err error) { + params := []interface{}{ + macAddress, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlanIds", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlanIds", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The getVlans method returns a list of VLAN numbers for the network component matching the provided MAC address associated with the resource. For each return, the native VLAN will appear first, followed by any trunked VLANs associated with the network component. func (r Resource_Metadata) GetVlans(macAddress *string) (resp []int, err error) { params := []interface{}{ @@ -410,3 +750,30 @@ func (r Resource_Metadata) GetVlans(macAddress *string) (resp []int, err error) err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlans", params, &r.Options, &resp) return } + +func (r Resource_Metadata) GetVlansIter(macAddress *string) (resp []int, err error) { + params := []interface{}{ + macAddress, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlans", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlans", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} diff --git a/services/sales.go b/services/sales.go index fc3a899..43c488a 100644 --- a/services/sales.go +++ b/services/sales.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -74,6 +75,30 @@ func (r Sales_Presale_Event) GetAllObjects() (resp []datatypes.Sales_Presale_Eve return } +func (r Sales_Presale_Event) GetAllObjectsIter() (resp []datatypes.Sales_Presale_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Sales_Presale_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A flag to indicate that the presale event is expired. A presale event is expired if the current time is after the end date. func (r Sales_Presale_Event) GetExpiredFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getExpiredFlag", nil, &r.Options, &resp) @@ -103,3 +128,27 @@ func (r Sales_Presale_Event) GetOrders() (resp []datatypes.Billing_Order, err er err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getOrders", nil, &r.Options, &resp) return } + +func (r Sales_Presale_Event) GetOrdersIter() (resp []datatypes.Billing_Order, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getOrders", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Order{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getOrders", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} diff --git a/services/search.go b/services/search.go index 91fc982..cd76998 100644 --- a/services/search.go +++ b/services/search.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -92,6 +93,33 @@ func (r Search) AdvancedSearch(searchString *string) (resp []datatypes.Container return } +func (r Search) AdvancedSearchIter(searchString *string) (resp []datatypes.Container_Search_Result, err error) { + params := []interface{}{ + searchString, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Search", "advancedSearch", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Search_Result{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Search", "advancedSearch", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns a collection of [[SoftLayer_Container_Search_ObjectType]] containers that specify which indexed object types and properties are exposed for the current user. These object types can be used to discover searchable data and to create or validate object index search strings. // // Refer to the [[SoftLayer_Search/search]] and [[SoftLayer_Search/advancedSearch]] methods for information on using object types and properties in search strings. @@ -100,6 +128,30 @@ func (r Search) GetObjectTypes() (resp []datatypes.Container_Search_ObjectType, return } +func (r Search) GetObjectTypesIter() (resp []datatypes.Container_Search_ObjectType, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Search", "getObjectTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Search_ObjectType{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Search", "getObjectTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method allows for searching for SoftLayer resources by simple phrase. It returns a collection or array of [[SoftLayer_Container_Search_Result]] objects that have search metadata for each result and the resulting resource found. // // This method recognizes the special _objectType: quantifier in search strings. This quantifier can be used to restrict a search to specific object types. Example usage: @@ -131,3 +183,30 @@ func (r Search) Search(searchString *string) (resp []datatypes.Container_Search_ err = r.Session.DoRequest("SoftLayer_Search", "search", params, &r.Options, &resp) return } + +func (r Search) SearchIter(searchString *string) (resp []datatypes.Container_Search_Result, err error) { + params := []interface{}{ + searchString, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Search", "search", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Search_Result{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Search", "search", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} diff --git a/services/security.go b/services/security.go index 0ffca50..3fc3107 100644 --- a/services/security.go +++ b/services/security.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -97,6 +98,33 @@ func (r Security_Certificate) FindByCommonName(commonName *string) (resp []datat return } +func (r Security_Certificate) FindByCommonNameIter(commonName *string) (resp []datatypes.Security_Certificate, err error) { + params := []interface{}{ + commonName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Certificate", "findByCommonName", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Certificate{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Certificate", "findByCommonName", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The number of services currently associated with the certificate. func (r Security_Certificate) GetAssociatedServiceCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getAssociatedServiceCount", nil, &r.Options, &resp) @@ -109,12 +137,60 @@ func (r Security_Certificate) GetLbaasListeners() (resp []datatypes.Network_LBaa return } +func (r Security_Certificate) GetLbaasListenersIter() (resp []datatypes.Network_LBaaS_Listener, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLbaasListeners", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_LBaaS_Listener{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLbaasListeners", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The load balancers virtual IP addresses currently associated with the certificate. func (r Security_Certificate) GetLoadBalancerVirtualIpAddresses() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLoadBalancerVirtualIpAddresses", nil, &r.Options, &resp) return } +func (r Security_Certificate) GetLoadBalancerVirtualIpAddressesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLoadBalancerVirtualIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLoadBalancerVirtualIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Security_Certificate) GetObject() (resp datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getObject", nil, &r.Options, &resp) @@ -188,12 +264,63 @@ func (r Security_Certificate_Request) GetAdministratorEmailDomains(commonName *s return } +func (r Security_Certificate_Request) GetAdministratorEmailDomainsIter(commonName *string) (resp []string, err error) { + params := []interface{}{ + commonName, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailDomains", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailDomains", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Gets the email accounts that can be used to validate a certificate to a domain. func (r Security_Certificate_Request) GetAdministratorEmailPrefixes() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailPrefixes", nil, &r.Options, &resp) return } +func (r Security_Certificate_Request) GetAdministratorEmailPrefixesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailPrefixes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailPrefixes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Security_Certificate_Request) GetObject() (resp datatypes.Security_Certificate_Request, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getObject", nil, &r.Options, &resp) @@ -227,6 +354,33 @@ func (r Security_Certificate_Request) GetSslCertificateRequests(accountId *int) return } +func (r Security_Certificate_Request) GetSslCertificateRequestsIter(accountId *int) (resp []datatypes.Security_Certificate_Request, err error) { + params := []interface{}{ + accountId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getSslCertificateRequests", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Certificate_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getSslCertificateRequests", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of a SSL certificate request. func (r Security_Certificate_Request) GetStatus() (resp datatypes.Security_Certificate_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getStatus", nil, &r.Options, &resp) @@ -302,6 +456,30 @@ func (r Security_Certificate_Request_ServerType) GetAllObjects() (resp []datatyp return } +func (r Security_Certificate_Request_ServerType) GetAllObjectsIter() (resp []datatypes.Security_Certificate_Request_ServerType, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_ServerType", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Certificate_Request_ServerType{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_ServerType", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Security_Certificate_Request_ServerType) GetObject() (resp datatypes.Security_Certificate_Request_ServerType, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_ServerType", "getObject", nil, &r.Options, &resp) @@ -360,6 +538,30 @@ func (r Security_Certificate_Request_Status) GetSslRequestStatuses() (resp []dat return } +func (r Security_Certificate_Request_Status) GetSslRequestStatusesIter() (resp []datatypes.Security_Certificate_Request_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_Status", "getSslRequestStatuses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Certificate_Request_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_Status", "getSslRequestStatuses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Security_Ssh_Key struct { Session session.SLSession @@ -436,6 +638,30 @@ func (r Security_Ssh_Key) GetBlockDeviceTemplateGroups() (resp []datatypes.Virtu return } +func (r Security_Ssh_Key) GetBlockDeviceTemplateGroupsIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getBlockDeviceTemplateGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getBlockDeviceTemplateGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Security_Ssh_Key) GetObject() (resp datatypes.Security_Ssh_Key, err error) { err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getObject", nil, &r.Options, &resp) @@ -447,3 +673,27 @@ func (r Security_Ssh_Key) GetSoftwarePasswords() (resp []datatypes.Software_Comp err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getSoftwarePasswords", nil, &r.Options, &resp) return } + +func (r Security_Ssh_Key) GetSoftwarePasswordsIter() (resp []datatypes.Software_Component_Password, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getSoftwarePasswords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getSoftwarePasswords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} diff --git a/services/software.go b/services/software.go index 9a3e3d2..591ba47 100644 --- a/services/software.go +++ b/services/software.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -74,6 +75,30 @@ func (r Software_AccountLicense) GetAllObjects() (resp []datatypes.Software_Acco return } +func (r Software_AccountLicense) GetAllObjectsIter() (resp []datatypes.Software_AccountLicense, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_AccountLicense{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item for a software account license. func (r Software_AccountLicense) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getBillingItem", nil, &r.Options, &resp) @@ -174,12 +199,60 @@ func (r Software_Component) GetPasswordHistory() (resp []datatypes.Software_Comp return } +func (r Software_Component) GetPasswordHistoryIter() (resp []datatypes.Software_Component_Password_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswordHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswordHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Username/Password pairs used for access to this Software Installation. func (r Software_Component) GetPasswords() (resp []datatypes.Software_Component_Password, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswords", nil, &r.Options, &resp) return } +func (r Software_Component) GetPasswordsIter() (resp []datatypes.Software_Component_Password, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Software Description of this Software Component. func (r Software_Component) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component", "getSoftwareDescription", nil, &r.Options, &resp) @@ -280,12 +353,60 @@ func (r Software_Component_AntivirusSpyware) GetPasswordHistory() (resp []dataty return } +func (r Software_Component_AntivirusSpyware) GetPasswordHistoryIter() (resp []datatypes.Software_Component_Password_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswordHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswordHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Username/Password pairs used for access to this Software Installation. func (r Software_Component_AntivirusSpyware) GetPasswords() (resp []datatypes.Software_Component_Password, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswords", nil, &r.Options, &resp) return } +func (r Software_Component_AntivirusSpyware) GetPasswordsIter() (resp []datatypes.Software_Component_Password, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Software Description of this Software Component. func (r Software_Component_AntivirusSpyware) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getSoftwareDescription", nil, &r.Options, &resp) @@ -383,6 +504,30 @@ func (r Software_Component_HostIps) GetCurrentHostIpsPolicies() (resp []datatype return } +func (r Software_Component_HostIps) GetCurrentHostIpsPoliciesIter() (resp []datatypes.Container_Software_Component_HostIps_Policy, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getCurrentHostIpsPolicies", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Software_Component_HostIps_Policy{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getCurrentHostIpsPolicies", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware this Software Component is installed upon. func (r Software_Component_HostIps) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getHardware", nil, &r.Options, &resp) @@ -407,12 +552,60 @@ func (r Software_Component_HostIps) GetPasswordHistory() (resp []datatypes.Softw return } +func (r Software_Component_HostIps) GetPasswordHistoryIter() (resp []datatypes.Software_Component_Password_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswordHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswordHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Username/Password pairs used for access to this Software Installation. func (r Software_Component_HostIps) GetPasswords() (resp []datatypes.Software_Component_Password, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswords", nil, &r.Options, &resp) return } +func (r Software_Component_HostIps) GetPasswordsIter() (resp []datatypes.Software_Component_Password, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Software Description of this Software Component. func (r Software_Component_HostIps) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getSoftwareDescription", nil, &r.Options, &resp) @@ -561,6 +754,30 @@ func (r Software_Component_Password) GetSshKeys() (resp []datatypes.Security_Ssh return } +func (r Software_Component_Password) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This object specifies a specific type of Software Component: An Trellix instance. Trellix installations have specific properties and methods such as SoftLayer_Software_Component_Trellix::updateTrellixPolicy. Defaults are initiated by this object. type Software_Component_Trellix struct { Session session.SLSession @@ -619,6 +836,30 @@ func (r Software_Component_Trellix) GetCurrentHostIpsPolicies() (resp []datatype return } +func (r Software_Component_Trellix) GetCurrentHostIpsPoliciesIter() (resp []datatypes.Container_Software_Component_HostIps_Policy, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getCurrentHostIpsPolicies", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Software_Component_HostIps_Policy{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getCurrentHostIpsPolicies", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware this Software Component is installed upon. func (r Software_Component_Trellix) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getHardware", nil, &r.Options, &resp) @@ -643,12 +884,60 @@ func (r Software_Component_Trellix) GetPasswordHistory() (resp []datatypes.Softw return } +func (r Software_Component_Trellix) GetPasswordHistoryIter() (resp []datatypes.Software_Component_Password_History, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswordHistory", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password_History{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswordHistory", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Username/Password pairs used for access to this Software Installation. func (r Software_Component_Trellix) GetPasswords() (resp []datatypes.Software_Component_Password, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswords", nil, &r.Options, &resp) return } +func (r Software_Component_Trellix) GetPasswordsIter() (resp []datatypes.Software_Component_Password, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component_Password{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Software Description of this Software Component. func (r Software_Component_Trellix) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getSoftwareDescription", nil, &r.Options, &resp) @@ -753,12 +1042,60 @@ func (r Software_Description) GetAllObjects() (resp []datatypes.Software_Descrip return } +func (r Software_Description) GetAllObjectsIter() (resp []datatypes.Software_Description, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Description{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Software_Description) GetAttributes() (resp []datatypes.Software_Description_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getAttributes", nil, &r.Options, &resp) return } +func (r Software_Description) GetAttributesIter() (resp []datatypes.Software_Description_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Description_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The average amount of time that a software description takes to install. func (r Software_Description) GetAverageInstallationDuration() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getAverageInstallationDuration", nil, &r.Options, &resp) @@ -771,24 +1108,120 @@ func (r Software_Description) GetCompatibleSoftwareDescriptions() (resp []dataty return } +func (r Software_Description) GetCompatibleSoftwareDescriptionsIter() (resp []datatypes.Software_Description, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getCompatibleSoftwareDescriptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Description{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getCompatibleSoftwareDescriptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Software_Description) GetCustomerOwnedLicenseDescriptions() (resp []datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getCustomerOwnedLicenseDescriptions", nil, &r.Options, &resp) return } +func (r Software_Description) GetCustomerOwnedLicenseDescriptionsIter() (resp []datatypes.Software_Description, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getCustomerOwnedLicenseDescriptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Description{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getCustomerOwnedLicenseDescriptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The feature attributes of a software description. func (r Software_Description) GetFeatures() (resp []datatypes.Software_Description_Feature, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &r.Options, &resp) return } +func (r Software_Description) GetFeaturesIter() (resp []datatypes.Software_Description_Feature, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Description_Feature{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The latest version of a software description. func (r Software_Description) GetLatestVersion() (resp []datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getLatestVersion", nil, &r.Options, &resp) return } +func (r Software_Description) GetLatestVersionIter() (resp []datatypes.Software_Description, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getLatestVersion", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Description{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getLatestVersion", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Software_Description) GetObject() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getObject", nil, &r.Options, &resp) @@ -801,6 +1234,30 @@ func (r Software_Description) GetProductItems() (resp []datatypes.Product_Item, return } +func (r Software_Description) GetProductItemsIter() (resp []datatypes.Product_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getProductItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getProductItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve This details the provisioning transaction group for this software. This is only valid for Operating System software. func (r Software_Description) GetProvisionTransactionGroup() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getProvisionTransactionGroup", nil, &r.Options, &resp) @@ -825,6 +1282,30 @@ func (r Software_Description) GetSoftwareLicenses() (resp []datatypes.Software_L return } +func (r Software_Description) GetSoftwareLicensesIter() (resp []datatypes.Software_License, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getSoftwareLicenses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_License{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getSoftwareLicenses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A suggestion for an upgrade path from this Software Description func (r Software_Description) GetUpgradeSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getUpgradeSoftwareDescription", nil, &r.Options, &resp) @@ -843,6 +1324,30 @@ func (r Software_Description) GetValidFilesystemTypes() (resp []datatypes.Config return } +func (r Software_Description) GetValidFilesystemTypesIter() (resp []datatypes.Configuration_Storage_Filesystem_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Software_Description", "getValidFilesystemTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Filesystem_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Software_Description", "getValidFilesystemTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // SoftLayer_Software_VirtualLicense is the application class that handles a special type of Software License. Most software licenses are licensed to a specific hardware ID; virtual licenses are designed for virtual machines and therefore are assigned to an IP Address. Not all software packages can be "virtual licensed". type Software_VirtualLicense struct { Session session.SLSession diff --git a/services/survey.go b/services/survey.go index faea144..9cc02ef 100644 --- a/services/survey.go +++ b/services/survey.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -83,6 +84,30 @@ func (r Survey) GetQuestions() (resp []datatypes.Survey_Question, err error) { return } +func (r Survey) GetQuestionsIter() (resp []datatypes.Survey_Question, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Survey", "getQuestions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Survey_Question{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Survey", "getQuestions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The status of the survey func (r Survey) GetStatus() (resp datatypes.Survey_Status, err error) { err = r.Session.DoRequest("SoftLayer_Survey", "getStatus", nil, &r.Options, &resp) diff --git a/services/tag.go b/services/tag.go index bccad6f..7ac6588 100644 --- a/services/tag.go +++ b/services/tag.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -71,6 +72,33 @@ func (r Tag) AutoComplete(tag *string) (resp []datatypes.Tag, err error) { return } +func (r Tag) AutoCompleteIter(tag *string) (resp []datatypes.Tag, err error) { + params := []interface{}{ + tag, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Tag", "autoComplete", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Tag", "autoComplete", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Delete a tag for an object. func (r Tag) DeleteTag(tagName *string) (resp bool, err error) { params := []interface{}{ @@ -92,12 +120,60 @@ func (r Tag) GetAllTagTypes() (resp []datatypes.Tag_Type, err error) { return } +func (r Tag) GetAllTagTypesIter() (resp []datatypes.Tag_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Tag", "getAllTagTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Tag", "getAllTagTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get all tags with at least one reference attached to it for the current account. The total items header for this method contains the total number of attached tags even if a result limit is applied. func (r Tag) GetAttachedTagsForCurrentUser() (resp []datatypes.Tag, err error) { err = r.Session.DoRequest("SoftLayer_Tag", "getAttachedTagsForCurrentUser", nil, &r.Options, &resp) return } +func (r Tag) GetAttachedTagsForCurrentUserIter() (resp []datatypes.Tag, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Tag", "getAttachedTagsForCurrentUser", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Tag", "getAttachedTagsForCurrentUser", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Tag) GetObject() (resp datatypes.Tag, err error) { err = r.Session.DoRequest("SoftLayer_Tag", "getObject", nil, &r.Options, &resp) @@ -110,6 +186,30 @@ func (r Tag) GetReferences() (resp []datatypes.Tag_Reference, err error) { return } +func (r Tag) GetReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Tag", "getReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Tag", "getReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns the Tag object with a given name. The user types in the tag name and this method returns the tag with that name. func (r Tag) GetTagByTagName(tagList *string) (resp []datatypes.Tag, err error) { params := []interface{}{ @@ -119,12 +219,63 @@ func (r Tag) GetTagByTagName(tagList *string) (resp []datatypes.Tag, err error) return } +func (r Tag) GetTagByTagNameIter(tagList *string) (resp []datatypes.Tag, err error) { + params := []interface{}{ + tagList, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Tag", "getTagByTagName", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Tag", "getTagByTagName", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get all tags with no references attached to it for the current account. The total items header for this method contains the total number of unattached tags even if a result limit is applied. func (r Tag) GetUnattachedTagsForCurrentUser() (resp []datatypes.Tag, err error) { err = r.Session.DoRequest("SoftLayer_Tag", "getUnattachedTagsForCurrentUser", nil, &r.Options, &resp) return } +func (r Tag) GetUnattachedTagsForCurrentUserIter() (resp []datatypes.Tag, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Tag", "getUnattachedTagsForCurrentUser", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Tag", "getUnattachedTagsForCurrentUser", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Tag an object by passing in one or more tags separated by a comma. Tag references are cleared out every time this method is called. If your object is already tagged you will need to pass the current tags along with any new ones. To remove all tag references pass an empty string. To remove one or more tags omit them from the tag list. The characters permitted are A-Z, 0-9, whitespace, _ (underscore), - (hypen), . (period), and : (colon). All other characters will be stripped away. You must pass 3 string arguments into this method or you will receive an exception. func (r Tag) SetTags(tags *string, keyName *string, resourceTableId *int) (resp bool, err error) { params := []interface{}{ diff --git a/services/ticket.go b/services/ticket.go index 8d5254c..776eb91 100644 --- a/services/ticket.go +++ b/services/ticket.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -158,6 +159,34 @@ func (r Ticket) AddUpdate(templateObject *datatypes.Ticket_Update, attachedFiles return } +func (r Ticket) AddUpdateIter(templateObject *datatypes.Ticket_Update, attachedFiles []datatypes.Container_Utility_File_Attachment) (resp []datatypes.Ticket_Update, err error) { + params := []interface{}{ + templateObject, + attachedFiles, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "addUpdate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Update{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "addUpdate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Create an administrative support ticket. Use an administrative ticket if you require SoftLayer's assistance managing your server or content. If you are experiencing an issue with SoftLayer's hardware, network, or services then please open a standard support ticket. // // Support tickets may only be created in the open state. The SoftLayer API defaults new ticket properties ”userEditableFlag” to true, ”accountId” to the id of the account that your API user belongs to, and ”statusId” to 1001 (or "open"). You may not assign your new to ticket to users that your API user does not have access to. @@ -294,6 +323,30 @@ func (r Ticket) GetAllTicketGroups() (resp []datatypes.Ticket_Group, err error) return } +func (r Ticket) GetAllTicketGroupsIter() (resp []datatypes.Ticket_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAllTicketGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAllTicketGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getAllTicketStatuses() retrieves a list of all statuses that a ticket may exist in. Ticket status represent the current state of a ticket, usually "open", "assigned", and "closed". // // Every SoftLayer ticket has statusId and status properties that correspond to one of the statuses returned by getAllTicketStatuses(). @@ -302,12 +355,60 @@ func (r Ticket) GetAllTicketStatuses() (resp []datatypes.Ticket_Status, err erro return } +func (r Ticket) GetAllTicketStatusesIter() (resp []datatypes.Ticket_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAllTicketStatuses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAllTicketStatuses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Ticket) GetAssignedAgents() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAssignedAgents", nil, &r.Options, &resp) return } +func (r Ticket) GetAssignedAgentsIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAssignedAgents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAssignedAgents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The portal user that a ticket is assigned to. func (r Ticket) GetAssignedUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAssignedUser", nil, &r.Options, &resp) @@ -320,12 +421,60 @@ func (r Ticket) GetAttachedAdditionalEmails() (resp []datatypes.User_Customer_Ad return } +func (r Ticket) GetAttachedAdditionalEmailsIter() (resp []datatypes.User_Customer_AdditionalEmail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedAdditionalEmails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_AdditionalEmail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedAdditionalEmails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The Dedicated Hosts associated with a ticket. This is used in cases where a ticket is directly associated with one or more Dedicated Hosts. func (r Ticket) GetAttachedDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedDedicatedHosts", nil, &r.Options, &resp) return } +func (r Ticket) GetAttachedDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedDedicatedHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_DedicatedHost{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedDedicatedHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the file attached to a SoftLayer ticket by it's given identifier. To retrieve a list of files attached to a ticket either call the SoftLayer_Ticket::getAttachedFiles method or call SoftLayer_Ticket::getObject with ”attachedFiles” defined in an object mask. func (r Ticket) GetAttachedFile(attachmentId *int) (resp []byte, err error) { params := []interface{}{ @@ -341,12 +490,60 @@ func (r Ticket) GetAttachedFiles() (resp []datatypes.Ticket_Attachment_File, err return } +func (r Ticket) GetAttachedFilesIter() (resp []datatypes.Ticket_Attachment_File, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedFiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Attachment_File{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedFiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware associated with a ticket. This is used in cases where a ticket is directly associated with one or more pieces of hardware. func (r Ticket) GetAttachedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedHardware", nil, &r.Options, &resp) return } +func (r Ticket) GetAttachedHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Ticket) GetAttachedHardwareCount() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedHardwareCount", nil, &r.Options, &resp) @@ -359,12 +556,60 @@ func (r Ticket) GetAttachedResources() (resp []datatypes.Ticket_Attachment, err return } +func (r Ticket) GetAttachedResourcesIter() (resp []datatypes.Ticket_Attachment, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedResources", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Attachment{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedResources", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The virtual guests associated with a ticket. This is used in cases where a ticket is directly associated with one or more virtualized guests installations or Virtual Servers. func (r Ticket) GetAttachedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedVirtualGuests", nil, &r.Options, &resp) return } +func (r Ticket) GetAttachedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Ticket is waiting on a response from a customer flag. func (r Ticket) GetAwaitingUserResponseFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAwaitingUserResponseFlag", nil, &r.Options, &resp) @@ -389,6 +634,30 @@ func (r Ticket) GetEmployeeAttachments() (resp []datatypes.User_Employee, err er return } +func (r Ticket) GetEmployeeAttachmentsIter() (resp []datatypes.User_Employee, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getEmployeeAttachments", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Employee{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getEmployeeAttachments", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A ticket's associated EU compliant record func (r Ticket) GetEuSupportedFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getEuSupportedFlag", nil, &r.Options, &resp) @@ -425,6 +694,30 @@ func (r Ticket) GetInvoiceItems() (resp []datatypes.Billing_Invoice_Item, err er return } +func (r Ticket) GetInvoiceItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getInvoiceItems", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Invoice_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getInvoiceItems", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Ticket) GetLastActivity() (resp datatypes.Ticket_Activity, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getLastActivity", nil, &r.Options, &resp) @@ -467,6 +760,30 @@ func (r Ticket) GetScheduledActions() (resp []datatypes.Provisioning_Version1_Tr return } +func (r Ticket) GetScheduledActionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getScheduledActions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getScheduledActions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The invoice associated with a ticket. Only tickets with an associated administrative charge have an invoice. func (r Ticket) GetServerAdministrationBillingInvoice() (resp datatypes.Billing_Invoice, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getServerAdministrationBillingInvoice", nil, &r.Options, &resp) @@ -491,6 +808,30 @@ func (r Ticket) GetState() (resp []datatypes.Ticket_State, err error) { return } +func (r Ticket) GetStateIter() (resp []datatypes.Ticket_State, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getState", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_State{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getState", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A ticket's status. func (r Ticket) GetStatus() (resp datatypes.Ticket_Status, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getStatus", nil, &r.Options, &resp) @@ -509,6 +850,30 @@ func (r Ticket) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { return } +func (r Ticket) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve all tickets closed since a given date. func (r Ticket) GetTicketsClosedSinceDate(closeDate *datatypes.Time) (resp []datatypes.Ticket, err error) { params := []interface{}{ @@ -518,6 +883,33 @@ func (r Ticket) GetTicketsClosedSinceDate(closeDate *datatypes.Time) (resp []dat return } +func (r Ticket) GetTicketsClosedSinceDateIter(closeDate *datatypes.Time) (resp []datatypes.Ticket, err error) { + params := []interface{}{ + closeDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getTicketsClosedSinceDate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getTicketsClosedSinceDate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether employees' updates of this ticket could be rated by customer func (r Ticket) GetUpdateRatingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getUpdateRatingFlag", nil, &r.Options, &resp) @@ -530,6 +922,30 @@ func (r Ticket) GetUpdates() (resp []datatypes.Ticket_Update, err error) { return } +func (r Ticket) GetUpdatesIter() (resp []datatypes.Ticket_Update, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket", "getUpdates", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Update{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket", "getUpdates", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Mark a ticket as viewed. All currently posted updates will be marked as viewed. The lastViewedDate property will be updated to the current time. func (r Ticket) MarkAsViewed() (err error) { var resp datatypes.Void @@ -658,6 +1074,30 @@ func (r Ticket_Attachment_File) GetExtensionWhitelist() (resp []string, err erro return } +func (r Ticket_Attachment_File) GetExtensionWhitelistIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File", "getExtensionWhitelist", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File", "getExtensionWhitelist", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Ticket_Attachment_File) GetObject() (resp datatypes.Ticket_Attachment_File, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File", "getObject", nil, &r.Options, &resp) @@ -722,6 +1162,30 @@ func (r Ticket_Attachment_File_ServiceNow) GetExtensionWhitelist() (resp []strin return } +func (r Ticket_Attachment_File_ServiceNow) GetExtensionWhitelistIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File_ServiceNow", "getExtensionWhitelist", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File_ServiceNow", "getExtensionWhitelist", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Ticket_Attachment_File_ServiceNow) GetObject() (resp datatypes.Ticket_Attachment_File_ServiceNow, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File_ServiceNow", "getObject", nil, &r.Options, &resp) @@ -786,6 +1250,30 @@ func (r Ticket_Priority) GetPriorities() (resp []datatypes.Container_Ticket_Prio return } +func (r Ticket_Priority) GetPrioritiesIter() (resp []datatypes.Container_Ticket_Priority, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket_Priority", "getPriorities", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Ticket_Priority{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket_Priority", "getPriorities", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The SoftLayer_Ticket_Subject data type models one of the possible subjects that a standard support ticket may belong to. A basic support ticket's title matches it's corresponding subject's name. type Ticket_Subject struct { Session session.SLSession @@ -832,6 +1320,30 @@ func (r Ticket_Subject) GetAllObjects() (resp []datatypes.Ticket_Subject, err er return } +func (r Ticket_Subject) GetAllObjectsIter() (resp []datatypes.Ticket_Subject, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Subject{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Ticket_Subject) GetCategory() (resp datatypes.Ticket_Subject_Category, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getCategory", nil, &r.Options, &resp) @@ -844,6 +1356,30 @@ func (r Ticket_Subject) GetChildren() (resp []datatypes.Ticket_Subject, err erro return } +func (r Ticket_Subject) GetChildrenIter() (resp []datatypes.Ticket_Subject, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Subject{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Ticket_Subject) GetGroup() (resp datatypes.Ticket_Group, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getGroup", nil, &r.Options, &resp) @@ -868,6 +1404,30 @@ func (r Ticket_Subject) GetTopFiveKnowledgeLayerQuestions() (resp []datatypes.Co return } +func (r Ticket_Subject) GetTopFiveKnowledgeLayerQuestionsIter() (resp []datatypes.Container_KnowledgeLayer_QuestionAnswer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getTopFiveKnowledgeLayerQuestions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_KnowledgeLayer_QuestionAnswer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getTopFiveKnowledgeLayerQuestions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // SoftLayer_Ticket_Subject_Category groups ticket subjects into logical group. type Ticket_Subject_Category struct { Session session.SLSession @@ -914,6 +1474,30 @@ func (r Ticket_Subject_Category) GetAllObjects() (resp []datatypes.Ticket_Subjec return } +func (r Ticket_Subject_Category) GetAllObjectsIter() (resp []datatypes.Ticket_Subject_Category, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Subject_Category{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Ticket_Subject_Category) GetObject() (resp datatypes.Ticket_Subject_Category, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getObject", nil, &r.Options, &resp) @@ -926,6 +1510,30 @@ func (r Ticket_Subject_Category) GetSubjects() (resp []datatypes.Ticket_Subject, return } +func (r Ticket_Subject_Category) GetSubjectsIter() (resp []datatypes.Ticket_Subject, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getSubjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket_Subject{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getSubjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet type Ticket_Survey struct { Session session.SLSession diff --git a/services/user.go b/services/user.go index a411f49..81b32bf 100644 --- a/services/user.go +++ b/services/user.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -235,6 +236,34 @@ func (r User_Customer) ChangePreference(preferenceTypeKeyName *string, value *st return } +func (r User_Customer) ChangePreferenceIter(preferenceTypeKeyName *string, value *string) (resp []datatypes.User_Preference, err error) { + params := []interface{}{ + preferenceTypeKeyName, + value, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "changePreference", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "changePreference", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Create a new subscriber for a given resource. func (r User_Customer) CreateNotificationSubscriber(keyName *string, resourceTableId *int) (resp bool, err error) { params := []interface{}{ @@ -327,6 +356,35 @@ func (r User_Customer) FindUserPreference(profileName *string, containerKeyname return } +func (r User_Customer) FindUserPreferenceIter(profileName *string, containerKeyname *string, preferenceKeyname *string) (resp []datatypes.Layout_Profile, err error) { + params := []interface{}{ + profileName, + containerKeyname, + preferenceKeyname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "findUserPreference", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "findUserPreference", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The customer account that a user belongs to. func (r User_Customer) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAccount", nil, &r.Options, &resp) @@ -339,18 +397,90 @@ func (r User_Customer) GetActions() (resp []datatypes.User_Permission_Action, er return } +func (r User_Customer) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getActions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Action{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getActions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The getActiveExternalAuthenticationVendors method will return a list of available external vendors that a SoftLayer user can authenticate against. The list will only contain vendors for which the user has at least one active external binding. func (r User_Customer) GetActiveExternalAuthenticationVendors() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) return } +func (r User_Customer) GetActiveExternalAuthenticationVendorsIter() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_User_Customer_External_Binding_Vendor{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getActiveExternalAuthenticationVendors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's additional email addresses. These email addresses are contacted when updates are made to support tickets. func (r User_Customer) GetAdditionalEmails() (resp []datatypes.User_Customer_AdditionalEmail, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAdditionalEmails", nil, &r.Options, &resp) return } +func (r User_Customer) GetAdditionalEmailsIter() (resp []datatypes.User_Customer_AdditionalEmail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getAdditionalEmails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_AdditionalEmail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getAdditionalEmails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer) GetAgentImpersonationToken() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAgentImpersonationToken", nil, &r.Options, &resp) @@ -363,24 +493,120 @@ func (r User_Customer) GetAllowedDedicatedHostIds() (resp []int, err error) { return } +func (r User_Customer) GetAllowedDedicatedHostIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedDedicatedHostIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedDedicatedHostIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer) GetAllowedHardwareIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedHardwareIds", nil, &r.Options, &resp) return } +func (r User_Customer) GetAllowedHardwareIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedHardwareIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedHardwareIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer) GetAllowedVirtualGuestIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) return } +func (r User_Customer) GetAllowedVirtualGuestIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedVirtualGuestIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's API Authentication keys. There is a max limit of one API key per user. func (r User_Customer) GetApiAuthenticationKeys() (resp []datatypes.User_Customer_ApiAuthentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getApiAuthenticationKeys", nil, &r.Options, &resp) return } +func (r User_Customer) GetApiAuthenticationKeysIter() (resp []datatypes.User_Customer_ApiAuthentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getApiAuthenticationKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_ApiAuthentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getApiAuthenticationKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method generate user authentication token and return [[SoftLayer_Container_User_Authentication_Token]] object which will be used to authenticate user to login to SoftLayer customer portal. func (r User_Customer) GetAuthenticationToken(token *datatypes.Container_User_Authentication_Token) (resp datatypes.Container_User_Authentication_Token, err error) { params := []interface{}{ @@ -396,18 +622,90 @@ func (r User_Customer) GetChildUsers() (resp []datatypes.User_Customer, err erro return } +func (r User_Customer) GetChildUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getChildUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getChildUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An user's associated closed tickets. func (r User_Customer) GetClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getClosedTickets", nil, &r.Options, &resp) return } +func (r User_Customer) GetClosedTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getClosedTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getClosedTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The dedicated hosts to which the user has been granted access. func (r User_Customer) GetDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getDedicatedHosts", nil, &r.Options, &resp) return } +func (r User_Customer) GetDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getDedicatedHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_DedicatedHost{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getDedicatedHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method is not applicable to legacy SoftLayer-authenticated users and can only be invoked for IBMid-authenticated users. func (r User_Customer) GetDefaultAccount(providerType *string) (resp datatypes.Account, err error) { params := []interface{}{ @@ -423,12 +721,60 @@ func (r User_Customer) GetExternalBindings() (resp []datatypes.User_External_Bin return } +func (r User_Customer) GetExternalBindingsIter() (resp []datatypes.User_External_Binding, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getExternalBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getExternalBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's accessible hardware. These permissions control which hardware a user has access to in the SoftLayer customer portal. func (r User_Customer) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardware", nil, &r.Options, &resp) return } +func (r User_Customer) GetHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the number of servers that a portal user has access to. Portal users can have restrictions set to limit services for and to perform actions on hardware. You can set these permissions in the portal by clicking the "administrative" then "user admin" links. func (r User_Customer) GetHardwareCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardwareCount", nil, &r.Options, &resp) @@ -441,6 +787,30 @@ func (r User_Customer) GetHardwareNotifications() (resp []datatypes.User_Custome return } +func (r User_Customer) GetHardwareNotificationsIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardwareNotifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardwareNotifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user has acknowledged the support policy. func (r User_Customer) GetHasAcknowledgedSupportPolicyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getHasAcknowledgedSupportPolicyFlag", nil, &r.Options, &resp) @@ -483,6 +853,30 @@ func (r User_Customer) GetLayoutProfiles() (resp []datatypes.Layout_Profile, err return } +func (r User_Customer) GetLayoutProfilesIter() (resp []datatypes.Layout_Profile, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getLayoutProfiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getLayoutProfiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's locale. Locale holds user's language and region information. func (r User_Customer) GetLocale() (resp datatypes.Locale, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getLocale", nil, &r.Options, &resp) @@ -495,6 +889,30 @@ func (r User_Customer) GetLoginAttempts() (resp []datatypes.User_Customer_Access return } +func (r User_Customer) GetLoginAttemptsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getLoginAttempts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getLoginAttempts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Attempt to authenticate a user to the SoftLayer customer portal using the provided authentication container. Depending on the specific type of authentication container that is used, this API will leverage the appropriate authentication protocol. If authentication is successful then the API returns a list of linked accounts for the user, a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer) GetLoginToken(request *datatypes.Container_Authentication_Request_Contract) (resp datatypes.Container_Authentication_Response_Common, err error) { params := []interface{}{ @@ -513,12 +931,63 @@ func (r User_Customer) GetMappedAccounts(providerType *string) (resp []datatypes return } +func (r User_Customer) GetMappedAccountsIter(providerType *string) (resp []datatypes.Account, err error) { + params := []interface{}{ + providerType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getMappedAccounts", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getMappedAccounts", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Notification subscription records for the user. func (r User_Customer) GetNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getNotificationSubscribers", nil, &r.Options, &resp) return } +func (r User_Customer) GetNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getNotificationSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getNotificationSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_User_Customer object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_User_Customer service. You can only retrieve users that are assigned to the customer account belonging to the user making the API call. func (r User_Customer) GetObject() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getObject", nil, &r.Options, &resp) @@ -537,12 +1006,60 @@ func (r User_Customer) GetOpenTickets() (resp []datatypes.Ticket, err error) { return } +func (r User_Customer) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getOpenTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getOpenTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's vpn accessible subnets. func (r User_Customer) GetOverrides() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getOverrides", nil, &r.Options, &resp) return } +func (r User_Customer) GetOverridesIter() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getOverrides", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Service_Vpn_Overrides{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getOverrides", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's parent user. If a SoftLayer_User_Customer has a null parentId property then it doesn't have a parent user. func (r User_Customer) GetParent() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getParent", nil, &r.Options, &resp) @@ -564,6 +1081,30 @@ func (r User_Customer) GetPermissions() (resp []datatypes.User_Customer_Customer return } +func (r User_Customer) GetPermissionsIter() (resp []datatypes.User_Customer_CustomerPermission_Permission, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getPermissions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_CustomerPermission_Permission{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getPermissions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Attempt to authenticate a username and password to the SoftLayer customer portal. Many portal user accounts are configured to require answering a security question on login. In this case getPortalLoginToken() also verifies the given security question ID and answer. If authentication is successful then the API returns a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer) GetPortalLoginToken(username *string, password *string, securityQuestionId *int, securityQuestionAnswer *string) (resp datatypes.Container_User_Customer_Portal_Token, err error) { params := []interface{}{ @@ -591,12 +1132,60 @@ func (r User_Customer) GetPreferenceTypes() (resp []datatypes.User_Preference_Ty return } +func (r User_Customer) GetPreferenceTypesIter() (resp []datatypes.User_Preference_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferenceTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferenceTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Data type contains a single user preference to a specific preference type. func (r User_Customer) GetPreferences() (resp []datatypes.User_Preference, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferences", nil, &r.Options, &resp) return } +func (r User_Customer) GetPreferencesIter() (resp []datatypes.User_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the authentication requirements for an outstanding password set/reset request. The requirements returned in the same SoftLayer_Container_User_Customer_PasswordSet container which is provided as a parameter into this request. The SoftLayer_Container_User_Customer_PasswordSet::authenticationMethods array will contain an entry for each authentication method required for the user. See SoftLayer_Container_User_Customer_PasswordSet for more details. // // If the user has required authentication methods, then authentication information will be supplied to the SoftLayer_User_Customer::processPasswordSetRequest method within this same SoftLayer_Container_User_Customer_PasswordSet container. All existing information in the container must continue to exist in the container to complete the password set/reset process. @@ -614,24 +1203,120 @@ func (r User_Customer) GetRoles() (resp []datatypes.User_Permission_Role, err er return } +func (r User_Customer) GetRolesIter() (resp []datatypes.User_Permission_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's security question answers. Some portal users may not have security answers or may not be configured to require answering a security question on login. func (r User_Customer) GetSecurityAnswers() (resp []datatypes.User_Customer_Security_Answer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSecurityAnswers", nil, &r.Options, &resp) return } +func (r User_Customer) GetSecurityAnswersIter() (resp []datatypes.User_Customer_Security_Answer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSecurityAnswers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Security_Answer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSecurityAnswers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's notification subscription records. func (r User_Customer) GetSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSubscribers", nil, &r.Options, &resp) return } +func (r User_Customer) GetSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's successful attempts to log into the SoftLayer customer portal. func (r User_Customer) GetSuccessfulLogins() (resp []datatypes.User_Customer_Access_Authentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSuccessfulLogins", nil, &r.Options, &resp) return } +func (r User_Customer) GetSuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSuccessfulLogins", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSuccessfulLogins", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user is required to acknowledge the support policy for portal access. func (r User_Customer) GetSupportPolicyAcknowledgementRequiredFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSupportPolicyAcknowledgementRequiredFlag", nil, &r.Options, &resp) @@ -656,6 +1341,30 @@ func (r User_Customer) GetSupportedLocales() (resp []datatypes.Locale, err error return } +func (r User_Customer) GetSupportedLocalesIter() (resp []datatypes.Locale, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSupportedLocales", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Locale{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSupportedLocales", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user must take a brief survey the next time they log into the SoftLayer customer portal. func (r User_Customer) GetSurveyRequiredFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSurveyRequiredFlag", nil, &r.Options, &resp) @@ -668,12 +1377,60 @@ func (r User_Customer) GetSurveys() (resp []datatypes.Survey, err error) { return } +func (r User_Customer) GetSurveysIter() (resp []datatypes.Survey, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSurveys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Survey{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getSurveys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An user's associated tickets. func (r User_Customer) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getTickets", nil, &r.Options, &resp) return } +func (r User_Customer) GetTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's time zone. func (r User_Customer) GetTimezone() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getTimezone", nil, &r.Options, &resp) @@ -686,6 +1443,30 @@ func (r User_Customer) GetUnsuccessfulLogins() (resp []datatypes.User_Customer_A return } +func (r User_Customer) GetUnsuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getUnsuccessfulLogins", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getUnsuccessfulLogins", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a user id using a password token provided to the user in an email generated by the SoftLayer_User_Customer::initiatePortalPasswordChange request. Password recovery keys are valid for 24 hours after they're generated. // // When a new user is created or when a user has requested a password change using initiatePortalPasswordChange, they will have received an email that contains a url with a token. That token is used as the parameter for getUserIdForPasswordSet. Once the user id is known, then the SoftLayer_User_Customer object can be retrieved which is necessary to complete the process to set or reset a user's password. @@ -703,6 +1484,30 @@ func (r User_Customer) GetUserLinks() (resp []datatypes.User_Customer_Link, err return } +func (r User_Customer) GetUserLinksIter() (resp []datatypes.User_Customer_Link, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserLinks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Link{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserLinks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer) GetUserPreferences(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { params := []interface{}{ @@ -713,6 +1518,34 @@ func (r User_Customer) GetUserPreferences(profileName *string, containerKeyname return } +func (r User_Customer) GetUserPreferencesIter(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { + params := []interface{}{ + profileName, + containerKeyname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserPreferences", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserPreferences", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's status, which controls overall access to the SoftLayer customer portal and VPN access to the private network. func (r User_Customer) GetUserStatus() (resp datatypes.User_Customer_Status, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserStatus", nil, &r.Options, &resp) @@ -731,6 +1564,30 @@ func (r User_Customer) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err e return } +func (r User_Customer) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer) InTerminalStatus() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "inTerminalStatus", nil, &r.Options, &resp) @@ -1267,6 +2124,30 @@ func (r User_Customer_CustomerPermission_Permission) GetAllObjects() (resp []dat return } +func (r User_Customer_CustomerPermission_Permission) GetAllObjectsIter() (resp []datatypes.User_Customer_CustomerPermission_Permission, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_CustomerPermission_Permission", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_CustomerPermission_Permission{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_CustomerPermission_Permission", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_User_Customer_CustomerPermission_Permission object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_User_Customer_CustomerPermission_Permission service. func (r User_Customer_CustomerPermission_Permission) GetObject() (resp datatypes.User_Customer_CustomerPermission_Permission, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_CustomerPermission_Permission", "getObject", nil, &r.Options, &resp) @@ -1348,6 +2229,30 @@ func (r User_Customer_External_Binding) GetAttributes() (resp []datatypes.User_E return } +func (r User_Customer_External_Binding) GetAttributesIter() (resp []datatypes.User_External_Binding_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the billing item for external authentication. func (r User_Customer_External_Binding) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding", "getBillingItem", nil, &r.Options, &resp) @@ -1494,6 +2399,30 @@ func (r User_Customer_External_Binding_Totp) GetAttributes() (resp []datatypes.U return } +func (r User_Customer_External_Binding_Totp) GetAttributesIter() (resp []datatypes.User_External_Binding_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Totp", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Totp", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the billing item for external authentication. func (r User_Customer_External_Binding_Totp) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Totp", "getBillingItem", nil, &r.Options, &resp) @@ -1585,6 +2514,30 @@ func (r User_Customer_External_Binding_Vendor) GetAllObjects() (resp []datatypes return } +func (r User_Customer_External_Binding_Vendor) GetAllObjectsIter() (resp []datatypes.User_External_Binding_Vendor, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Vendor", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding_Vendor{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Vendor", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_External_Binding_Vendor) GetObject() (resp datatypes.User_Customer_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Vendor", "getObject", nil, &r.Options, &resp) @@ -1685,6 +2638,30 @@ func (r User_Customer_External_Binding_Verisign) GetAttributes() (resp []datatyp return } +func (r User_Customer_External_Binding_Verisign) GetAttributesIter() (resp []datatypes.User_External_Binding_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Verisign", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Verisign", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the billing item for external authentication. func (r User_Customer_External_Binding_Verisign) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Verisign", "getBillingItem", nil, &r.Options, &resp) @@ -1883,6 +2860,33 @@ func (r User_Customer_Notification_Hardware) CreateObjects(templateObjects []dat return } +func (r User_Customer_Notification_Hardware) CreateObjectsIter(templateObjects []datatypes.User_Customer_Notification_Hardware) (resp []datatypes.User_Customer_Notification_Hardware, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Like any other API object, the customer notification objects can be deleted by passing an instance of them into this function. The ID on the object must be set. func (r User_Customer_Notification_Hardware) DeleteObjects(templateObjects []datatypes.User_Customer_Notification_Hardware) (resp bool, err error) { params := []interface{}{ @@ -1903,6 +2907,33 @@ func (r User_Customer_Notification_Hardware) FindByHardwareId(hardwareId *int) ( return } +func (r User_Customer_Notification_Hardware) FindByHardwareIdIter(hardwareId *int) (resp []datatypes.User_Customer_Notification_Hardware, err error) { + params := []interface{}{ + hardwareId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "findByHardwareId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "findByHardwareId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The hardware object that will be monitored. func (r User_Customer_Notification_Hardware) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "getHardware", nil, &r.Options, &resp) @@ -1979,6 +3010,33 @@ func (r User_Customer_Notification_Virtual_Guest) CreateObjects(templateObjects return } +func (r User_Customer_Notification_Virtual_Guest) CreateObjectsIter(templateObjects []datatypes.User_Customer_Notification_Virtual_Guest) (resp []datatypes.User_Customer_Notification_Virtual_Guest, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Like any other API object, the customer notification objects can be deleted by passing an instance of them into this function. The ID on the object must be set. func (r User_Customer_Notification_Virtual_Guest) DeleteObjects(templateObjects []datatypes.User_Customer_Notification_Virtual_Guest) (resp bool, err error) { params := []interface{}{ @@ -1999,6 +3057,33 @@ func (r User_Customer_Notification_Virtual_Guest) FindByGuestId(id *int) (resp [ return } +func (r User_Customer_Notification_Virtual_Guest) FindByGuestIdIter(id *int) (resp []datatypes.User_Customer_Notification_Virtual_Guest, err error) { + params := []interface{}{ + id, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "findByGuestId", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "findByGuestId", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The virtual guest object that will be monitored. func (r User_Customer_Notification_Virtual_Guest) GetGuest() (resp datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "getGuest", nil, &r.Options, &resp) @@ -2242,6 +3327,34 @@ func (r User_Customer_OpenIdConnect) ChangePreference(preferenceTypeKeyName *str return } +func (r User_Customer_OpenIdConnect) ChangePreferenceIter(preferenceTypeKeyName *string, value *string) (resp []datatypes.User_Preference, err error) { + params := []interface{}{ + preferenceTypeKeyName, + value, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "changePreference", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "changePreference", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect) CompleteInvitationAfterLogin(providerType *string, accessToken *string, emailRegistrationCode *string) (err error) { var resp datatypes.Void @@ -2370,6 +3483,35 @@ func (r User_Customer_OpenIdConnect) FindUserPreference(profileName *string, con return } +func (r User_Customer_OpenIdConnect) FindUserPreferenceIter(profileName *string, containerKeyname *string, preferenceKeyname *string) (resp []datatypes.Layout_Profile, err error) { + params := []interface{}{ + profileName, + containerKeyname, + preferenceKeyname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "findUserPreference", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "findUserPreference", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The customer account that a user belongs to. func (r User_Customer_OpenIdConnect) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAccount", nil, &r.Options, &resp) @@ -2382,18 +3524,90 @@ func (r User_Customer_OpenIdConnect) GetActions() (resp []datatypes.User_Permiss return } +func (r User_Customer_OpenIdConnect) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Action{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The getActiveExternalAuthenticationVendors method will return a list of available external vendors that a SoftLayer user can authenticate against. The list will only contain vendors for which the user has at least one active external binding. func (r User_Customer_OpenIdConnect) GetActiveExternalAuthenticationVendors() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetActiveExternalAuthenticationVendorsIter() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_User_Customer_External_Binding_Vendor{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActiveExternalAuthenticationVendors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's additional email addresses. These email addresses are contacted when updates are made to support tickets. func (r User_Customer_OpenIdConnect) GetAdditionalEmails() (resp []datatypes.User_Customer_AdditionalEmail, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAdditionalEmails", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetAdditionalEmailsIter() (resp []datatypes.User_Customer_AdditionalEmail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAdditionalEmails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_AdditionalEmail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAdditionalEmails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect) GetAgentImpersonationToken() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAgentImpersonationToken", nil, &r.Options, &resp) @@ -2406,24 +3620,120 @@ func (r User_Customer_OpenIdConnect) GetAllowedDedicatedHostIds() (resp []int, e return } +func (r User_Customer_OpenIdConnect) GetAllowedDedicatedHostIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedDedicatedHostIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedDedicatedHostIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect) GetAllowedHardwareIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedHardwareIds", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetAllowedHardwareIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedHardwareIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedHardwareIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect) GetAllowedVirtualGuestIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetAllowedVirtualGuestIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedVirtualGuestIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's API Authentication keys. There is a max limit of one API key per user. func (r User_Customer_OpenIdConnect) GetApiAuthenticationKeys() (resp []datatypes.User_Customer_ApiAuthentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getApiAuthenticationKeys", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetApiAuthenticationKeysIter() (resp []datatypes.User_Customer_ApiAuthentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getApiAuthenticationKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_ApiAuthentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getApiAuthenticationKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method generate user authentication token and return [[SoftLayer_Container_User_Authentication_Token]] object which will be used to authenticate user to login to SoftLayer customer portal. func (r User_Customer_OpenIdConnect) GetAuthenticationToken(token *datatypes.Container_User_Authentication_Token) (resp datatypes.Container_User_Authentication_Token, err error) { params := []interface{}{ @@ -2439,18 +3749,90 @@ func (r User_Customer_OpenIdConnect) GetChildUsers() (resp []datatypes.User_Cust return } +func (r User_Customer_OpenIdConnect) GetChildUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getChildUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getChildUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An user's associated closed tickets. func (r User_Customer_OpenIdConnect) GetClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getClosedTickets", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetClosedTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getClosedTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getClosedTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The dedicated hosts to which the user has been granted access. func (r User_Customer_OpenIdConnect) GetDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getDedicatedHosts", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getDedicatedHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_DedicatedHost{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getDedicatedHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This API gets the account associated with the default user for the OpenIdConnect identity that is linked to the current active SoftLayer user identity. When a single active user is found for that IAMid, it becomes the default user and the associated account is returned. When multiple default users are found only the first is preserved and the associated account is returned (remaining defaults see their default flag unset). If the current SoftLayer user identity isn't linked to any OpenIdConnect identity, or if none of the linked users were found as defaults, the API returns null. Invoke this only on IAMid-authenticated users. func (r User_Customer_OpenIdConnect) GetDefaultAccount(providerType *string) (resp datatypes.Account, err error) { params := []interface{}{ @@ -2466,12 +3848,60 @@ func (r User_Customer_OpenIdConnect) GetExternalBindings() (resp []datatypes.Use return } +func (r User_Customer_OpenIdConnect) GetExternalBindingsIter() (resp []datatypes.User_External_Binding, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getExternalBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getExternalBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's accessible hardware. These permissions control which hardware a user has access to in the SoftLayer customer portal. func (r User_Customer_OpenIdConnect) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardware", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the number of servers that a portal user has access to. Portal users can have restrictions set to limit services for and to perform actions on hardware. You can set these permissions in the portal by clicking the "administrative" then "user admin" links. func (r User_Customer_OpenIdConnect) GetHardwareCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardwareCount", nil, &r.Options, &resp) @@ -2484,6 +3914,30 @@ func (r User_Customer_OpenIdConnect) GetHardwareNotifications() (resp []datatype return } +func (r User_Customer_OpenIdConnect) GetHardwareNotificationsIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardwareNotifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardwareNotifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user has acknowledged the support policy. func (r User_Customer_OpenIdConnect) GetHasAcknowledgedSupportPolicyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHasAcknowledgedSupportPolicyFlag", nil, &r.Options, &resp) @@ -2526,6 +3980,30 @@ func (r User_Customer_OpenIdConnect) GetLayoutProfiles() (resp []datatypes.Layou return } +func (r User_Customer_OpenIdConnect) GetLayoutProfilesIter() (resp []datatypes.Layout_Profile, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLayoutProfiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLayoutProfiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's locale. Locale holds user's language and region information. func (r User_Customer_OpenIdConnect) GetLocale() (resp datatypes.Locale, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLocale", nil, &r.Options, &resp) @@ -2548,6 +4026,30 @@ func (r User_Customer_OpenIdConnect) GetLoginAttempts() (resp []datatypes.User_C return } +func (r User_Customer_OpenIdConnect) GetLoginAttemptsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLoginAttempts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLoginAttempts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Attempt to authenticate a user to the SoftLayer customer portal using the provided authentication container. Depending on the specific type of authentication container that is used, this API will leverage the appropriate authentication protocol. If authentication is successful then the API returns a list of linked accounts for the user, a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer_OpenIdConnect) GetLoginToken(request *datatypes.Container_Authentication_Request_Contract) (resp datatypes.Container_Authentication_Response_Common, err error) { params := []interface{}{ @@ -2566,12 +4068,63 @@ func (r User_Customer_OpenIdConnect) GetMappedAccounts(providerType *string) (re return } +func (r User_Customer_OpenIdConnect) GetMappedAccountsIter(providerType *string) (resp []datatypes.Account, err error) { + params := []interface{}{ + providerType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getMappedAccounts", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getMappedAccounts", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Notification subscription records for the user. func (r User_Customer_OpenIdConnect) GetNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getNotificationSubscribers", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getNotificationSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getNotificationSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect) GetObject() (resp datatypes.User_Customer_OpenIdConnect, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getObject", nil, &r.Options, &resp) @@ -2600,12 +4153,60 @@ func (r User_Customer_OpenIdConnect) GetOpenTickets() (resp []datatypes.Ticket, return } +func (r User_Customer_OpenIdConnect) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOpenTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOpenTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's vpn accessible subnets. func (r User_Customer_OpenIdConnect) GetOverrides() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOverrides", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetOverridesIter() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOverrides", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Service_Vpn_Overrides{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOverrides", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's parent user. If a SoftLayer_User_Customer has a null parentId property then it doesn't have a parent user. func (r User_Customer_OpenIdConnect) GetParent() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getParent", nil, &r.Options, &resp) @@ -2627,6 +4228,30 @@ func (r User_Customer_OpenIdConnect) GetPermissions() (resp []datatypes.User_Cus return } +func (r User_Customer_OpenIdConnect) GetPermissionsIter() (resp []datatypes.User_Customer_CustomerPermission_Permission, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPermissions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_CustomerPermission_Permission{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPermissions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Attempt to authenticate a username and password to the SoftLayer customer portal. Many portal user accounts are configured to require answering a security question on login. In this case getPortalLoginToken() also verifies the given security question ID and answer. If authentication is successful then the API returns a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer_OpenIdConnect) GetPortalLoginToken(username *string, password *string, securityQuestionId *int, securityQuestionAnswer *string) (resp datatypes.Container_User_Customer_Portal_Token, err error) { params := []interface{}{ @@ -2668,12 +4293,60 @@ func (r User_Customer_OpenIdConnect) GetPreferenceTypes() (resp []datatypes.User return } +func (r User_Customer_OpenIdConnect) GetPreferenceTypesIter() (resp []datatypes.User_Preference_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferenceTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferenceTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Data type contains a single user preference to a specific preference type. func (r User_Customer_OpenIdConnect) GetPreferences() (resp []datatypes.User_Preference, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferences", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetPreferencesIter() (resp []datatypes.User_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the authentication requirements for an outstanding password set/reset request. The requirements returned in the same SoftLayer_Container_User_Customer_PasswordSet container which is provided as a parameter into this request. The SoftLayer_Container_User_Customer_PasswordSet::authenticationMethods array will contain an entry for each authentication method required for the user. See SoftLayer_Container_User_Customer_PasswordSet for more details. // // If the user has required authentication methods, then authentication information will be supplied to the SoftLayer_User_Customer::processPasswordSetRequest method within this same SoftLayer_Container_User_Customer_PasswordSet container. All existing information in the container must continue to exist in the container to complete the password set/reset process. @@ -2691,24 +4364,120 @@ func (r User_Customer_OpenIdConnect) GetRoles() (resp []datatypes.User_Permissio return } +func (r User_Customer_OpenIdConnect) GetRolesIter() (resp []datatypes.User_Permission_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's security question answers. Some portal users may not have security answers or may not be configured to require answering a security question on login. func (r User_Customer_OpenIdConnect) GetSecurityAnswers() (resp []datatypes.User_Customer_Security_Answer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSecurityAnswers", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetSecurityAnswersIter() (resp []datatypes.User_Customer_Security_Answer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSecurityAnswers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Security_Answer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSecurityAnswers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's notification subscription records. func (r User_Customer_OpenIdConnect) GetSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSubscribers", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's successful attempts to log into the SoftLayer customer portal. func (r User_Customer_OpenIdConnect) GetSuccessfulLogins() (resp []datatypes.User_Customer_Access_Authentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSuccessfulLogins", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetSuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSuccessfulLogins", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSuccessfulLogins", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user is required to acknowledge the support policy for portal access. func (r User_Customer_OpenIdConnect) GetSupportPolicyAcknowledgementRequiredFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSupportPolicyAcknowledgementRequiredFlag", nil, &r.Options, &resp) @@ -2733,6 +4502,30 @@ func (r User_Customer_OpenIdConnect) GetSupportedLocales() (resp []datatypes.Loc return } +func (r User_Customer_OpenIdConnect) GetSupportedLocalesIter() (resp []datatypes.Locale, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSupportedLocales", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Locale{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSupportedLocales", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user must take a brief survey the next time they log into the SoftLayer customer portal. func (r User_Customer_OpenIdConnect) GetSurveyRequiredFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSurveyRequiredFlag", nil, &r.Options, &resp) @@ -2745,12 +4538,60 @@ func (r User_Customer_OpenIdConnect) GetSurveys() (resp []datatypes.Survey, err return } +func (r User_Customer_OpenIdConnect) GetSurveysIter() (resp []datatypes.Survey, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSurveys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Survey{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSurveys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An user's associated tickets. func (r User_Customer_OpenIdConnect) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getTickets", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect) GetTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's time zone. func (r User_Customer_OpenIdConnect) GetTimezone() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getTimezone", nil, &r.Options, &resp) @@ -2763,6 +4604,30 @@ func (r User_Customer_OpenIdConnect) GetUnsuccessfulLogins() (resp []datatypes.U return } +func (r User_Customer_OpenIdConnect) GetUnsuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUnsuccessfulLogins", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUnsuccessfulLogins", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns an IMS User Object from the provided OpenIdConnect User ID or IBMid Unique Identifier for the Account of the active user. Enforces the User Management permissions for the Active User. An exception will be thrown if no matching IMS User is found. NOTE that providing IBMid Unique Identifier is optional, but it will be preferred over OpenIdConnect User ID if provided. func (r User_Customer_OpenIdConnect) GetUserForUnifiedInvitation(openIdConnectUserId *string, uniqueIdentifier *string, searchInvitationsNotLinksFlag *string, accountId *string) (resp datatypes.User_Customer_OpenIdConnect, err error) { params := []interface{}{ @@ -2792,6 +4657,30 @@ func (r User_Customer_OpenIdConnect) GetUserLinks() (resp []datatypes.User_Custo return } +func (r User_Customer_OpenIdConnect) GetUserLinksIter() (resp []datatypes.User_Customer_Link, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserLinks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Link{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserLinks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect) GetUserPreferences(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { params := []interface{}{ @@ -2802,6 +4691,34 @@ func (r User_Customer_OpenIdConnect) GetUserPreferences(profileName *string, con return } +func (r User_Customer_OpenIdConnect) GetUserPreferencesIter(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { + params := []interface{}{ + profileName, + containerKeyname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserPreferences", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserPreferences", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's status, which controls overall access to the SoftLayer customer portal and VPN access to the private network. func (r User_Customer_OpenIdConnect) GetUserStatus() (resp datatypes.User_Customer_Status, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserStatus", nil, &r.Options, &resp) @@ -2820,6 +4737,30 @@ func (r User_Customer_OpenIdConnect) GetVirtualGuests() (resp []datatypes.Virtua return } +func (r User_Customer_OpenIdConnect) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect) InTerminalStatus() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "inTerminalStatus", nil, &r.Options, &resp) @@ -3473,6 +5414,34 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) ChangePreference(preferenceT return } +func (r User_Customer_OpenIdConnect_TrustedProfile) ChangePreferenceIter(preferenceTypeKeyName *string, value *string) (resp []datatypes.User_Preference, err error) { + params := []interface{}{ + preferenceTypeKeyName, + value, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "changePreference", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "changePreference", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) CompleteInvitationAfterLogin(providerType *string, accessToken *string, emailRegistrationCode *string) (err error) { var resp datatypes.Void @@ -3579,6 +5548,35 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) FindUserPreference(profileNa return } +func (r User_Customer_OpenIdConnect_TrustedProfile) FindUserPreferenceIter(profileName *string, containerKeyname *string, preferenceKeyname *string) (resp []datatypes.Layout_Profile, err error) { + params := []interface{}{ + profileName, + containerKeyname, + preferenceKeyname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "findUserPreference", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "findUserPreference", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The customer account that a user belongs to. func (r User_Customer_OpenIdConnect_TrustedProfile) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAccount", nil, &r.Options, &resp) @@ -3591,27 +5589,123 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetActions() (resp []datatyp return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Action{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // The getActiveExternalAuthenticationVendors method will return a list of available external vendors that a SoftLayer user can authenticate against. The list will only contain vendors for which the user has at least one active external binding. func (r User_Customer_OpenIdConnect_TrustedProfile) GetActiveExternalAuthenticationVendors() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetActiveExternalAuthenticationVendorsIter() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_User_Customer_External_Binding_Vendor{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActiveExternalAuthenticationVendors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's additional email addresses. These email addresses are contacted when updates are made to support tickets. func (r User_Customer_OpenIdConnect_TrustedProfile) GetAdditionalEmails() (resp []datatypes.User_Customer_AdditionalEmail, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAdditionalEmails", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetAdditionalEmailsIter() (resp []datatypes.User_Customer_AdditionalEmail, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAdditionalEmails", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_AdditionalEmail{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAdditionalEmails", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) GetAgentImpersonationToken() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAgentImpersonationToken", nil, &r.Options, &resp) return } -// no documentation yet -func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedDedicatedHostIds() (resp []int, err error) { +// no documentation yet +func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedDedicatedHostIds() (resp []int, err error) { + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedDedicatedHostIds", nil, &r.Options, &resp) + return +} + +func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedDedicatedHostIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedDedicatedHostIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedDedicatedHostIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -3621,18 +5715,90 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedHardwareIds() (res return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedHardwareIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedHardwareIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedHardwareIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedVirtualGuestIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedVirtualGuestIdsIter() (resp []int, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []int{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedVirtualGuestIds", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's API Authentication keys. There is a max limit of one API key per user. func (r User_Customer_OpenIdConnect_TrustedProfile) GetApiAuthenticationKeys() (resp []datatypes.User_Customer_ApiAuthentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getApiAuthenticationKeys", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetApiAuthenticationKeysIter() (resp []datatypes.User_Customer_ApiAuthentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getApiAuthenticationKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_ApiAuthentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getApiAuthenticationKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method generate user authentication token and return [[SoftLayer_Container_User_Authentication_Token]] object which will be used to authenticate user to login to SoftLayer customer portal. func (r User_Customer_OpenIdConnect_TrustedProfile) GetAuthenticationToken(token *datatypes.Container_User_Authentication_Token) (resp datatypes.Container_User_Authentication_Token, err error) { params := []interface{}{ @@ -3648,18 +5814,90 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetChildUsers() (resp []data return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetChildUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getChildUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getChildUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An user's associated closed tickets. func (r User_Customer_OpenIdConnect_TrustedProfile) GetClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getClosedTickets", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetClosedTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getClosedTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getClosedTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The dedicated hosts to which the user has been granted access. func (r User_Customer_OpenIdConnect_TrustedProfile) GetDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getDedicatedHosts", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getDedicatedHosts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_DedicatedHost{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getDedicatedHosts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This API gets the account associated with the default user for the OpenIdConnect identity that is linked to the current active SoftLayer user identity. When a single active user is found for that IAMid, it becomes the default user and the associated account is returned. When multiple default users are found only the first is preserved and the associated account is returned (remaining defaults see their default flag unset). If the current SoftLayer user identity isn't linked to any OpenIdConnect identity, or if none of the linked users were found as defaults, the API returns null. Invoke this only on IAMid-authenticated users. func (r User_Customer_OpenIdConnect_TrustedProfile) GetDefaultAccount(providerType *string) (resp datatypes.Account, err error) { params := []interface{}{ @@ -3675,12 +5913,60 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetExternalBindings() (resp return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetExternalBindingsIter() (resp []datatypes.User_External_Binding, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getExternalBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getExternalBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's accessible hardware. These permissions control which hardware a user has access to in the SoftLayer customer portal. func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardware", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardwareIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardware", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardware", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the number of servers that a portal user has access to. Portal users can have restrictions set to limit services for and to perform actions on hardware. You can set these permissions in the portal by clicking the "administrative" then "user admin" links. func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardwareCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardwareCount", nil, &r.Options, &resp) @@ -3693,6 +5979,30 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardwareNotifications() ( return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardwareNotificationsIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardwareNotifications", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardwareNotifications", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user has acknowledged the support policy. func (r User_Customer_OpenIdConnect_TrustedProfile) GetHasAcknowledgedSupportPolicyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHasAcknowledgedSupportPolicyFlag", nil, &r.Options, &resp) @@ -3735,6 +6045,30 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetLayoutProfiles() (resp [] return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetLayoutProfilesIter() (resp []datatypes.Layout_Profile, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLayoutProfiles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLayoutProfiles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's locale. Locale holds user's language and region information. func (r User_Customer_OpenIdConnect_TrustedProfile) GetLocale() (resp datatypes.Locale, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLocale", nil, &r.Options, &resp) @@ -3757,6 +6091,30 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetLoginAttempts() (resp []d return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetLoginAttemptsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLoginAttempts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLoginAttempts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Attempt to authenticate a user to the SoftLayer customer portal using the provided authentication container. Depending on the specific type of authentication container that is used, this API will leverage the appropriate authentication protocol. If authentication is successful then the API returns a list of linked accounts for the user, a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer_OpenIdConnect_TrustedProfile) GetLoginToken(request *datatypes.Container_Authentication_Request_Contract) (resp datatypes.Container_Authentication_Response_Common, err error) { params := []interface{}{ @@ -3775,12 +6133,63 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetMappedAccounts(providerTy return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetMappedAccountsIter(providerType *string) (resp []datatypes.Account, err error) { + params := []interface{}{ + providerType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getMappedAccounts", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getMappedAccounts", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Notification subscription records for the user. func (r User_Customer_OpenIdConnect_TrustedProfile) GetNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getNotificationSubscribers", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getNotificationSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getNotificationSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) GetObject() (resp datatypes.User_Customer_OpenIdConnect_TrustedProfile, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getObject", nil, &r.Options, &resp) @@ -3809,12 +6218,60 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetOpenTickets() (resp []dat return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOpenTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOpenTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's vpn accessible subnets. func (r User_Customer_OpenIdConnect_TrustedProfile) GetOverrides() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOverrides", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetOverridesIter() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOverrides", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Service_Vpn_Overrides{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOverrides", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's parent user. If a SoftLayer_User_Customer has a null parentId property then it doesn't have a parent user. func (r User_Customer_OpenIdConnect_TrustedProfile) GetParent() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getParent", nil, &r.Options, &resp) @@ -3836,6 +6293,30 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetPermissions() (resp []dat return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetPermissionsIter() (resp []datatypes.User_Customer_CustomerPermission_Permission, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPermissions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_CustomerPermission_Permission{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPermissions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Attempt to authenticate a username and password to the SoftLayer customer portal. Many portal user accounts are configured to require answering a security question on login. In this case getPortalLoginToken() also verifies the given security question ID and answer. If authentication is successful then the API returns a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer_OpenIdConnect_TrustedProfile) GetPortalLoginToken(username *string, password *string, securityQuestionId *int, securityQuestionAnswer *string) (resp datatypes.Container_User_Customer_Portal_Token, err error) { params := []interface{}{ @@ -3877,12 +6358,60 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetPreferenceTypes() (resp [ return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetPreferenceTypesIter() (resp []datatypes.User_Preference_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferenceTypes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferenceTypes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Data type contains a single user preference to a specific preference type. func (r User_Customer_OpenIdConnect_TrustedProfile) GetPreferences() (resp []datatypes.User_Preference, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferences", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetPreferencesIter() (resp []datatypes.User_Preference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Preference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve the authentication requirements for an outstanding password set/reset request. The requirements returned in the same SoftLayer_Container_User_Customer_PasswordSet container which is provided as a parameter into this request. The SoftLayer_Container_User_Customer_PasswordSet::authenticationMethods array will contain an entry for each authentication method required for the user. See SoftLayer_Container_User_Customer_PasswordSet for more details. // // If the user has required authentication methods, then authentication information will be supplied to the SoftLayer_User_Customer::processPasswordSetRequest method within this same SoftLayer_Container_User_Customer_PasswordSet container. All existing information in the container must continue to exist in the container to complete the password set/reset process. @@ -3900,24 +6429,120 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetRoles() (resp []datatypes return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetRolesIter() (resp []datatypes.User_Permission_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's security question answers. Some portal users may not have security answers or may not be configured to require answering a security question on login. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSecurityAnswers() (resp []datatypes.User_Customer_Security_Answer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSecurityAnswers", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetSecurityAnswersIter() (resp []datatypes.User_Customer_Security_Answer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSecurityAnswers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Security_Answer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSecurityAnswers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's notification subscription records. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSubscribers", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSubscribers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_User_Subscriber{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSubscribers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A user's successful attempts to log into the SoftLayer customer portal. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSuccessfulLogins() (resp []datatypes.User_Customer_Access_Authentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSuccessfulLogins", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetSuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSuccessfulLogins", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSuccessfulLogins", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user is required to acknowledge the support policy for portal access. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSupportPolicyAcknowledgementRequiredFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSupportPolicyAcknowledgementRequiredFlag", nil, &r.Options, &resp) @@ -3942,6 +6567,30 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetSupportedLocales() (resp return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetSupportedLocalesIter() (resp []datatypes.Locale, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSupportedLocales", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Locale{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSupportedLocales", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a user must take a brief survey the next time they log into the SoftLayer customer portal. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSurveyRequiredFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSurveyRequiredFlag", nil, &r.Options, &resp) @@ -3954,12 +6603,60 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetSurveys() (resp []datatyp return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetSurveysIter() (resp []datatypes.Survey, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSurveys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Survey{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSurveys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An user's associated tickets. func (r User_Customer_OpenIdConnect_TrustedProfile) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getTickets", nil, &r.Options, &resp) return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's time zone. func (r User_Customer_OpenIdConnect_TrustedProfile) GetTimezone() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getTimezone", nil, &r.Options, &resp) @@ -3972,6 +6669,30 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetUnsuccessfulLogins() (res return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetUnsuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUnsuccessfulLogins", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Access_Authentication{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUnsuccessfulLogins", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns an IMS User Object from the provided OpenIdConnect User ID or IBMid Unique Identifier for the Account of the active user. Enforces the User Management permissions for the Active User. An exception will be thrown if no matching IMS User is found. NOTE that providing IBMid Unique Identifier is optional, but it will be preferred over OpenIdConnect User ID if provided. func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserForUnifiedInvitation(openIdConnectUserId *string, uniqueIdentifier *string, searchInvitationsNotLinksFlag *string, accountId *string) (resp datatypes.User_Customer_OpenIdConnect, err error) { params := []interface{}{ @@ -4001,6 +6722,30 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserLinks() (resp []datat return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserLinksIter() (resp []datatypes.User_Customer_Link, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserLinks", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Link{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserLinks", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserPreferences(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { params := []interface{}{ @@ -4011,6 +6756,34 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserPreferences(profileNa return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserPreferencesIter(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { + params := []interface{}{ + profileName, + containerKeyname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserPreferences", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Layout_Profile{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserPreferences", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A portal user's status, which controls overall access to the SoftLayer customer portal and VPN access to the private network. func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserStatus() (resp datatypes.User_Customer_Status, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserStatus", nil, &r.Options, &resp) @@ -4029,6 +6802,30 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetVirtualGuests() (resp []d return } +func (r User_Customer_OpenIdConnect_TrustedProfile) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getVirtualGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getVirtualGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) InTerminalStatus() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "inTerminalStatus", nil, &r.Options, &resp) @@ -4673,6 +7470,30 @@ func (r User_Customer_Status) GetAllObjects() (resp []datatypes.User_Customer_St return } +func (r User_Customer_Status) GetAllObjectsIter() (resp []datatypes.User_Customer_Status, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Customer_Status", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Status{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Customer_Status", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getObject retrieves the SoftLayer_User_Customer_Status object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_User_Customer_Status service. func (r User_Customer_Status) GetObject() (resp datatypes.User_Customer_Status, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_Status", "getObject", nil, &r.Options, &resp) @@ -4731,6 +7552,30 @@ func (r User_External_Binding) GetAttributes() (resp []datatypes.User_External_B return } +func (r User_External_Binding) GetAttributesIter() (resp []datatypes.User_External_Binding_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_External_Binding", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_External_Binding", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Information regarding the billing item for external authentication. func (r User_External_Binding) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_User_External_Binding", "getBillingItem", nil, &r.Options, &resp) @@ -4816,6 +7661,30 @@ func (r User_External_Binding_Vendor) GetAllObjects() (resp []datatypes.User_Ext return } +func (r User_External_Binding_Vendor) GetAllObjectsIter() (resp []datatypes.User_External_Binding_Vendor, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_External_Binding_Vendor", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_External_Binding_Vendor{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_External_Binding_Vendor", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_External_Binding_Vendor) GetObject() (resp datatypes.User_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_External_Binding_Vendor", "getObject", nil, &r.Options, &resp) @@ -4870,6 +7739,30 @@ func (r User_Permission_Action) GetAllObjects() (resp []datatypes.User_Permissio return } +func (r User_Permission_Action) GetAllObjectsIter() (resp []datatypes.User_Permission_Action, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Permission_Action", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Action{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Permission_Action", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Permission_Action) GetObject() (resp datatypes.User_Permission_Action, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Action", "getObject", nil, &r.Options, &resp) @@ -4994,6 +7887,30 @@ func (r User_Permission_Group) GetActions() (resp []datatypes.User_Permission_Ac return } +func (r User_Permission_Group) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getActions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Action{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getActions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Permission_Group) GetObject() (resp datatypes.User_Permission_Group, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getObject", nil, &r.Options, &resp) @@ -5006,6 +7923,30 @@ func (r User_Permission_Group) GetRoles() (resp []datatypes.User_Permission_Role return } +func (r User_Permission_Group) GetRolesIter() (resp []datatypes.User_Permission_Role, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getRoles", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Role{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getRoles", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The type of the permission group. func (r User_Permission_Group) GetType() (resp datatypes.User_Permission_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getType", nil, &r.Options, &resp) @@ -5120,6 +8061,30 @@ func (r User_Permission_Group_Type) GetGroups() (resp []datatypes.User_Permissio return } +func (r User_Permission_Group_Type) GetGroupsIter() (resp []datatypes.User_Permission_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Permission_Group_Type", "getGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Permission_Group_Type", "getGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Permission_Group_Type) GetObject() (resp datatypes.User_Permission_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Group_Type", "getObject", nil, &r.Options, &resp) @@ -5172,6 +8137,30 @@ func (r User_Permission_Resource_Type) GetAllObjects() (resp []datatypes.User_Pe return } +func (r User_Permission_Resource_Type) GetAllObjectsIter() (resp []datatypes.User_Permission_Resource_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Permission_Resource_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Resource_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Permission_Resource_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Permission_Resource_Type) GetObject() (resp datatypes.User_Permission_Resource_Type, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Resource_Type", "getObject", nil, &r.Options, &resp) @@ -5266,12 +8255,60 @@ func (r User_Permission_Role) GetActions() (resp []datatypes.User_Permission_Act return } +func (r User_Permission_Role) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getActions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Action{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getActions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r User_Permission_Role) GetGroups() (resp []datatypes.User_Permission_Group, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getGroups", nil, &r.Options, &resp) return } +func (r User_Permission_Role) GetGroupsIter() (resp []datatypes.User_Permission_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Permission_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r User_Permission_Role) GetObject() (resp datatypes.User_Permission_Role, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getObject", nil, &r.Options, &resp) @@ -5284,6 +8321,30 @@ func (r User_Permission_Role) GetUsers() (resp []datatypes.User_Customer, err er return } +func (r User_Permission_Role) GetUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Links a SoftLayer_User_Permission_Group object to the role. func (r User_Permission_Role) LinkGroup(group *datatypes.User_Permission_Group) (err error) { var resp datatypes.Void @@ -5360,6 +8421,30 @@ func (r User_Security_Question) GetAllObjects() (resp []datatypes.User_Security_ return } +func (r User_Security_Question) GetAllObjectsIter() (resp []datatypes.User_Security_Question, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_User_Security_Question", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Security_Question{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_User_Security_Question", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // getAllObjects retrieves all the SoftLayer_User_Security_Question objects where it is set to be viewable. func (r User_Security_Question) GetObject() (resp datatypes.User_Security_Question, err error) { err = r.Session.DoRequest("SoftLayer_User_Security_Question", "getObject", nil, &r.Options, &resp) diff --git a/services/verify.go b/services/verify.go index a080b60..349f831 100644 --- a/services/verify.go +++ b/services/verify.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -83,6 +84,30 @@ func (r Verify_Api_HttpObj) GetAllObjects() (resp []datatypes.Verify_Api_HttpObj return } +func (r Verify_Api_HttpObj) GetAllObjectsIter() (resp []datatypes.Verify_Api_HttpObj, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Verify_Api_HttpObj{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Verify_Api_HttpObj) GetObject() (resp datatypes.Verify_Api_HttpObj, err error) { err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "getObject", nil, &r.Options, &resp) @@ -150,6 +175,30 @@ func (r Verify_Api_HttpsObj) GetAllObjects() (resp []datatypes.Verify_Api_HttpsO return } +func (r Verify_Api_HttpsObj) GetAllObjectsIter() (resp []datatypes.Verify_Api_HttpsObj, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Verify_Api_HttpsObj{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Verify_Api_HttpsObj) GetObject() (resp datatypes.Verify_Api_HttpsObj, err error) { err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "getObject", nil, &r.Options, &resp) diff --git a/services/virtual.go b/services/virtual.go index ab5b469..ea7ecf6 100644 --- a/services/virtual.go +++ b/services/virtual.go @@ -16,6 +16,7 @@ package services import ( "fmt" "strings" + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -98,6 +99,33 @@ func (r Virtual_DedicatedHost) GetAvailableRouters(dedicatedHost *datatypes.Virt return } +func (r Virtual_DedicatedHost) GetAvailableRoutersIter(dedicatedHost *datatypes.Virtual_DedicatedHost) (resp []datatypes.Hardware, err error) { + params := []interface{}{ + dedicatedHost, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getAvailableRouters", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getAvailableRouters", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The backend router behind dedicated host's pool of resources. func (r Virtual_DedicatedHost) GetBackendRouter() (resp datatypes.Hardware_Router_Backend, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getBackendRouter", nil, &r.Options, &resp) @@ -122,12 +150,60 @@ func (r Virtual_DedicatedHost) GetGuests() (resp []datatypes.Virtual_Guest, err return } +func (r Virtual_DedicatedHost) GetGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Virtual_DedicatedHost) GetInternalTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getInternalTagReferences", nil, &r.Options, &resp) return } +func (r Virtual_DedicatedHost) GetInternalTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getInternalTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getInternalTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_DedicatedHost) GetObject() (resp datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getObject", nil, &r.Options, &resp) @@ -146,12 +222,60 @@ func (r Virtual_DedicatedHost) GetPciDevices() (resp []datatypes.Virtual_Host_Pc return } +func (r Virtual_DedicatedHost) GetPciDevicesIter() (resp []datatypes.Virtual_Host_PciDevice, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDevices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Host_PciDevice{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDevices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Virtual_DedicatedHost) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getTagReferences", nil, &r.Options, &resp) return } +func (r Virtual_DedicatedHost) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_DedicatedHost) SetTags(tags *string) (resp bool, err error) { params := []interface{}{ @@ -218,6 +342,30 @@ func (r Virtual_Disk_Image) GetAvailableBootModes() (resp []string, err error) { return } +func (r Virtual_Disk_Image) GetAvailableBootModesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getAvailableBootModes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getAvailableBootModes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The billing item for a virtual disk image. func (r Virtual_Disk_Image) GetBillingItem() (resp datatypes.Billing_Item_Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBillingItem", nil, &r.Options, &resp) @@ -230,6 +378,30 @@ func (r Virtual_Disk_Image) GetBlockDevices() (resp []datatypes.Virtual_Guest_Bl return } +func (r Virtual_Disk_Image) GetBlockDevicesIter() (resp []datatypes.Virtual_Guest_Block_Device, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBlockDevices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBlockDevices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Virtual_Disk_Image) GetBootableVolumeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBootableVolumeFlag", nil, &r.Options, &resp) @@ -248,6 +420,30 @@ func (r Virtual_Disk_Image) GetCoalescedDiskImages() (resp []datatypes.Virtual_D return } +func (r Virtual_Disk_Image) GetCoalescedDiskImagesIter() (resp []datatypes.Virtual_Disk_Image, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getCoalescedDiskImages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Disk_Image{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getCoalescedDiskImages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Virtual_Disk_Image) GetCopyOnWriteFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getCopyOnWriteFlag", nil, &r.Options, &resp) @@ -302,12 +498,60 @@ func (r Virtual_Disk_Image) GetPublicIsoImages() (resp []datatypes.Virtual_Disk_ return } +func (r Virtual_Disk_Image) GetPublicIsoImagesIter() (resp []datatypes.Virtual_Disk_Image, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getPublicIsoImages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Disk_Image{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getPublicIsoImages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve References to the software that resides on a disk image. func (r Virtual_Disk_Image) GetSoftwareReferences() (resp []datatypes.Virtual_Disk_Image_Software, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSoftwareReferences", nil, &r.Options, &resp) return } +func (r Virtual_Disk_Image) GetSoftwareReferencesIter() (resp []datatypes.Virtual_Disk_Image_Software, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSoftwareReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Disk_Image_Software{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSoftwareReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The original disk image that the current disk image was cloned from. func (r Virtual_Disk_Image) GetSourceDiskImage() (resp datatypes.Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSourceDiskImage", nil, &r.Options, &resp) @@ -326,6 +570,30 @@ func (r Virtual_Disk_Image) GetStorageGroups() (resp []datatypes.Configuration_S return } +func (r Virtual_Disk_Image) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getStorageGroups", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Configuration_Storage_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getStorageGroups", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The storage repository that a disk image resides in. func (r Virtual_Disk_Image) GetStorageRepository() (resp datatypes.Virtual_Storage_Repository, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getStorageRepository", nil, &r.Options, &resp) @@ -778,6 +1046,33 @@ func (r Virtual_Guest) CreateObjects(templateObjects []datatypes.Virtual_Guest) return } +func (r Virtual_Guest) CreateObjectsIter(templateObjects []datatypes.Virtual_Guest) (resp []datatypes.Virtual_Guest, err error) { + params := []interface{}{ + templateObjects, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "createObjects", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "createObjects", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_Guest) CreatePostSoftwareInstallTransaction(data *string, returnBoolean *bool) (resp bool, err error) { params := []interface{}{ @@ -867,6 +1162,33 @@ func (r Virtual_Guest) FindByHostname(hostname *string) (resp []datatypes.Virtua return } +func (r Virtual_Guest) FindByHostnameIter(hostname *string) (resp []datatypes.Virtual_Guest, err error) { + params := []interface{}{ + hostname, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "findByHostname", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "findByHostname", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Find CCI by only its primary public or private IP address. IP addresses within secondary subnets tied to the CCI will not return the CCI. If no CCI is found, no errors are generated and no data is returned. func (r Virtual_Guest) FindByIpAddress(ipAddress *string) (resp datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -907,12 +1229,60 @@ func (r Virtual_Guest) GetActiveNetworkMonitorIncident() (resp []datatypes.Netwo return } +func (r Virtual_Guest) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Virtual_Guest) GetActiveTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTickets", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTickets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Ticket{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTickets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A transaction that is still be performed on a cloud server. func (r Virtual_Guest) GetActiveTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTransaction", nil, &r.Options, &resp) @@ -925,6 +1295,30 @@ func (r Virtual_Guest) GetActiveTransactions() (resp []datatypes.Provisioning_Ve return } +func (r Virtual_Guest) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTransactions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Provisioning_Version1_Transaction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTransactions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Return a collection of SoftLayer_Item_Price objects for an OS reload func (r Virtual_Guest) GetAdditionalRequiredPricesForOsReload(config *datatypes.Container_Hardware_Server_Configuration) (resp []datatypes.Product_Item_Price, err error) { params := []interface{}{ @@ -934,6 +1328,33 @@ func (r Virtual_Guest) GetAdditionalRequiredPricesForOsReload(config *datatypes. return } +func (r Virtual_Guest) GetAdditionalRequiredPricesForOsReloadIter(config *datatypes.Container_Hardware_Server_Configuration) (resp []datatypes.Product_Item_Price, err error) { + params := []interface{}{ + config, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAdditionalRequiredPricesForOsReload", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAdditionalRequiredPricesForOsReload", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this Virtual Guest to Network Storage volumes that require access control lists. func (r Virtual_Guest) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedHost", nil, &r.Options, &resp) @@ -946,12 +1367,60 @@ func (r Virtual_Guest) GetAllowedNetworkStorage() (resp []datatypes.Network_Stor return } +func (r Virtual_Guest) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Virtual_Guest has access to. func (r Virtual_Guest) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A antivirus / spyware software component object. func (r Virtual_Guest) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -973,24 +1442,123 @@ func (r Virtual_Guest) GetAttachedNetworkStorages(nasType *string) (resp []datat return } +func (r Virtual_Guest) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttachedNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttachedNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Virtual_Guest) GetAttributes() (resp []datatypes.Virtual_Guest_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttributes", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetAttributesIter() (resp []datatypes.Virtual_Guest_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_Guest) GetAvailableBlockDevicePositions() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableBlockDevicePositions", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetAvailableBlockDevicePositionsIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableBlockDevicePositions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableBlockDevicePositions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve An object that stores the maximum level for the monitoring query types and response types. func (r Virtual_Guest) GetAvailableMonitoring() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableMonitoring", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetAvailableMonitoringIter() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableMonitoring", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host_Stratum{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableMonitoring", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Virtual_Guest. func (r Virtual_Guest) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -1000,6 +1568,33 @@ func (r Virtual_Guest) GetAvailableNetworkStorages(nasType *string) (resp []data return } +func (r Virtual_Guest) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { + params := []interface{}{ + nasType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableNetworkStorages", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableNetworkStorages", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The average daily private bandwidth usage for the current billing cycle. func (r Virtual_Guest) GetAverageDailyPrivateBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAverageDailyPrivateBandwidthUsage", nil, &r.Options, &resp) @@ -1018,12 +1613,60 @@ func (r Virtual_Guest) GetBackendNetworkComponents() (resp []datatypes.Virtual_G return } +func (r Virtual_Guest) GetBackendNetworkComponentsIter() (resp []datatypes.Virtual_Guest_Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A guest's backend or private router. func (r Virtual_Guest) GetBackendRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendRouters", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendRouters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendRouters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A computing instance's allotted bandwidth (measured in GB). func (r Virtual_Guest) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -1047,6 +1690,35 @@ func (r Virtual_Guest) GetBandwidthDataByDate(startDateTime *datatypes.Time, end return } +func (r Virtual_Guest) GetBandwidthDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, networkType *string) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + networkType, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthDataByDate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthDataByDate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve a collection of bandwidth data from an individual public or private network tracking object. Data is ideal if you with to employ your own traffic storage and graphing systems. func (r Virtual_Guest) GetBandwidthForDateRange(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -1057,6 +1729,34 @@ func (r Virtual_Guest) GetBandwidthForDateRange(startDate *datatypes.Time, endDa return } +func (r Virtual_Guest) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDate, + endDate, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthForDateRange", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthForDateRange", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method when needing a bandwidth image for a single guest. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. func (r Virtual_Guest) GetBandwidthImage(networkType *string, snapshotRange *string, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -1098,6 +1798,30 @@ func (r Virtual_Guest) GetBillingCycleBandwidthUsage() (resp []datatypes.Network return } +func (r Virtual_Guest) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Bandwidth_Usage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Virtual_Guest) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -1134,6 +1858,30 @@ func (r Virtual_Guest) GetBlockDevices() (resp []datatypes.Virtual_Guest_Block_D return } +func (r Virtual_Guest) GetBlockDevicesIter() (resp []datatypes.Virtual_Guest_Block_Device, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBlockDevices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBlockDevices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieves the boot mode of the VSI. func (r Virtual_Guest) GetBootMode() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBootMode", nil, &r.Options, &resp) @@ -1152,12 +1900,60 @@ func (r Virtual_Guest) GetBrowserConsoleAccessLogs() (resp []datatypes.Virtual_B return } +func (r Virtual_Guest) GetBrowserConsoleAccessLogsIter() (resp []datatypes.Virtual_BrowserConsoleAccessLog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBrowserConsoleAccessLogs", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_BrowserConsoleAccessLog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBrowserConsoleAccessLogs", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Gets the console access logs for a computing instance func (r Virtual_Guest) GetConsoleAccessLog() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleAccessLog", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetConsoleAccessLogIter() (resp []datatypes.Network_Logging_Syslog, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleAccessLog", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Logging_Syslog{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleAccessLog", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A container for a guest's console data func (r Virtual_Guest) GetConsoleData() (resp datatypes.Container_Virtual_ConsoleData, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleData", nil, &r.Options, &resp) @@ -1205,6 +2001,35 @@ func (r Virtual_Guest) GetCpuMetricDataByDate(startDateTime *datatypes.Time, end return } +func (r Virtual_Guest) GetCpuMetricDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, cpuIndexes []int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + cpuIndexes, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCpuMetricDataByDate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCpuMetricDataByDate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method when needing a cpu usage image for a single guest. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. func (r Virtual_Guest) GetCpuMetricImage(snapshotRange *string, dateSpecified *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -1246,6 +2071,30 @@ func (r Virtual_Guest) GetCurrentBillingDetail() (resp []datatypes.Billing_Item, return } +func (r Virtual_Guest) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCurrentBillingDetail", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Billing_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCurrentBillingDetail", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the total bill amount in US Dollars ($) for this instance in the current billing period. This includes all bandwidth used up to the point this method is called on the instance. func (r Virtual_Guest) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -1282,12 +2131,60 @@ func (r Virtual_Guest) GetEvaultNetworkStorage() (resp []datatypes.Network_Stora return } +func (r Virtual_Guest) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getEvaultNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getEvaultNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the subnets associated with this CloudLayer computing instance that are protectable by a network component firewall. func (r Virtual_Guest) GetFirewallProtectableSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFirewallProtectableSubnets", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFirewallProtectableSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFirewallProtectableSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A computing instance's hardware firewall services. func (r Virtual_Guest) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -1306,6 +2203,30 @@ func (r Virtual_Guest) GetFrontendNetworkComponents() (resp []datatypes.Virtual_ return } +func (r Virtual_Guest) GetFrontendNetworkComponentsIter() (resp []datatypes.Virtual_Guest_Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFrontendNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFrontendNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A guest's frontend or public router. func (r Virtual_Guest) GetFrontendRouters() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFrontendRouters", nil, &r.Options, &resp) @@ -1378,6 +2299,30 @@ func (r Virtual_Guest) GetInternalTagReferences() (resp []datatypes.Tag_Referenc return } +func (r Virtual_Guest) GetInternalTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getInternalTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getInternalTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_Guest) GetIsoBootImage() (resp datatypes.Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getIsoBootImage", nil, &r.Options, &resp) @@ -1395,6 +2340,35 @@ func (r Virtual_Guest) GetItemPricesFromSoftwareDescriptions(softwareDescription return } +func (r Virtual_Guest) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item, err error) { + params := []interface{}{ + softwareDescriptions, + includeTranslationsFlag, + returnAllPricesFlag, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The last known power state of a virtual guest in the event the guest is turned off outside of IMS or has gone offline. func (r Virtual_Guest) GetLastKnownPowerState() (resp datatypes.Virtual_Guest_Power_State, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getLastKnownPowerState", nil, &r.Options, &resp) @@ -1447,6 +2421,34 @@ func (r Virtual_Guest) GetMemoryMetricDataByDate(startDateTime *datatypes.Time, return } +func (r Virtual_Guest) GetMemoryMetricDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricDataByDate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricDataByDate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Use this method when needing a memory usage image for a single guest. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. func (r Virtual_Guest) GetMemoryMetricImage(snapshotRange *string, dateSpecified *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -1503,42 +2505,210 @@ func (r Virtual_Guest) GetMonitoringUserNotification() (resp []datatypes.User_Cu return } +func (r Virtual_Guest) GetMonitoringUserNotificationIter() (resp []datatypes.User_Customer_Notification_Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMonitoringUserNotification", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer_Notification_Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMonitoringUserNotification", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get the IP addresses associated with this CloudLayer computing instance that are protectable by a network component firewall. Note, this may not return all values for IPv6 subnets for this CloudLayer computing instance. Please use getFirewallProtectableSubnets to get all protectable subnets. func (r Virtual_Guest) GetNetworkComponentFirewallProtectableIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetNetworkComponentFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponentFirewallProtectableIpAddresses", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A guests's network components. func (r Virtual_Guest) GetNetworkComponents() (resp []datatypes.Virtual_Guest_Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponents", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetNetworkComponentsIter() (resp []datatypes.Virtual_Guest_Network_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Network_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve All of a virtual guest's network monitoring incidents. func (r Virtual_Guest) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitorIncidents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Incident{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitorIncidents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A guests's network monitors. func (r Virtual_Guest) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitors", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitors", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitors", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A guest's associated network storage accounts. func (r Virtual_Guest) GetNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkStorage", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkStorage", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Storage{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkStorage", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The network Vlans that a guest's network components are associated with. func (r Virtual_Guest) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkVlans", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkVlans", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Vlan{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkVlans", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_Guest) GetObject() (resp datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getObject", nil, &r.Options, &resp) @@ -1603,6 +2773,30 @@ func (r Virtual_Guest) GetPendingMaintenanceActions() (resp []datatypes.Containe return } +func (r Virtual_Guest) GetPendingMaintenanceActionsIter() (resp []datatypes.Container_Virtual_Guest_PendingMaintenanceAction, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getPendingMaintenanceActions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Container_Virtual_Guest_PendingMaintenanceAction{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getPendingMaintenanceActions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve When true this virtual guest must be migrated using SoftLayer_Virtual_Guest::migrate. func (r Virtual_Guest) GetPendingMigrationFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getPendingMigrationFlag", nil, &r.Options, &resp) @@ -1675,6 +2869,30 @@ func (r Virtual_Guest) GetRecentEvents() (resp []datatypes.Notification_Occurren return } +func (r Virtual_Guest) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentEvents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Notification_Occurrence_Event{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentEvents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Recent metric data for a guest func (r Virtual_Guest) GetRecentMetricData(time *uint) (resp []datatypes.Metric_Tracking_Object, err error) { params := []interface{}{ @@ -1684,6 +2902,33 @@ func (r Virtual_Guest) GetRecentMetricData(time *uint) (resp []datatypes.Metric_ return } +func (r Virtual_Guest) GetRecentMetricDataIter(time *uint) (resp []datatypes.Metric_Tracking_Object, err error) { + params := []interface{}{ + time, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentMetricData", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentMetricData", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The regional group this guest is in. func (r Virtual_Guest) GetRegionalGroup() (resp datatypes.Location_Group_Regional, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRegionalGroup", nil, &r.Options, &resp) @@ -1720,9 +2965,57 @@ func (r Virtual_Guest) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, e return } -// Retrieve A guest's vulnerability scan requests. -func (r Virtual_Guest) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { +func (r Virtual_Guest) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getReverseDomainRecords", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Dns_Domain{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getReverseDomainRecords", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + +// Retrieve A guest's vulnerability scan requests. +func (r Virtual_Guest) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSecurityScanRequests", nil, &r.Options, &resp) + return +} + +func (r Virtual_Guest) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { + limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSecurityScanRequests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Security_Scanner_Request{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSecurityScanRequests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() return } @@ -1738,12 +3031,60 @@ func (r Virtual_Guest) GetSoftwareComponents() (resp []datatypes.Software_Compon return } +func (r Virtual_Guest) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSoftwareComponents", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Component{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSoftwareComponents", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve SSH keys to be installed on the server during provisioning or an OS reload. func (r Virtual_Guest) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSshKeys", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A computing instance's status. func (r Virtual_Guest) GetStatus() (resp datatypes.Virtual_Guest_Status, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getStatus", nil, &r.Options, &resp) @@ -1756,6 +3097,30 @@ func (r Virtual_Guest) GetTagReferences() (resp []datatypes.Tag_Reference, err e return } +func (r Virtual_Guest) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve Whether or not a computing instance is a Transient Instance. func (r Virtual_Guest) GetTransientGuestFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getTransientGuestFlag", nil, &r.Options, &resp) @@ -1785,6 +3150,33 @@ func (r Virtual_Guest) GetUpgradeItemPrices(includeDowngradeItemPrices *bool) (r return } +func (r Virtual_Guest) GetUpgradeItemPricesIter(includeDowngradeItemPrices *bool) (resp []datatypes.Product_Item_Price, err error) { + params := []interface{}{ + includeDowngradeItemPrices, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUpgradeItemPrices", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Product_Item_Price{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUpgradeItemPrices", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A computing instance's associated upgrade request object if any. func (r Virtual_Guest) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUpgradeRequest", nil, &r.Options, &resp) @@ -1797,12 +3189,60 @@ func (r Virtual_Guest) GetUserData() (resp []datatypes.Virtual_Guest_Attribute, return } +func (r Virtual_Guest) GetUserDataIter() (resp []datatypes.Virtual_Guest_Attribute, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUserData", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Attribute{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUserData", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A list of users that have access to this computing instance. func (r Virtual_Guest) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUsers", nil, &r.Options, &resp) return } +func (r Virtual_Guest) GetUsersIter() (resp []datatypes.User_Customer, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUsers", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.User_Customer{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUsers", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method will return the list of block device template groups that are valid to the host. For instance, it will validate that the template groups returned are compatible with the size and number of disks on the host. func (r Virtual_Guest) GetValidBlockDeviceTemplateGroups(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { params := []interface{}{ @@ -1812,6 +3252,33 @@ func (r Virtual_Guest) GetValidBlockDeviceTemplateGroups(visibility *string) (re return } +func (r Virtual_Guest) GetValidBlockDeviceTemplateGroupsIter(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + params := []interface{}{ + visibility, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getValidBlockDeviceTemplateGroups", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The name of the bandwidth allotment that a hardware belongs too. func (r Virtual_Guest) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getVirtualRack", nil, &r.Options, &resp) @@ -2243,6 +3710,34 @@ func (r Virtual_Guest_Block_Device_Template_Group) FindGcImagesByCurrentUser(dat return } +func (r Virtual_Guest_Block_Device_Template_Group) FindGcImagesByCurrentUserIter(dataCenters []string, regions []string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + params := []interface{}{ + dataCenters, + regions, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "findGcImagesByCurrentUser", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "findGcImagesByCurrentUser", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A block device template group's [[SoftLayer_Account|account]]. func (r Virtual_Guest_Block_Device_Template_Group) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccount", nil, &r.Options, &resp) @@ -2255,24 +3750,120 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetAccountContacts() (resp [] return } +func (r Virtual_Guest_Block_Device_Template_Group) GetAccountContactsIter() (resp []datatypes.Account_Contact, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountContacts", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Account_Contact{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountContacts", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The accounts which may have read-only access to an image template group. Will only be populated for parent template group objects. func (r Virtual_Guest_Block_Device_Template_Group) GetAccountReferences() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group_Accounts, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountReferences", nil, &r.Options, &resp) return } +func (r Virtual_Guest_Block_Device_Template_Group) GetAccountReferencesIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group_Accounts, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group_Accounts{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get all available compatible platform names that can be added to a template group. func (r Virtual_Guest_Block_Device_Template_Group) GetAllAvailableCompatiblePlatformNames() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAllAvailableCompatiblePlatformNames", nil, &r.Options, &resp) return } +func (r Virtual_Guest_Block_Device_Template_Group) GetAllAvailableCompatiblePlatformNamesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAllAvailableCompatiblePlatformNames", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAllAvailableCompatiblePlatformNames", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The block devices that are part of an image template group func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevices() (resp []datatypes.Virtual_Guest_Block_Device_Template, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevices", nil, &r.Options, &resp) return } +func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevicesIter() (resp []datatypes.Virtual_Guest_Block_Device_Template, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The total disk space of all images in a image template group. func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevicesDiskSpaceTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevicesDiskSpaceTotal", nil, &r.Options, &resp) @@ -2297,12 +3888,60 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetChildren() (resp []datatyp return } +func (r Virtual_Guest_Block_Device_Template_Group) GetChildrenIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getChildren", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getChildren", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Get compatible platform names currently set on the template group. func (r Virtual_Guest_Block_Device_Template_Group) GetCurrentCompatiblePlatformNames() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getCurrentCompatiblePlatformNames", nil, &r.Options, &resp) return } +func (r Virtual_Guest_Block_Device_Template_Group) GetCurrentCompatiblePlatformNamesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getCurrentCompatiblePlatformNames", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getCurrentCompatiblePlatformNames", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The location containing this image template group. Will only be populated for child template group objects. func (r Virtual_Guest_Block_Device_Template_Group) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getDatacenter", nil, &r.Options, &resp) @@ -2315,6 +3954,30 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetDatacenters() (resp []data return } +func (r Virtual_Guest_Block_Device_Template_Group) GetDatacentersIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getDatacenters", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getDatacenters", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method returns the default boot mode set by the software description func (r Virtual_Guest_Block_Device_Template_Group) GetDefaultBootMode() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getDefaultBootMode", nil, &r.Options, &resp) @@ -2327,6 +3990,30 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetEncryptionAttributes() (re return } +func (r Virtual_Guest_Block_Device_Template_Group) GetEncryptionAttributesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getEncryptionAttributes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getEncryptionAttributes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The first clone of the image template group func (r Virtual_Guest_Block_Device_Template_Group) GetFirstChild() (resp datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getFirstChild", nil, &r.Options, &resp) @@ -2381,12 +4068,60 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetPublicCustomerOwnedImages( return } +func (r Virtual_Guest_Block_Device_Template_Group) GetPublicCustomerOwnedImagesIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicCustomerOwnedImages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicCustomerOwnedImages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method gets all public image templates that the user is allowed to see. func (r Virtual_Guest_Block_Device_Template_Group) GetPublicImages() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicImages", nil, &r.Options, &resp) return } +func (r Virtual_Guest_Block_Device_Template_Group) GetPublicImagesIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicImages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicImages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Virtual_Guest_Block_Device_Template_Group) GetRegion() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getRegion", nil, &r.Options, &resp) @@ -2399,6 +4134,30 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetRegions() (resp []datatype return } +func (r Virtual_Guest_Block_Device_Template_Group) GetRegionsIter() (resp []datatypes.Network_Service_Resource, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getRegions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Service_Resource{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getRegions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_Guest_Block_Device_Template_Group) GetRiasAccount(secret *string) (resp datatypes.Container_Virtual_Guest_Block_Device_Template_Group_RiasAccount, err error) { params := []interface{}{ @@ -2414,6 +4173,30 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetSshKeys() (resp []datatype return } +func (r Virtual_Guest_Block_Device_Template_Group) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getSshKeys", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Security_Ssh_Key{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getSshKeys", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A template group's status. func (r Virtual_Guest_Block_Device_Template_Group) GetStatus() (resp datatypes.Virtual_Guest_Block_Device_Template_Group_Status, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStatus", nil, &r.Options, &resp) @@ -2426,6 +4209,30 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetStorageLocations() (resp [ return } +func (r Virtual_Guest_Block_Device_Template_Group) GetStorageLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStorageLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStorageLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The storage repository that an image template group resides on. func (r Virtual_Guest_Block_Device_Template_Group) GetStorageRepository() (resp datatypes.Virtual_Storage_Repository, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStorageRepository", nil, &r.Options, &resp) @@ -2438,12 +4245,60 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetSupportedBootModes() (resp return } +func (r Virtual_Guest_Block_Device_Template_Group) GetSupportedBootModesIter() (resp []string, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getSupportedBootModes", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []string{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getSupportedBootModes", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The tags associated with this image template group. func (r Virtual_Guest_Block_Device_Template_Group) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTagReferences", nil, &r.Options, &resp) return } +func (r Virtual_Guest_Block_Device_Template_Group) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTagReferences", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Tag_Reference{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTagReferences", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method allows you to grab the first data center that the image(s) reside on so we can pull it from there. func (r Virtual_Guest_Block_Device_Template_Group) GetTemplateDataCenterName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTemplateDataCenterName", nil, &r.Options, &resp) @@ -2462,6 +4317,30 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetVhdImportSoftwareDescripti return } +func (r Virtual_Guest_Block_Device_Template_Group) GetVhdImportSoftwareDescriptionsIter() (resp []datatypes.Software_Description, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getVhdImportSoftwareDescriptions", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Software_Description{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getVhdImportSoftwareDescriptions", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This method indicates whether or not this image is a customer supplied license image. func (r Virtual_Guest_Block_Device_Template_Group) IsByol() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "isByol", nil, &r.Options, &resp) @@ -2698,6 +4577,30 @@ func (r Virtual_Guest_Boot_Parameter_Type) GetAllObjects() (resp []datatypes.Vir return } +func (r Virtual_Guest_Boot_Parameter_Type) GetAllObjectsIter() (resp []datatypes.Virtual_Guest_Boot_Parameter_Type, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Boot_Parameter_Type", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Boot_Parameter_Type{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Boot_Parameter_Type", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_Guest_Boot_Parameter_Type) GetObject() (resp datatypes.Virtual_Guest_Boot_Parameter_Type, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Boot_Parameter_Type", "getObject", nil, &r.Options, &resp) @@ -2782,6 +4685,30 @@ func (r Virtual_Guest_Network_Component) GetIpAddressBindings() (resp []datatype return } +func (r Virtual_Guest_Network_Component) GetIpAddressBindingsIter() (resp []datatypes.Virtual_Guest_Network_Component_IpAddress, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getIpAddressBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest_Network_Component_IpAddress{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getIpAddressBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The upstream network component firewall. func (r Virtual_Guest_Network_Component) GetNetworkComponentFirewall() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getNetworkComponentFirewall", nil, &r.Options, &resp) @@ -2836,12 +4763,60 @@ func (r Virtual_Guest_Network_Component) GetSecurityGroupBindings() (resp []data return } +func (r Virtual_Guest_Network_Component) GetSecurityGroupBindingsIter() (resp []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSecurityGroupBindings", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSecurityGroupBindings", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A network component's subnets. A subnet is a group of IP addresses func (r Virtual_Guest_Network_Component) GetSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSubnets", nil, &r.Options, &resp) return } +func (r Virtual_Guest_Network_Component) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSubnets", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Network_Subnet{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSubnets", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Issues a ping command and returns the success (true) or failure (false) of the ping command. func (r Virtual_Guest_Network_Component) IsPingable() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "isPingable", nil, &r.Options, &resp) @@ -2924,6 +4899,30 @@ func (r Virtual_Host) GetPciDevices() (resp []datatypes.Virtual_Host_PciDevice, return } +func (r Virtual_Host) GetPciDevicesIter() (resp []datatypes.Virtual_Host_PciDevice, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getPciDevices", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Host_PciDevice{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getPciDevices", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This data type presents the structure for a virtual guest placement group. The data type contains relational properties to the virtual guest placement group rule class. type Virtual_PlacementGroup struct { Session session.SLSession @@ -3003,6 +5002,33 @@ func (r Virtual_PlacementGroup) GetAvailableRouters(datacenterId *int) (resp []d return } +func (r Virtual_PlacementGroup) GetAvailableRoutersIter(datacenterId *int) (resp []datatypes.Hardware, err error) { + params := []interface{}{ + datacenterId, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getAvailableRouters", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getAvailableRouters", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The router the placement group is implemented on. func (r Virtual_PlacementGroup) GetBackendRouter() (resp datatypes.Hardware_Router_Backend, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getBackendRouter", nil, &r.Options, &resp) @@ -3015,6 +5041,30 @@ func (r Virtual_PlacementGroup) GetGuests() (resp []datatypes.Virtual_Guest, err return } +func (r Virtual_PlacementGroup) GetGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_PlacementGroup) GetObject() (resp datatypes.Virtual_PlacementGroup, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getObject", nil, &r.Options, &resp) @@ -3073,6 +5123,30 @@ func (r Virtual_PlacementGroup_Rule) GetAllObjects() (resp []datatypes.Virtual_P return } +func (r Virtual_PlacementGroup_Rule) GetAllObjectsIter() (resp []datatypes.Virtual_PlacementGroup_Rule, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup_Rule", "getAllObjects", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_PlacementGroup_Rule{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup_Rule", "getAllObjects", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // no documentation yet func (r Virtual_PlacementGroup_Rule) GetObject() (resp datatypes.Virtual_PlacementGroup_Rule, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup_Rule", "getObject", nil, &r.Options, &resp) @@ -3140,6 +5214,30 @@ func (r Virtual_ReservedCapacityGroup) GetAvailableInstances() (resp []datatypes return } +func (r Virtual_ReservedCapacityGroup) GetAvailableInstancesIter() (resp []datatypes.Virtual_ReservedCapacityGroup_Instance, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getAvailableInstances", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_ReservedCapacityGroup_Instance{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getAvailableInstances", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The router the reserved capacity group is implemented on. func (r Virtual_ReservedCapacityGroup) GetBackendRouter() (resp datatypes.Hardware_Router_Backend, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getBackendRouter", nil, &r.Options, &resp) @@ -3152,6 +5250,30 @@ func (r Virtual_ReservedCapacityGroup) GetInstances() (resp []datatypes.Virtual_ return } +func (r Virtual_ReservedCapacityGroup) GetInstancesIter() (resp []datatypes.Virtual_ReservedCapacityGroup_Instance, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getInstances", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_ReservedCapacityGroup_Instance{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getInstances", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The number of instances that are members of this reserved capacity group. func (r Virtual_ReservedCapacityGroup) GetInstancesCount() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getInstancesCount", nil, &r.Options, &resp) @@ -3170,6 +5292,30 @@ func (r Virtual_ReservedCapacityGroup) GetOccupiedInstances() (resp []datatypes. return } +func (r Virtual_ReservedCapacityGroup) GetOccupiedInstancesIter() (resp []datatypes.Virtual_ReservedCapacityGroup_Instance, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getOccupiedInstances", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_ReservedCapacityGroup_Instance{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getOccupiedInstances", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // This data type presents the structure for a virtual reserved capacity group instance. type Virtual_ReservedCapacityGroup_Instance struct { Session session.SLSession @@ -3330,12 +5476,60 @@ func (r Virtual_Storage_Repository) GetDiskImages() (resp []datatypes.Virtual_Di return } +func (r Virtual_Storage_Repository) GetDiskImagesIter() (resp []datatypes.Virtual_Disk_Image, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getDiskImages", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Disk_Image{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getDiskImages", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve The computing instances that have disk images in a storage repository. func (r Virtual_Storage_Repository) GetGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getGuests", nil, &r.Options, &resp) return } +func (r Virtual_Storage_Repository) GetGuestsIter() (resp []datatypes.Virtual_Guest, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getGuests", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getGuests", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve func (r Virtual_Storage_Repository) GetMetricTrackingObject() (resp datatypes.Metric_Tracking_Object_Virtual_Storage_Repository, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getMetricTrackingObject", nil, &r.Options, &resp) @@ -3366,6 +5560,30 @@ func (r Virtual_Storage_Repository) GetStorageLocations() (resp []datatypes.Loca return } +func (r Virtual_Storage_Repository) GetStorageLocationsIter() (resp []datatypes.Location, err error) { + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getStorageLocations", nil, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Location{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getStorageLocations", nil, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Retrieve A storage repository's [[SoftLayer_Virtual_Storage_Repository_Type|type]]. func (r Virtual_Storage_Repository) GetType() (resp datatypes.Virtual_Storage_Repository_Type, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getType", nil, &r.Options, &resp) @@ -3382,6 +5600,34 @@ func (r Virtual_Storage_Repository) GetUsageMetricDataByDate(startDateTime *data return } +func (r Virtual_Storage_Repository) GetUsageMetricDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { + params := []interface{}{ + startDateTime, + endDateTime, + } + limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getUsageMetricDataByDate", params, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Metric_Tracking_Object_Data{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getUsageMetricDataByDate", params, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return +} + // Returns a disk usage image based on disk usage specified by the input parameters. func (r Virtual_Storage_Repository) GetUsageMetricImageByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ diff --git a/sl/options.go b/sl/options.go index 394fb8e..98beb48 100644 --- a/sl/options.go +++ b/sl/options.go @@ -20,6 +20,7 @@ import ( "math" ) +var defaultLimit = 2 // Options contains the individual query parameters that can be applied to a request. type Options struct { Id *int @@ -31,8 +32,17 @@ type Options struct { } // returns Math.Ciel((TotalItems - Limit) / Limit) -func (opt Options) GetRemainingAPICalls() int { +func (opt *Options) GetRemainingAPICalls() int { Total := float64(opt.TotalItems) Limit := float64(*opt.Limit) return int(math.Ceil((Total - Limit) / Limit )) } + + +//Makes sure the limit is set to something, not 0 or 1. Will set to default if no other limit is set. +func (opt *Options) ValidateLimit() int { + if opt.Limit == nil || *opt.Limit < 2 { + opt.Limit = &defaultLimit + } + return *opt.Limit +} \ No newline at end of file From 78a53fa5e608cec287c2028dd78386c4bd387ed1 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Wed, 14 Feb 2024 15:32:09 -0600 Subject: [PATCH 3/7] Moving Iter Stuff to a helper package --- datatypes/billing.go | 8 + generator/templates.go | 62 +- helpers/virtual/virtual.go | 27 +- helpers/virtual/virtual_test.go | 33 + services/account.go | 5980 +-------------- services/auxiliary.go | 100 - services/billing.go | 2004 ----- services/brand.go | 394 - services/catalyst.go | 145 - services/compliance.go | 25 - services/configuration.go | 265 - services/dns.go | 238 - services/email.go | 73 - services/event.go | 100 - services/flexiblecredit.go | 52 - services/hardware.go | 11235 +--------------------------- services/layout.go | 223 - services/locale.go | 220 - services/location.go | 1105 --- services/marketplace.go | 103 - services/metric.go | 114 - services/network.go | 11887 +----------------------------- services/notification.go | 577 -- services/product.go | 2407 +----- services/provisioning.go | 235 - services/resource.go | 367 - services/sales.go | 49 - services/search.go | 79 - services/security.go | 250 - services/software.go | 505 -- services/survey.go | 25 - services/tag.go | 151 - services/ticket.go | 608 -- services/user.go | 3091 +------- services/verify.go | 49 - services/virtual.go | 2252 +----- 36 files changed, 133 insertions(+), 44905 deletions(-) create mode 100644 helpers/virtual/virtual_test.go diff --git a/datatypes/billing.go b/datatypes/billing.go index 69f4af1..bd900a3 100644 --- a/datatypes/billing.go +++ b/datatypes/billing.go @@ -1368,6 +1368,14 @@ type Billing_Item_Gateway_Appliance_Cluster struct { Billing_Item } +// The SoftLayer_Billing_Item_Gateway_License data type contains general information relating to a single SoftLayer billing item for a bare_metal_gateway_license +type Billing_Item_Gateway_License struct { + Billing_Item + + // no documentation yet + Resource *Network_Gateway `json:"resource,omitempty" xmlrpc:"resource,omitempty"` +} + // The SoftLayer_Billing_Item_Hardware data type contains general information relating to a single SoftLayer billing item for hardware. type Billing_Item_Hardware struct { Billing_Item diff --git a/generator/templates.go b/generator/templates.go index 6851165..5551c02 100644 --- a/generator/templates.go +++ b/generator/templates.go @@ -120,35 +120,7 @@ import ( {{end}}err = r.Session.DoRequest("{{$rawBase}}", "{{.Name}}", {{if len .Parameters | lt 0}}params{{else}}nil{{end}}, &r.Options, &resp) return } - {{if .TypeArray}} - func (r {{$base}}) {{.Name|titleCase}}Iter({{range .Parameters}}{{phraseMethodArg $methodName .Name .TypeArray .Type}}{{end}}) ({{if .Type|ne "void"}}resp {{if .TypeArray}}[]{{end}}{{convertType .Type "services"}}, {{end}}err error) { - {{if len .Parameters | lt 0}}params := []interface{}{ - {{range .Parameters}}{{.Name|removeReserved}}, - {{end}} - } - {{end}}limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("{{$rawBase}}", "{{.Name}}", {{if len .Parameters | lt 0}}params{{else}}nil{{end}}, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []{{convertType .Type "services"}}{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("{{$rawBase}}", "{{.Name}}", {{if len .Parameters | lt 0}}params{{else}}nil{{end}}, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return - } - {{end }} + {{end }} {{end}} @@ -216,3 +188,35 @@ var _ = Describe("{{(index . 0 ).ServiceGroup}} Tests", func() { {{ end }} }) ` + +// Not Used, but could be added to the Service template if you want ALL methods that accept a resultLimit to page through results +var IterTemplate = `{{if .TypeArray}} + func (r {{$base}}) {{.Name|titleCase}}Iter({{range .Parameters}}{{phraseMethodArg $methodName .Name .TypeArray .Type}}{{end}}) ({{if .Type|ne "void"}}resp {{if .TypeArray}}[]{{end}}{{convertType .Type "services"}}, {{end}}err error) { + {{if len .Parameters | lt 0}}params := []interface{}{ + {{range .Parameters}}{{.Name|removeReserved}}, + {{end}} + } + {{end}}limit := r.Options.ValidateLimit() + err = r.Session.DoRequest("{{$rawBase}}", "{{.Name}}", {{if len .Parameters | lt 0}}params{{else}}nil{{end}}, &r.Options, &resp) + if err != nil { + return + } + apicalls := r.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []{{convertType .Type "services"}}{} + options := r.Options + options.Offset = &offset + err = r.Session.DoRequest("{{$rawBase}}", "{{.Name}}", {{if len .Parameters | lt 0}}params{{else}}nil{{end}}, &options, &this_resp) + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return + } + {{end }} +` \ No newline at end of file diff --git a/helpers/virtual/virtual.go b/helpers/virtual/virtual.go index 7a5f15b..9d1193a 100644 --- a/helpers/virtual/virtual.go +++ b/helpers/virtual/virtual.go @@ -18,7 +18,7 @@ package virtual import ( "time" - + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/helpers/product" "github.com/softlayer/softlayer-go/services" @@ -159,3 +159,28 @@ func UpgradeVirtualGuestWithPreset( orderService := services.GetProductOrderService(sess) return orderService.PlaceOrder(&order, sl.Bool(false)) } + +func GetVirtualGuestsIter(service services.Account) (resp []datatypes.Virtual_Guest, err error) { + + resp, err = service.GetVirtualGuests() + limit := service.Options.ValidateLimit() + if err != nil { + return + } + apicalls := service.Options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Virtual_Guest{} + options := service.Options + options.Offset = &offset + this_resp, err = service.GetVirtualGuests() + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return resp, err +} \ No newline at end of file diff --git a/helpers/virtual/virtual_test.go b/helpers/virtual/virtual_test.go new file mode 100644 index 0000000..d8f68b3 --- /dev/null +++ b/helpers/virtual/virtual_test.go @@ -0,0 +1,33 @@ +package virtual_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + // "github.com/softlayer/softlayer-go/datatypes" + "github.com/softlayer/softlayer-go/services" + "github.com/softlayer/softlayer-go/helpers/virtual" + "github.com/softlayer/softlayer-go/session/sessionfakes" + "testing" +) + +func TestServices(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Helper Virtual Tests") +} + +var _ = Describe("Helper Virtual Tests", func() { + var slsession *sessionfakes.FakeSLSession + var sl_service services.Account + BeforeEach(func() { + slsession = &sessionfakes.FakeSLSession{} + sl_service = services.GetAccountService(slsession) + }) + + Context("GetVirtualGuestsIter Tests", func() { + It("API call made properly", func() { + _, err := virtual.GetVirtualGuestsIter(sl_service) + Expect(err).ToNot(HaveOccurred()) + Expect(slsession.DoRequestCallCount()).To(Equal(1)) + }) + }) +}) \ No newline at end of file diff --git a/services/account.go b/services/account.go index 10decb4..d962b41 100644 --- a/services/account.go +++ b/services/account.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -190,30 +189,6 @@ func (r Account) GetAbuseEmails() (resp []datatypes.Account_AbuseEmail, err erro return } -func (r Account) GetAbuseEmailsIter() (resp []datatypes.Account_AbuseEmail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAbuseEmails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_AbuseEmail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAbuseEmails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns an array of SoftLayer_Container_Network_Storage_Evault_WebCc_JobDetails objects for the given start and end dates. Start and end dates should be be valid ISO 8601 dates. The backupStatus can be one of null, 'success', 'failed', or 'conflict'. The 'success' backupStatus returns jobs with a status of 'COMPLETED', the 'failed' backupStatus returns jobs with a status of 'FAILED', while the 'conflict' backupStatus will return jobs that are not 'COMPLETED' or 'FAILED'. func (r Account) GetAccountBackupHistory(startDate *datatypes.Time, endDate *datatypes.Time, backupStatus *string) (resp []datatypes.Container_Network_Storage_Evault_WebCc_JobDetails, err error) { params := []interface{}{ @@ -225,125 +200,24 @@ func (r Account) GetAccountBackupHistory(startDate *datatypes.Time, endDate *dat return } -func (r Account) GetAccountBackupHistoryIter(startDate *datatypes.Time, endDate *datatypes.Time, backupStatus *string) (resp []datatypes.Container_Network_Storage_Evault_WebCc_JobDetails, err error) { - params := []interface{}{ - startDate, - endDate, - backupStatus, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAccountBackupHistory", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Evault_WebCc_JobDetails{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAccountBackupHistory", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The account contacts on an account. func (r Account) GetAccountContacts() (resp []datatypes.Account_Contact, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAccountContacts", nil, &r.Options, &resp) return } -func (r Account) GetAccountContactsIter() (resp []datatypes.Account_Contact, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAccountContacts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Contact{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAccountContacts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The account software licenses owned by an account func (r Account) GetAccountLicenses() (resp []datatypes.Software_AccountLicense, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAccountLicenses", nil, &r.Options, &resp) return } -func (r Account) GetAccountLicensesIter() (resp []datatypes.Software_AccountLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAccountLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_AccountLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAccountLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetAccountLinks() (resp []datatypes.Account_Link, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAccountLinks", nil, &r.Options, &resp) return } -func (r Account) GetAccountLinksIter() (resp []datatypes.Account_Link, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAccountLinks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Link{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAccountLinks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's status presented in a more detailed data type. func (r Account) GetAccountStatus() (resp datatypes.Account_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAccountStatus", nil, &r.Options, &resp) @@ -371,120 +245,24 @@ func (r Account) GetActiveAccountLicenses() (resp []datatypes.Software_AccountLi return } -func (r Account) GetActiveAccountLicensesIter() (resp []datatypes.Software_AccountLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveAccountLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_AccountLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveAccountLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The active address(es) that belong to an account. func (r Account) GetActiveAddresses() (resp []datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveAddresses", nil, &r.Options, &resp) return } -func (r Account) GetActiveAddressesIter() (resp []datatypes.Account_Address, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Address{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All active agreements for an account func (r Account) GetActiveAgreements() (resp []datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveAgreements", nil, &r.Options, &resp) return } -func (r Account) GetActiveAgreementsIter() (resp []datatypes.Account_Agreement, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveAgreements", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Agreement{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveAgreements", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All billing agreements for an account func (r Account) GetActiveBillingAgreements() (resp []datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveBillingAgreements", nil, &r.Options, &resp) return } -func (r Account) GetActiveBillingAgreementsIter() (resp []datatypes.Account_Agreement, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveBillingAgreements", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Agreement{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveBillingAgreements", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetActiveCatalystEnrollment() (resp datatypes.Catalyst_Enrollment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveCatalystEnrollment", nil, &r.Options, &resp) @@ -497,30 +275,6 @@ func (r Account) GetActiveColocationContainers() (resp []datatypes.Billing_Item, return } -func (r Account) GetActiveColocationContainersIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveColocationContainers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveColocationContainers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [Deprecated] Please use SoftLayer_Account::activeFlexibleCreditEnrollments. func (r Account) GetActiveFlexibleCreditEnrollment() (resp datatypes.FlexibleCredit_Enrollment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveFlexibleCreditEnrollment", nil, &r.Options, &resp) @@ -533,60 +287,12 @@ func (r Account) GetActiveFlexibleCreditEnrollments() (resp []datatypes.Flexible return } -func (r Account) GetActiveFlexibleCreditEnrollmentsIter() (resp []datatypes.FlexibleCredit_Enrollment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveFlexibleCreditEnrollments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.FlexibleCredit_Enrollment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveFlexibleCreditEnrollments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetActiveNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveNotificationSubscribers", nil, &r.Options, &resp) return } -func (r Account) GetActiveNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveNotificationSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveNotificationSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This is deprecated and will not return any results. // Deprecated: This function has been marked as deprecated. func (r Account) GetActiveOutletPackages() (resp []datatypes.Product_Package, err error) { @@ -594,30 +300,6 @@ func (r Account) GetActiveOutletPackages() (resp []datatypes.Product_Package, er return } -func (r Account) GetActiveOutletPackagesIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveOutletPackages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveOutletPackages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information. // // Packages that have been retired will not appear in this result set. @@ -626,30 +308,6 @@ func (r Account) GetActivePackages() (resp []datatypes.Product_Package, err erro return } -func (r Account) GetActivePackagesIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActivePackages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActivePackages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is deprecated and should not be used in production code. // // This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software filtered by an attribute type associated with the package. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information. @@ -662,33 +320,6 @@ func (r Account) GetActivePackagesByAttribute(attributeKeyName *string) (resp [] return } -func (r Account) GetActivePackagesByAttributeIter(attributeKeyName *string) (resp []datatypes.Product_Package, err error) { - params := []interface{}{ - attributeKeyName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActivePackagesByAttribute", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActivePackagesByAttribute", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // [DEPRECATED] This method pulls all the active private hosted cloud packages. This will give you a basic description of the packages that are currently active and from which you can order private hosted cloud configurations. // Deprecated: This function has been marked as deprecated. func (r Account) GetActivePrivateHostedCloudPackages() (resp []datatypes.Product_Package, err error) { @@ -696,180 +327,36 @@ func (r Account) GetActivePrivateHostedCloudPackages() (resp []datatypes.Product return } -func (r Account) GetActivePrivateHostedCloudPackagesIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActivePrivateHostedCloudPackages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActivePrivateHostedCloudPackages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's non-expired quotes. func (r Account) GetActiveQuotes() (resp []datatypes.Billing_Order_Quote, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveQuotes", nil, &r.Options, &resp) return } -func (r Account) GetActiveQuotesIter() (resp []datatypes.Billing_Order_Quote, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveQuotes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Quote{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveQuotes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Active reserved capacity agreements for an account func (r Account) GetActiveReservedCapacityAgreements() (resp []datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveReservedCapacityAgreements", nil, &r.Options, &resp) return } -func (r Account) GetActiveReservedCapacityAgreementsIter() (resp []datatypes.Account_Agreement, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveReservedCapacityAgreements", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Agreement{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveReservedCapacityAgreements", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The virtual software licenses controlled by an account func (r Account) GetActiveVirtualLicenses() (resp []datatypes.Software_VirtualLicense, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getActiveVirtualLicenses", nil, &r.Options, &resp) return } -func (r Account) GetActiveVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getActiveVirtualLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_VirtualLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getActiveVirtualLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated load balancers. func (r Account) GetAdcLoadBalancers() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAdcLoadBalancers", nil, &r.Options, &resp) return } -func (r Account) GetAdcLoadBalancersIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAdcLoadBalancers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAdcLoadBalancers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All the address(es) that belong to an account. func (r Account) GetAddresses() (resp []datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAddresses", nil, &r.Options, &resp) return } -func (r Account) GetAddressesIter() (resp []datatypes.Account_Address, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Address{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An affiliate identifier associated with the customer account. func (r Account) GetAffiliateId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAffiliateId", nil, &r.Options, &resp) @@ -882,210 +369,42 @@ func (r Account) GetAllBillingItems() (resp []datatypes.Billing_Item, err error) return } -func (r Account) GetAllBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAllBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAllBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing items that will be on an account's next invoice. func (r Account) GetAllCommissionBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllCommissionBillingItems", nil, &r.Options, &resp) return } -func (r Account) GetAllCommissionBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAllCommissionBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAllCommissionBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing items that will be on an account's next invoice. func (r Account) GetAllRecurringTopLevelBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItems", nil, &r.Options, &resp) return } -func (r Account) GetAllRecurringTopLevelBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing items that will be on an account's next invoice. Does not consider associated items. func (r Account) GetAllRecurringTopLevelBillingItemsUnfiltered() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItemsUnfiltered", nil, &r.Options, &resp) return } -func (r Account) GetAllRecurringTopLevelBillingItemsUnfilteredIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItemsUnfiltered", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAllRecurringTopLevelBillingItemsUnfiltered", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing items that will be on an account's next invoice. func (r Account) GetAllSubnetBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllSubnetBillingItems", nil, &r.Options, &resp) return } -func (r Account) GetAllSubnetBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAllSubnetBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAllSubnetBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All billing items of an account. func (r Account) GetAllTopLevelBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItems", nil, &r.Options, &resp) return } -func (r Account) GetAllTopLevelBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing items that will be on an account's next invoice. Does not consider associated items. func (r Account) GetAllTopLevelBillingItemsUnfiltered() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItemsUnfiltered", nil, &r.Options, &resp) return } -func (r Account) GetAllTopLevelBillingItemsUnfilteredIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItemsUnfiltered", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAllTopLevelBillingItemsUnfiltered", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Indicates whether this account is allowed to silently migrate to use IBMid Authentication. func (r Account) GetAllowIbmIdSilentMigrationFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAllowIbmIdSilentMigrationFlag", nil, &r.Options, &resp) @@ -1110,30 +429,6 @@ func (r Account) GetApplicationDeliveryControllers() (resp []datatypes.Network_A return } -func (r Account) GetApplicationDeliveryControllersIter() (resp []datatypes.Network_Application_Delivery_Controller, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getApplicationDeliveryControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getApplicationDeliveryControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a single [[SoftLayer_Account_Attribute]] record by its [[SoftLayer_Account_Attribute_Type|types's]] key name. func (r Account) GetAttributeByType(attributeType *string) (resp datatypes.Account_Attribute, err error) { params := []interface{}{ @@ -1149,90 +444,18 @@ func (r Account) GetAttributes() (resp []datatypes.Account_Attribute, err error) return } -func (r Account) GetAttributesIter() (resp []datatypes.Account_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account) GetAuxiliaryNotifications() (resp []datatypes.Container_Utility_Message, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAuxiliaryNotifications", nil, &r.Options, &resp) return } -func (r Account) GetAuxiliaryNotificationsIter() (resp []datatypes.Container_Utility_Message, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAuxiliaryNotifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_Message{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAuxiliaryNotifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The public network VLANs assigned to an account. func (r Account) GetAvailablePublicNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getAvailablePublicNetworkVlans", nil, &r.Options, &resp) return } -func (r Account) GetAvailablePublicNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getAvailablePublicNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getAvailablePublicNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns the average disk space usage for all archive repositories. func (r Account) GetAverageArchiveUsageMetricDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -1265,90 +488,18 @@ func (r Account) GetBandwidthAllotments() (resp []datatypes.Network_Bandwidth_Ve return } -func (r Account) GetBandwidthAllotmentsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The bandwidth allotments for an account currently over allocation. func (r Account) GetBandwidthAllotmentsOverAllocation() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsOverAllocation", nil, &r.Options, &resp) return } -func (r Account) GetBandwidthAllotmentsOverAllocationIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsOverAllocation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsOverAllocation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The bandwidth allotments for an account projected to go over allocation. func (r Account) GetBandwidthAllotmentsProjectedOverAllocation() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsProjectedOverAllocation", nil, &r.Options, &resp) return } -func (r Account) GetBandwidthAllotmentsProjectedOverAllocationIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsProjectedOverAllocation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthAllotmentsProjectedOverAllocation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account) GetBandwidthList(networkType *string, direction *string, startDate *string, endDate *string, serverIds []int) (resp []datatypes.Container_Bandwidth_Usage, err error) { params := []interface{}{ @@ -1362,97 +513,18 @@ func (r Account) GetBandwidthList(networkType *string, direction *string, startD return } -func (r Account) GetBandwidthListIter(networkType *string, direction *string, startDate *string, endDate *string, serverIds []int) (resp []datatypes.Container_Bandwidth_Usage, err error) { - params := []interface{}{ - networkType, - direction, - startDate, - endDate, - serverIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Bandwidth_Usage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getBandwidthList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated bare metal server objects. func (r Account) GetBareMetalInstances() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBareMetalInstances", nil, &r.Options, &resp) return } -func (r Account) GetBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getBareMetalInstances", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getBareMetalInstances", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All billing agreements for an account func (r Account) GetBillingAgreements() (resp []datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBillingAgreements", nil, &r.Options, &resp) return } -func (r Account) GetBillingAgreementsIter() (resp []datatypes.Account_Agreement, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getBillingAgreements", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Agreement{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getBillingAgreements", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's billing information. func (r Account) GetBillingInfo() (resp datatypes.Billing_Info, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBillingInfo", nil, &r.Options, &resp) @@ -1465,30 +537,6 @@ func (r Account) GetBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_ return } -func (r Account) GetBlockDeviceTemplateGroupsIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getBlockDeviceTemplateGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getBlockDeviceTemplateGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetBluemixAccountId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getBluemixAccountId", nil, &r.Options, &resp) @@ -1543,90 +591,18 @@ func (r Account) GetCarts() (resp []datatypes.Billing_Order_Quote, err error) { return } -func (r Account) GetCartsIter() (resp []datatypes.Billing_Order_Quote, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getCarts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Quote{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getCarts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetCatalystEnrollments() (resp []datatypes.Catalyst_Enrollment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getCatalystEnrollments", nil, &r.Options, &resp) return } -func (r Account) GetCatalystEnrollmentsIter() (resp []datatypes.Catalyst_Enrollment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getCatalystEnrollments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Catalyst_Enrollment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getCatalystEnrollments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All closed tickets associated with an account. func (r Account) GetClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getClosedTickets", nil, &r.Options, &resp) return } -func (r Account) GetClosedTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getClosedTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getClosedTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the user record of the user calling the SoftLayer API. func (r Account) GetCurrentUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getCurrentUser", nil, &r.Options, &resp) @@ -1639,60 +615,12 @@ func (r Account) GetDatacentersWithSubnetAllocations() (resp []datatypes.Locatio return } -func (r Account) GetDatacentersWithSubnetAllocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getDatacentersWithSubnetAllocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getDatacentersWithSubnetAllocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated virtual dedicated host objects. func (r Account) GetDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHosts", nil, &r.Options, &resp) return } -func (r Account) GetDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_DedicatedHost{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This returns a collection of dedicated hosts that are valid for a given image template. func (r Account) GetDedicatedHostsForImageTemplate(imageTemplateId *int) (resp []datatypes.Virtual_DedicatedHost, err error) { params := []interface{}{ @@ -1702,33 +630,6 @@ func (r Account) GetDedicatedHostsForImageTemplate(imageTemplateId *int) (resp [ return } -func (r Account) GetDedicatedHostsForImageTemplateIter(imageTemplateId *int) (resp []datatypes.Virtual_DedicatedHost, err error) { - params := []interface{}{ - imageTemplateId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHostsForImageTemplate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_DedicatedHost{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getDedicatedHostsForImageTemplate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating whether payments are processed for this account. func (r Account) GetDisablePaymentProcessingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getDisablePaymentProcessingFlag", nil, &r.Options, &resp) @@ -1741,90 +642,18 @@ func (r Account) GetDisplaySupportRepresentativeAssignments() (resp []datatypes. return } -func (r Account) GetDisplaySupportRepresentativeAssignmentsIter() (resp []datatypes.Account_Attachment_Employee, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getDisplaySupportRepresentativeAssignments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Attachment_Employee{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getDisplaySupportRepresentativeAssignments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The DNS domains associated with an account. func (r Account) GetDomains() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getDomains", nil, &r.Options, &resp) return } -func (r Account) GetDomainsIter() (resp []datatypes.Dns_Domain, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getDomains", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getDomains", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The DNS domains associated with an account that were not created as a result of a secondary DNS zone transfer. func (r Account) GetDomainsWithoutSecondaryDnsRecords() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getDomainsWithoutSecondaryDnsRecords", nil, &r.Options, &resp) return } -func (r Account) GetDomainsWithoutSecondaryDnsRecordsIter() (resp []datatypes.Dns_Domain, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getDomainsWithoutSecondaryDnsRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getDomainsWithoutSecondaryDnsRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Boolean flag dictating whether or not this account has the EU Supported flag. This flag indicates that this account uses IBM Cloud services to process EU citizen's personal data. func (r Account) GetEuSupportedFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getEuSupportedFlag", nil, &r.Options, &resp) @@ -1843,120 +672,24 @@ func (r Account) GetEvaultMasterUsers() (resp []datatypes.Account_Password, err return } -func (r Account) GetEvaultMasterUsersIter() (resp []datatypes.Account_Password, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getEvaultMasterUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Password{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getEvaultMasterUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated EVault storage volumes. func (r Account) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } -func (r Account) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getEvaultNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getEvaultNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Stored security certificates that are expired (ie. SSL) func (r Account) GetExpiredSecurityCertificates() (resp []datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getExpiredSecurityCertificates", nil, &r.Options, &resp) return } -func (r Account) GetExpiredSecurityCertificatesIter() (resp []datatypes.Security_Certificate, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getExpiredSecurityCertificates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Certificate{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getExpiredSecurityCertificates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Logs of who entered a colocation area which is assigned to this account, or when a user under this account enters a datacenter. func (r Account) GetFacilityLogs() (resp []datatypes.User_Access_Facility_Log, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getFacilityLogs", nil, &r.Options, &resp) return } -func (r Account) GetFacilityLogsIter() (resp []datatypes.User_Access_Facility_Log, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getFacilityLogs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Access_Facility_Log{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getFacilityLogs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetFileBlockBetaAccessFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getFileBlockBetaAccessFlag", nil, &r.Options, &resp) @@ -1969,30 +702,6 @@ func (r Account) GetFlexibleCreditEnrollments() (resp []datatypes.FlexibleCredit return } -func (r Account) GetFlexibleCreditEnrollmentsIter() (resp []datatypes.FlexibleCredit_Enrollment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getFlexibleCreditEnrollments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.FlexibleCredit_Enrollment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getFlexibleCreditEnrollments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // [DEPRECATED] Please use SoftLayer_Account::getFlexibleCreditProgramsInfo. // // This method will return a [[SoftLayer_Container_Account_Discount_Program]] object containing the Flexible Credit Program information for this account. To be considered an active participant, the account must have an enrollment record with a monthly credit amount set and the current date must be within the range defined by the enrollment and graduation date. The forNextBillCycle parameter can be set to true to return a SoftLayer_Container_Account_Discount_Program object with information with relation to the next bill cycle. The forNextBillCycle parameter defaults to false. Please note that all discount amount entries are reported as pre-tax amounts and the legacy tax fields in the [[SoftLayer_Container_Account_Discount_Program]] are deprecated. @@ -2026,540 +735,108 @@ func (r Account) GetGlobalIpRecords() (resp []datatypes.Network_Subnet_IpAddress return } -func (r Account) GetGlobalIpRecordsIter() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress_Global{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetGlobalIpv4Records() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv4Records", nil, &r.Options, &resp) return } -func (r Account) GetGlobalIpv4RecordsIter() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv4Records", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress_Global{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv4Records", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetGlobalIpv6Records() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv6Records", nil, &r.Options, &resp) return } -func (r Account) GetGlobalIpv6RecordsIter() (resp []datatypes.Network_Subnet_IpAddress_Global, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv6Records", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress_Global{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getGlobalIpv6Records", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [Deprecated] The global load balancer accounts for a softlayer customer account. func (r Account) GetGlobalLoadBalancerAccounts() (resp []datatypes.Network_LoadBalancer_Global_Account, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getGlobalLoadBalancerAccounts", nil, &r.Options, &resp) return } -func (r Account) GetGlobalLoadBalancerAccountsIter() (resp []datatypes.Network_LoadBalancer_Global_Account, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getGlobalLoadBalancerAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LoadBalancer_Global_Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getGlobalLoadBalancerAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated hardware objects. func (r Account) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardware", nil, &r.Options, &resp) return } -func (r Account) GetHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated hardware objects currently over bandwidth allocation. func (r Account) GetHardwareOverBandwidthAllocation() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareOverBandwidthAllocation", nil, &r.Options, &resp) return } -func (r Account) GetHardwareOverBandwidthAllocationIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareOverBandwidthAllocation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareOverBandwidthAllocation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Return a collection of managed hardware pools. func (r Account) GetHardwarePools() (resp []datatypes.Container_Hardware_Pool_Details, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwarePools", nil, &r.Options, &resp) return } -func (r Account) GetHardwarePoolsIter() (resp []datatypes.Container_Hardware_Pool_Details, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwarePools", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Pool_Details{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwarePools", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated hardware objects projected to go over bandwidth allocation. func (r Account) GetHardwareProjectedOverBandwidthAllocation() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareProjectedOverBandwidthAllocation", nil, &r.Options, &resp) return } -func (r Account) GetHardwareProjectedOverBandwidthAllocationIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareProjectedOverBandwidthAllocation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareProjectedOverBandwidthAllocation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has the cPanel web hosting control panel installed. func (r Account) GetHardwareWithCpanel() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithCpanel", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithCpanelIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithCpanel", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithCpanel", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has the Helm web hosting control panel installed. func (r Account) GetHardwareWithHelm() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithHelm", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithHelmIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithHelm", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithHelm", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has McAfee Secure software components. func (r Account) GetHardwareWithMcafee() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafee", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithMcafeeIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafee", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafee", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has McAfee Secure AntiVirus for Redhat software components. func (r Account) GetHardwareWithMcafeeAntivirusRedhat() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusRedhat", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithMcafeeAntivirusRedhatIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusRedhat", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusRedhat", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has McAfee Secure AntiVirus for Windows software components. func (r Account) GetHardwareWithMcafeeAntivirusWindows() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusWindows", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithMcafeeAntivirusWindowsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusWindows", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeAntivirusWindows", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has McAfee Secure Intrusion Detection System software components. func (r Account) GetHardwareWithMcafeeIntrusionDetectionSystem() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeIntrusionDetectionSystem", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithMcafeeIntrusionDetectionSystemIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeIntrusionDetectionSystem", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithMcafeeIntrusionDetectionSystem", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has the Plesk web hosting control panel installed. func (r Account) GetHardwareWithPlesk() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithPlesk", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithPleskIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithPlesk", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithPlesk", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has the QuantaStor storage system installed. func (r Account) GetHardwareWithQuantastor() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithQuantastor", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithQuantastorIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithQuantastor", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithQuantastor", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that has the Urchin web traffic analytics package installed. func (r Account) GetHardwareWithUrchin() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithUrchin", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithUrchinIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithUrchin", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithUrchin", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware associated with an account that is running a version of the Microsoft Windows operating system. func (r Account) GetHardwareWithWindows() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithWindows", nil, &r.Options, &resp) return } -func (r Account) GetHardwareWithWindowsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithWindows", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHardwareWithWindows", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Return 1 if one of the account's hardware has the EVault Bare Metal Server Restore Plugin otherwise 0. func (r Account) GetHasEvaultBareMetalRestorePluginFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHasEvaultBareMetalRestorePluginFlag", nil, &r.Options, &resp) @@ -2590,120 +867,24 @@ func (r Account) GetHourlyBareMetalInstances() (resp []datatypes.Hardware, err e return } -func (r Account) GetHourlyBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHourlyBareMetalInstances", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHourlyBareMetalInstances", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Hourly service billing items that will be on an account's next invoice. func (r Account) GetHourlyServiceBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHourlyServiceBillingItems", nil, &r.Options, &resp) return } -func (r Account) GetHourlyServiceBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHourlyServiceBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHourlyServiceBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated hourly virtual guest objects. func (r Account) GetHourlyVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHourlyVirtualGuests", nil, &r.Options, &resp) return } -func (r Account) GetHourlyVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHourlyVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHourlyVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated Virtual Storage volumes. func (r Account) GetHubNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getHubNetworkStorage", nil, &r.Options, &resp) return } -func (r Account) GetHubNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getHubNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getHubNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Unique identifier for a customer used throughout IBM. func (r Account) GetIbmCustomerNumber() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getIbmCustomerNumber", nil, &r.Options, &resp) @@ -2746,30 +927,6 @@ func (r Account) GetInternalNotes() (resp []datatypes.Account_Note, err error) { return } -func (r Account) GetInternalNotesIter() (resp []datatypes.Account_Note, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getInternalNotes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Note{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getInternalNotes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Account attribute flag indicating restricted account. func (r Account) GetInternalRestrictionFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getInternalRestrictionFlag", nil, &r.Options, &resp) @@ -2782,60 +939,12 @@ func (r Account) GetInvoices() (resp []datatypes.Billing_Invoice, err error) { return } -func (r Account) GetInvoicesIter() (resp []datatypes.Billing_Invoice, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getInvoices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getInvoices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getIpAddresses", nil, &r.Options, &resp) return } -func (r Account) GetIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetIscsiIsolationDisabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getIscsiIsolationDisabled", nil, &r.Options, &resp) @@ -2848,30 +957,6 @@ func (r Account) GetIscsiNetworkStorage() (resp []datatypes.Network_Storage, err return } -func (r Account) GetIscsiNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getIscsiNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getIscsiNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Computes the number of available public secondary IP addresses, aligned to a subnet size. func (r Account) GetLargestAllowedSubnetCidr(numberOfHosts *int, locationId *int) (resp int, err error) { params := []interface{}{ @@ -2900,180 +985,36 @@ func (r Account) GetLastFiveClosedAbuseTickets() (resp []datatypes.Ticket, err e return } -func (r Account) GetLastFiveClosedAbuseTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAbuseTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAbuseTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The five most recently closed accounting tickets associated with an account. func (r Account) GetLastFiveClosedAccountingTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAccountingTickets", nil, &r.Options, &resp) return } -func (r Account) GetLastFiveClosedAccountingTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAccountingTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedAccountingTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The five most recently closed tickets that do not belong to the abuse, accounting, sales, or support groups associated with an account. func (r Account) GetLastFiveClosedOtherTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedOtherTickets", nil, &r.Options, &resp) return } -func (r Account) GetLastFiveClosedOtherTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedOtherTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedOtherTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The five most recently closed sales tickets associated with an account. func (r Account) GetLastFiveClosedSalesTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSalesTickets", nil, &r.Options, &resp) return } -func (r Account) GetLastFiveClosedSalesTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSalesTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSalesTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The five most recently closed support tickets associated with an account. func (r Account) GetLastFiveClosedSupportTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSupportTickets", nil, &r.Options, &resp) return } -func (r Account) GetLastFiveClosedSupportTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSupportTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedSupportTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The five most recently closed tickets associated with an account. func (r Account) GetLastFiveClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedTickets", nil, &r.Options, &resp) return } -func (r Account) GetLastFiveClosedTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLastFiveClosedTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's most recent billing date. func (r Account) GetLatestBillDate() (resp datatypes.Time, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLatestBillDate", nil, &r.Options, &resp) @@ -3098,30 +1039,6 @@ func (r Account) GetLegacyBandwidthAllotments() (resp []datatypes.Network_Bandwi return } -func (r Account) GetLegacyBandwidthAllotmentsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLegacyBandwidthAllotments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLegacyBandwidthAllotments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The total capacity of Legacy iSCSI Volumes on an account, in GB. func (r Account) GetLegacyIscsiCapacityGB() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLegacyIscsiCapacityGB", nil, &r.Options, &resp) @@ -3134,30 +1051,6 @@ func (r Account) GetLoadBalancers() (resp []datatypes.Network_LoadBalancer_Virtu return } -func (r Account) GetLoadBalancersIter() (resp []datatypes.Network_LoadBalancer_VirtualIpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLoadBalancers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LoadBalancer_VirtualIpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLoadBalancers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The total capacity of Legacy lockbox Volumes on an account, in GB. func (r Account) GetLockboxCapacityGB() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getLockboxCapacityGB", nil, &r.Options, &resp) @@ -3170,60 +1063,12 @@ func (r Account) GetLockboxNetworkStorage() (resp []datatypes.Network_Storage, e return } -func (r Account) GetLockboxNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getLockboxNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getLockboxNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetManualPaymentsUnderReview() (resp []datatypes.Billing_Payment_Card_ManualPayment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getManualPaymentsUnderReview", nil, &r.Options, &resp) return } -func (r Account) GetManualPaymentsUnderReviewIter() (resp []datatypes.Billing_Payment_Card_ManualPayment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getManualPaymentsUnderReview", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Payment_Card_ManualPayment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getManualPaymentsUnderReview", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's master user. func (r Account) GetMasterUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getMasterUser", nil, &r.Options, &resp) @@ -3236,30 +1081,6 @@ func (r Account) GetMediaDataTransferRequests() (resp []datatypes.Account_Media_ return } -func (r Account) GetMediaDataTransferRequestsIter() (resp []datatypes.Account_Media_Data_Transfer_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getMediaDataTransferRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Media_Data_Transfer_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getMediaDataTransferRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [DEPRECATED] - An accounts metric tracking object. This object records all periodic polled data available to this account. func (r Account) GetMetricTrackingObject() (resp datatypes.Metric_Tracking_Object, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getMetricTrackingObject", nil, &r.Options, &resp) @@ -3278,120 +1099,24 @@ func (r Account) GetMonthlyBareMetalInstances() (resp []datatypes.Hardware, err return } -func (r Account) GetMonthlyBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyBareMetalInstances", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyBareMetalInstances", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated monthly virtual guest objects. func (r Account) GetMonthlyVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyVirtualGuests", nil, &r.Options, &resp) return } -func (r Account) GetMonthlyVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getMonthlyVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated NAS storage volumes. func (r Account) GetNasNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNasNetworkStorage", nil, &r.Options, &resp) return } -func (r Account) GetNasNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNasNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNasNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This returns a collection of active NetApp software account license keys. func (r Account) GetNetAppActiveAccountLicenseKeys() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetAppActiveAccountLicenseKeys", nil, &r.Options, &resp) return } -func (r Account) GetNetAppActiveAccountLicenseKeysIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetAppActiveAccountLicenseKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetAppActiveAccountLicenseKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [Deprecated] Whether or not this account can define their own networks. func (r Account) GetNetworkCreationFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkCreationFlag", nil, &r.Options, &resp) @@ -3404,360 +1129,72 @@ func (r Account) GetNetworkGateways() (resp []datatypes.Network_Gateway, err err return } -func (r Account) GetNetworkGatewaysIter() (resp []datatypes.Network_Gateway, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkGateways", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkGateways", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated network hardware. func (r Account) GetNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkHardware", nil, &r.Options, &resp) return } -func (r Account) GetNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetNetworkMessageDeliveryAccounts() (resp []datatypes.Network_Message_Delivery, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMessageDeliveryAccounts", nil, &r.Options, &resp) return } -func (r Account) GetNetworkMessageDeliveryAccountsIter() (resp []datatypes.Network_Message_Delivery, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMessageDeliveryAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Message_Delivery{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMessageDeliveryAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Hardware which is currently experiencing a service failure. func (r Account) GetNetworkMonitorDownHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownHardware", nil, &r.Options, &resp) return } -func (r Account) GetNetworkMonitorDownHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Virtual guest which is currently experiencing a service failure. func (r Account) GetNetworkMonitorDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownVirtualGuests", nil, &r.Options, &resp) return } -func (r Account) GetNetworkMonitorDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorDownVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Hardware which is currently recovering from a service failure. func (r Account) GetNetworkMonitorRecoveringHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringHardware", nil, &r.Options, &resp) return } -func (r Account) GetNetworkMonitorRecoveringHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Virtual guest which is currently recovering from a service failure. func (r Account) GetNetworkMonitorRecoveringVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringVirtualGuests", nil, &r.Options, &resp) return } -func (r Account) GetNetworkMonitorRecoveringVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorRecoveringVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Hardware which is currently online. func (r Account) GetNetworkMonitorUpHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpHardware", nil, &r.Options, &resp) return } -func (r Account) GetNetworkMonitorUpHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Virtual guest which is currently online. func (r Account) GetNetworkMonitorUpVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpVirtualGuests", nil, &r.Options, &resp) return } -func (r Account) GetNetworkMonitorUpVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkMonitorUpVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated storage volumes. This includes Lockbox, NAS, EVault, and iSCSI volumes. func (r Account) GetNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorage", nil, &r.Options, &resp) return } -func (r Account) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's Network Storage groups. func (r Account) GetNetworkStorageGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorageGroups", nil, &r.Options, &resp) return } -func (r Account) GetNetworkStorageGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve IPSec network tunnels for an account. func (r Account) GetNetworkTunnelContexts() (resp []datatypes.Network_Tunnel_Module_Context, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkTunnelContexts", nil, &r.Options, &resp) return } -func (r Account) GetNetworkTunnelContextsIter() (resp []datatypes.Network_Tunnel_Module_Context, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkTunnelContexts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Tunnel_Module_Context{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkTunnelContexts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not an account has automatic private VLAN spanning enabled. func (r Account) GetNetworkVlanSpan() (resp datatypes.Account_Network_Vlan_Span, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNetworkVlanSpan", nil, &r.Options, &resp) @@ -3770,60 +1207,12 @@ func (r Account) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { return } -func (r Account) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve DEPRECATED - This information can be pulled directly through tapping keys now - DEPRECATED. The allotments for this account and their servers for the next billing cycle. The public inbound and outbound bandwidth is calculated for each server in addition to the daily average network traffic since the last billing date. func (r Account) GetNextBillingPublicAllotmentHardwareBandwidthDetails() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNextBillingPublicAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) return } -func (r Account) GetNextBillingPublicAllotmentHardwareBandwidthDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNextBillingPublicAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNextBillingPublicAllotmentHardwareBandwidthDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Return an account's next invoice in a Microsoft excel format. The "next invoice" is what a customer will be billed on their next invoice, assuming no changes are made. Currently this does not include Bandwidth Pooling charges. func (r Account) GetNextInvoiceExcel(documentCreateDate *datatypes.Time) (resp []byte, err error) { params := []interface{}{ @@ -3869,30 +1258,6 @@ func (r Account) GetNextInvoiceTopLevelBillingItems() (resp []datatypes.Billing_ return } -func (r Account) GetNextInvoiceTopLevelBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceTopLevelBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceTopLevelBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The pre-tax total amount of an account's next invoice measured in US Dollars ($USD), assuming no changes or charges occur between now and time of billing. func (r Account) GetNextInvoiceTotalAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceTotalAmount", nil, &r.Options, &resp) @@ -3941,60 +1306,12 @@ func (r Account) GetNextInvoiceZeroFeeItemCounts() (resp []datatypes.Container_P return } -func (r Account) GetNextInvoiceZeroFeeItemCountsIter() (resp []datatypes.Container_Product_Item_Category_ZeroFee_Count, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceZeroFeeItemCounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Product_Item_Category_ZeroFee_Count{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNextInvoiceZeroFeeItemCounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getNotificationSubscribers", nil, &r.Options, &resp) return } -func (r Account) GetNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getNotificationSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getNotificationSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Account object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Account service. You can only retrieve the account that your portal user is assigned to. func (r Account) GetObject() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getObject", nil, &r.Options, &resp) @@ -4007,570 +1324,114 @@ func (r Account) GetOpenAbuseTickets() (resp []datatypes.Ticket, err error) { return } -func (r Account) GetOpenAbuseTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenAbuseTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenAbuseTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The open accounting tickets associated with an account. func (r Account) GetOpenAccountingTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenAccountingTickets", nil, &r.Options, &resp) return } -func (r Account) GetOpenAccountingTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenAccountingTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenAccountingTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The open billing tickets associated with an account. func (r Account) GetOpenBillingTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenBillingTickets", nil, &r.Options, &resp) return } -func (r Account) GetOpenBillingTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenBillingTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenBillingTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An open ticket requesting cancellation of this server, if one exists. func (r Account) GetOpenCancellationRequests() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenCancellationRequests", nil, &r.Options, &resp) return } -func (r Account) GetOpenCancellationRequestsIter() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenCancellationRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Cancellation_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenCancellationRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The open tickets that do not belong to the abuse, accounting, sales, or support groups associated with an account. func (r Account) GetOpenOtherTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenOtherTickets", nil, &r.Options, &resp) return } -func (r Account) GetOpenOtherTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenOtherTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenOtherTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's recurring invoices. func (r Account) GetOpenRecurringInvoices() (resp []datatypes.Billing_Invoice, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenRecurringInvoices", nil, &r.Options, &resp) return } -func (r Account) GetOpenRecurringInvoicesIter() (resp []datatypes.Billing_Invoice, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenRecurringInvoices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenRecurringInvoices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The open sales tickets associated with an account. func (r Account) GetOpenSalesTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenSalesTickets", nil, &r.Options, &resp) return } -func (r Account) GetOpenSalesTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenSalesTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenSalesTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetOpenStackAccountLinks() (resp []datatypes.Account_Link, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackAccountLinks", nil, &r.Options, &resp) return } -func (r Account) GetOpenStackAccountLinksIter() (resp []datatypes.Account_Link, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackAccountLinks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Link{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackAccountLinks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated Openstack related Object Storage accounts. func (r Account) GetOpenStackObjectStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackObjectStorage", nil, &r.Options, &resp) return } -func (r Account) GetOpenStackObjectStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackObjectStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenStackObjectStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The open support tickets associated with an account. func (r Account) GetOpenSupportTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenSupportTickets", nil, &r.Options, &resp) return } -func (r Account) GetOpenSupportTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenSupportTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenSupportTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All open tickets associated with an account. func (r Account) GetOpenTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenTickets", nil, &r.Options, &resp) return } -func (r Account) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All open tickets associated with an account last edited by an employee. func (r Account) GetOpenTicketsWaitingOnCustomer() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOpenTicketsWaitingOnCustomer", nil, &r.Options, &resp) return } -func (r Account) GetOpenTicketsWaitingOnCustomerIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOpenTicketsWaitingOnCustomer", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOpenTicketsWaitingOnCustomer", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated billing orders excluding upgrades. func (r Account) GetOrders() (resp []datatypes.Billing_Order, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOrders", nil, &r.Options, &resp) return } -func (r Account) GetOrdersIter() (resp []datatypes.Billing_Order, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOrders", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOrders", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing items that have no parent billing item. These are items that don't necessarily belong to a single server. func (r Account) GetOrphanBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOrphanBillingItems", nil, &r.Options, &resp) return } -func (r Account) GetOrphanBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOrphanBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOrphanBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetOwnedBrands() (resp []datatypes.Brand, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOwnedBrands", nil, &r.Options, &resp) return } -func (r Account) GetOwnedBrandsIter() (resp []datatypes.Brand, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOwnedBrands", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Brand{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOwnedBrands", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetOwnedHardwareGenericComponentModels() (resp []datatypes.Hardware_Component_Model_Generic, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getOwnedHardwareGenericComponentModels", nil, &r.Options, &resp) return } -func (r Account) GetOwnedHardwareGenericComponentModelsIter() (resp []datatypes.Hardware_Component_Model_Generic, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getOwnedHardwareGenericComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model_Generic{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getOwnedHardwareGenericComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetPaymentProcessors() (resp []datatypes.Billing_Payment_Processor, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPaymentProcessors", nil, &r.Options, &resp) return } -func (r Account) GetPaymentProcessorsIter() (resp []datatypes.Billing_Payment_Processor, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPaymentProcessors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Payment_Processor{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPaymentProcessors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Before being approved for general use, a credit card must be approved by a SoftLayer agent. Once a credit card change request has been either approved or denied, the change request will no longer appear in the list of pending change requests. This method will return a list of all pending change requests as well as a portion of the data from the original request. func (r Account) GetPendingCreditCardChangeRequestData() (resp []datatypes.Container_Account_Payment_Method_CreditCard, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPendingCreditCardChangeRequestData", nil, &r.Options, &resp) return } -func (r Account) GetPendingCreditCardChangeRequestDataIter() (resp []datatypes.Container_Account_Payment_Method_CreditCard, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPendingCreditCardChangeRequestData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Account_Payment_Method_CreditCard{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPendingCreditCardChangeRequestData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetPendingEvents() (resp []datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPendingEvents", nil, &r.Options, &resp) return } -func (r Account) GetPendingEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPendingEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPendingEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's latest open (pending) invoice. func (r Account) GetPendingInvoice() (resp datatypes.Billing_Invoice, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPendingInvoice", nil, &r.Options, &resp) @@ -4583,30 +1444,6 @@ func (r Account) GetPendingInvoiceTopLevelItems() (resp []datatypes.Billing_Invo return } -func (r Account) GetPendingInvoiceTopLevelItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPendingInvoiceTopLevelItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPendingInvoiceTopLevelItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The total amount of an account's pending invoice, if one exists. func (r Account) GetPendingInvoiceTotalAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPendingInvoiceTotalAmount", nil, &r.Options, &resp) @@ -4643,150 +1480,30 @@ func (r Account) GetPermissionGroups() (resp []datatypes.User_Permission_Group, return } -func (r Account) GetPermissionGroupsIter() (resp []datatypes.User_Permission_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPermissionGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPermissionGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's user roles. func (r Account) GetPermissionRoles() (resp []datatypes.User_Permission_Role, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPermissionRoles", nil, &r.Options, &resp) return } -func (r Account) GetPermissionRolesIter() (resp []datatypes.User_Permission_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPermissionRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPermissionRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated virtual placement groups. func (r Account) GetPlacementGroups() (resp []datatypes.Virtual_PlacementGroup, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPlacementGroups", nil, &r.Options, &resp) return } -func (r Account) GetPlacementGroupsIter() (resp []datatypes.Virtual_PlacementGroup, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPlacementGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_PlacementGroup{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPlacementGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetPortableStorageVolumes() (resp []datatypes.Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPortableStorageVolumes", nil, &r.Options, &resp) return } -func (r Account) GetPortableStorageVolumesIter() (resp []datatypes.Virtual_Disk_Image, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPortableStorageVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Disk_Image{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPortableStorageVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Customer specified URIs that are downloaded onto a newly provisioned or reloaded server. If the URI is sent over https it will be executed directly on the server. func (r Account) GetPostProvisioningHooks() (resp []datatypes.Provisioning_Hook, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPostProvisioningHooks", nil, &r.Options, &resp) return } -func (r Account) GetPostProvisioningHooksIter() (resp []datatypes.Provisioning_Hook, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPostProvisioningHooks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Hook{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPostProvisioningHooks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve (Deprecated) Boolean flag dictating whether or not this account supports PPTP VPN Access. func (r Account) GetPptpVpnAllowedFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPptpVpnAllowedFlag", nil, &r.Options, &resp) @@ -4799,30 +1516,6 @@ func (r Account) GetPptpVpnUsers() (resp []datatypes.User_Customer, err error) { return } -func (r Account) GetPptpVpnUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPptpVpnUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPptpVpnUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The total recurring amount for an accounts previous revenue. func (r Account) GetPreviousRecurringRevenue() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPreviousRecurringRevenue", nil, &r.Options, &resp) @@ -4835,210 +1528,42 @@ func (r Account) GetPriceRestrictions() (resp []datatypes.Product_Item_Price_Acc return } -func (r Account) GetPriceRestrictionsIter() (resp []datatypes.Product_Item_Price_Account_Restriction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPriceRestrictions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price_Account_Restriction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPriceRestrictions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All priority one tickets associated with an account. func (r Account) GetPriorityOneTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPriorityOneTickets", nil, &r.Options, &resp) return } -func (r Account) GetPriorityOneTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPriorityOneTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPriorityOneTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve DEPRECATED - This information can be pulled directly through tapping keys now - DEPRECATED. The allotments for this account and their servers. The private inbound and outbound bandwidth is calculated for each server in addition to the daily average network traffic since the last billing date. func (r Account) GetPrivateAllotmentHardwareBandwidthDetails() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) return } -func (r Account) GetPrivateAllotmentHardwareBandwidthDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateAllotmentHardwareBandwidthDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Private and shared template group objects (parent only) for an account. func (r Account) GetPrivateBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateBlockDeviceTemplateGroups", nil, &r.Options, &resp) return } -func (r Account) GetPrivateBlockDeviceTemplateGroupsIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateBlockDeviceTemplateGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateBlockDeviceTemplateGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetPrivateIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateIpAddresses", nil, &r.Options, &resp) return } -func (r Account) GetPrivateIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The private network VLANs assigned to an account. func (r Account) GetPrivateNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateNetworkVlans", nil, &r.Options, &resp) return } -func (r Account) GetPrivateNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All private subnets associated with an account. func (r Account) GetPrivateSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPrivateSubnets", nil, &r.Options, &resp) return } -func (r Account) GetPrivateSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPrivateSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Boolean flag indicating whether or not this account is a Proof of Concept account. func (r Account) GetProofOfConceptAccountFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getProofOfConceptAccountFlag", nil, &r.Options, &resp) @@ -5051,180 +1576,36 @@ func (r Account) GetPublicAllotmentHardwareBandwidthDetails() (resp []datatypes. return } -func (r Account) GetPublicAllotmentHardwareBandwidthDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPublicAllotmentHardwareBandwidthDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPublicAllotmentHardwareBandwidthDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetPublicIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPublicIpAddresses", nil, &r.Options, &resp) return } -func (r Account) GetPublicIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPublicIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPublicIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The public network VLANs assigned to an account. func (r Account) GetPublicNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPublicNetworkVlans", nil, &r.Options, &resp) return } -func (r Account) GetPublicNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPublicNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPublicNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All public network subnets associated with an account. func (r Account) GetPublicSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getPublicSubnets", nil, &r.Options, &resp) return } -func (r Account) GetPublicSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getPublicSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getPublicSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's quotes. func (r Account) GetQuotes() (resp []datatypes.Billing_Order_Quote, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getQuotes", nil, &r.Options, &resp) return } -func (r Account) GetQuotesIter() (resp []datatypes.Billing_Order_Quote, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getQuotes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Quote{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getQuotes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetRecentEvents() (resp []datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRecentEvents", nil, &r.Options, &resp) return } -func (r Account) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getRecentEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getRecentEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Referral Partner for this account, if any. func (r Account) GetReferralPartner() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartner", nil, &r.Options, &resp) @@ -5237,90 +1618,18 @@ func (r Account) GetReferralPartnerCommissionForecast() (resp []datatypes.Contai return } -func (r Account) GetReferralPartnerCommissionForecastIter() (resp []datatypes.Container_Referral_Partner_Commission, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionForecast", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Referral_Partner_Commission{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionForecast", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account) GetReferralPartnerCommissionHistory() (resp []datatypes.Container_Referral_Partner_Commission, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionHistory", nil, &r.Options, &resp) return } -func (r Account) GetReferralPartnerCommissionHistoryIter() (resp []datatypes.Container_Referral_Partner_Commission, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Referral_Partner_Commission{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account) GetReferralPartnerCommissionPending() (resp []datatypes.Container_Referral_Partner_Commission, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionPending", nil, &r.Options, &resp) return } -func (r Account) GetReferralPartnerCommissionPendingIter() (resp []datatypes.Container_Referral_Partner_Commission, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionPending", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Referral_Partner_Commission{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getReferralPartnerCommissionPending", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Flag indicating if the account was referred. func (r Account) GetReferredAccountFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReferredAccountFlag", nil, &r.Options, &resp) @@ -5333,120 +1642,24 @@ func (r Account) GetReferredAccounts() (resp []datatypes.Account, err error) { return } -func (r Account) GetReferredAccountsIter() (resp []datatypes.Account, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getReferredAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getReferredAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetRegulatedWorkloads() (resp []datatypes.Legal_RegulatedWorkload, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRegulatedWorkloads", nil, &r.Options, &resp) return } -func (r Account) GetRegulatedWorkloadsIter() (resp []datatypes.Legal_RegulatedWorkload, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getRegulatedWorkloads", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Legal_RegulatedWorkload{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getRegulatedWorkloads", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Remote management command requests for an account func (r Account) GetRemoteManagementCommandRequests() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRemoteManagementCommandRequests", nil, &r.Options, &resp) return } -func (r Account) GetRemoteManagementCommandRequestsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getRemoteManagementCommandRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getRemoteManagementCommandRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Replication events for all Network Storage volumes on an account. func (r Account) GetReplicationEvents() (resp []datatypes.Network_Storage_Event, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReplicationEvents", nil, &r.Options, &resp) return } -func (r Account) GetReplicationEventsIter() (resp []datatypes.Network_Storage_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getReplicationEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getReplicationEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Indicates whether newly created users under this account will be associated with IBMid via an email requiring a response, or not. func (r Account) GetRequireSilentIBMidUserCreation() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRequireSilentIBMidUserCreation", nil, &r.Options, &resp) @@ -5459,120 +1672,24 @@ func (r Account) GetReservedCapacityAgreements() (resp []datatypes.Account_Agree return } -func (r Account) GetReservedCapacityAgreementsIter() (resp []datatypes.Account_Agreement, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityAgreements", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Agreement{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityAgreements", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The reserved capacity groups owned by this account. func (r Account) GetReservedCapacityGroups() (resp []datatypes.Virtual_ReservedCapacityGroup, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityGroups", nil, &r.Options, &resp) return } -func (r Account) GetReservedCapacityGroupsIter() (resp []datatypes.Virtual_ReservedCapacityGroup, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_ReservedCapacityGroup{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getReservedCapacityGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All Routers that an accounts VLANs reside on func (r Account) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRouters", nil, &r.Options, &resp) return } -func (r Account) GetRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve DEPRECATED func (r Account) GetRwhoisData() (resp []datatypes.Network_Subnet_Rwhois_Data, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getRwhoisData", nil, &r.Options, &resp) return } -func (r Account) GetRwhoisDataIter() (resp []datatypes.Network_Subnet_Rwhois_Data, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getRwhoisData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Rwhois_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getRwhoisData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SAML configuration for this account. func (r Account) GetSamlAuthentication() (resp datatypes.Account_Authentication_Saml, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSamlAuthentication", nil, &r.Options, &resp) @@ -5585,90 +1702,18 @@ func (r Account) GetSecondaryDomains() (resp []datatypes.Dns_Secondary, err erro return } -func (r Account) GetSecondaryDomainsIter() (resp []datatypes.Dns_Secondary, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSecondaryDomains", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Secondary{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSecondaryDomains", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Stored security certificates (ie. SSL) func (r Account) GetSecurityCertificates() (resp []datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSecurityCertificates", nil, &r.Options, &resp) return } -func (r Account) GetSecurityCertificatesIter() (resp []datatypes.Security_Certificate, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSecurityCertificates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Certificate{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSecurityCertificates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The security groups belonging to this account. func (r Account) GetSecurityGroups() (resp []datatypes.Network_SecurityGroup, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSecurityGroups", nil, &r.Options, &resp) return } -func (r Account) GetSecurityGroupsIter() (resp []datatypes.Network_SecurityGroup, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSecurityGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_SecurityGroup{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSecurityGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetSecurityLevel() (resp datatypes.Security_Level, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSecurityLevel", nil, &r.Options, &resp) @@ -5681,87 +1726,15 @@ func (r Account) GetSecurityScanRequests() (resp []datatypes.Network_Security_Sc return } -func (r Account) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSecurityScanRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Security_Scanner_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSecurityScanRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The service billing items that will be on an account's next invoice. func (r Account) GetServiceBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getServiceBillingItems", nil, &r.Options, &resp) return } -func (r Account) GetServiceBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getServiceBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getServiceBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns the [[SoftLayer_Virtual_Guest_Block_Device_Template_Group]] objects that have been shared with this account -func (r Account) GetSharedBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - err = r.Session.DoRequest("SoftLayer_Account", "getSharedBlockDeviceTemplateGroups", nil, &r.Options, &resp) - return -} - -func (r Account) GetSharedBlockDeviceTemplateGroupsIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - limit := r.Options.ValidateLimit() +func (r Account) GetSharedBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSharedBlockDeviceTemplateGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSharedBlockDeviceTemplateGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -5771,270 +1744,54 @@ func (r Account) GetShipments() (resp []datatypes.Account_Shipment, err error) { return } -func (r Account) GetShipmentsIter() (resp []datatypes.Account_Shipment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getShipments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Shipment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getShipments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Customer specified SSH keys that can be implemented onto a newly provisioned or reloaded server. func (r Account) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSshKeys", nil, &r.Options, &resp) return } -func (r Account) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated portal users with SSL VPN access. func (r Account) GetSslVpnUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSslVpnUsers", nil, &r.Options, &resp) return } -func (r Account) GetSslVpnUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSslVpnUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSslVpnUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's virtual guest objects that are hosted on a user provisioned hypervisor. func (r Account) GetStandardPoolVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getStandardPoolVirtualGuests", nil, &r.Options, &resp) return } -func (r Account) GetStandardPoolVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getStandardPoolVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getStandardPoolVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetSubnetRegistrationDetails() (resp []datatypes.Account_Regional_Registry_Detail, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrationDetails", nil, &r.Options, &resp) return } -func (r Account) GetSubnetRegistrationDetailsIter() (resp []datatypes.Account_Regional_Registry_Detail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrationDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Regional_Registry_Detail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrationDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetSubnetRegistrations() (resp []datatypes.Network_Subnet_Registration, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrations", nil, &r.Options, &resp) return } -func (r Account) GetSubnetRegistrationsIter() (resp []datatypes.Network_Subnet_Registration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Registration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSubnetRegistrations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network subnets associated with an account. func (r Account) GetSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSubnets", nil, &r.Options, &resp) return } -func (r Account) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer employees that an account is assigned to. func (r Account) GetSupportRepresentatives() (resp []datatypes.User_Employee, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSupportRepresentatives", nil, &r.Options, &resp) return } -func (r Account) GetSupportRepresentativesIter() (resp []datatypes.User_Employee, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSupportRepresentatives", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Employee{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSupportRepresentatives", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The active support subscriptions for this account. func (r Account) GetSupportSubscriptions() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSupportSubscriptions", nil, &r.Options, &resp) return } -func (r Account) GetSupportSubscriptionsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getSupportSubscriptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getSupportSubscriptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetSupportTier() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getSupportTier", nil, &r.Options, &resp) @@ -6053,30 +1810,6 @@ func (r Account) GetTags() (resp []datatypes.Tag, err error) { return } -func (r Account) GetTagsIter() (resp []datatypes.Tag, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getTags", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getTags", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return a SoftLayer_Container_Account_Discount_Program object containing the Technology Incubator Program information for this account. To be considered an active participant, the account must have an enrollment record with a monthly credit amount set and the current date must be within the range defined by the enrollment and graduation date. The forNextBillCycle parameter can be set to true to return a SoftLayer_Container_Account_Discount_Program object with information with relation to the next bill cycle. The forNextBillCycle parameter defaults to false. func (r Account) GetTechIncubatorProgramInfo(forNextBillCycle *bool) (resp datatypes.Container_Account_Discount_Program, err error) { params := []interface{}{ @@ -6098,240 +1831,48 @@ func (r Account) GetThirdPartyPoliciesAcceptanceStatus() (resp []datatypes.Conta return } -func (r Account) GetThirdPartyPoliciesAcceptanceStatusIter() (resp []datatypes.Container_Policy_Acceptance, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getThirdPartyPoliciesAcceptanceStatus", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Policy_Acceptance{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getThirdPartyPoliciesAcceptanceStatus", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated tickets. func (r Account) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getTickets", nil, &r.Options, &resp) return } -func (r Account) GetTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Tickets closed within the last 72 hours or last 10 tickets, whichever is less, associated with an account. func (r Account) GetTicketsClosedInTheLastThreeDays() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedInTheLastThreeDays", nil, &r.Options, &resp) return } -func (r Account) GetTicketsClosedInTheLastThreeDaysIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedInTheLastThreeDays", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedInTheLastThreeDays", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Tickets closed today associated with an account. func (r Account) GetTicketsClosedToday() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedToday", nil, &r.Options, &resp) return } -func (r Account) GetTicketsClosedTodayIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedToday", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getTicketsClosedToday", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated upgrade requests. func (r Account) GetUpgradeRequests() (resp []datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getUpgradeRequests", nil, &r.Options, &resp) return } -func (r Account) GetUpgradeRequestsIter() (resp []datatypes.Product_Upgrade_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getUpgradeRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Upgrade_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getUpgradeRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's portal users. func (r Account) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getUsers", nil, &r.Options, &resp) return } -func (r Account) GetUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a list of valid (non-expired) security certificates without the sensitive certificate information. This allows non-privileged users to view and select security certificates when configuring associated services. func (r Account) GetValidSecurityCertificateEntries() (resp []datatypes.Security_Certificate_Entry, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificateEntries", nil, &r.Options, &resp) return } -func (r Account) GetValidSecurityCertificateEntriesIter() (resp []datatypes.Security_Certificate_Entry, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificateEntries", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Certificate_Entry{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificateEntries", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Stored security certificates that are not expired (ie. SSL) func (r Account) GetValidSecurityCertificates() (resp []datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificates", nil, &r.Options, &resp) return } -func (r Account) GetValidSecurityCertificatesIter() (resp []datatypes.Security_Certificate, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Certificate{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getValidSecurityCertificates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve DEPRECATED - Return 0 if VDR updates are currently in progress on this account otherwise 1. func (r Account) GetVdrUpdatesInProgressFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVdrUpdatesInProgressFlag", nil, &r.Options, &resp) @@ -6344,390 +1885,78 @@ func (r Account) GetVirtualDedicatedRacks() (resp []datatypes.Network_Bandwidth_ return } -func (r Account) GetVirtualDedicatedRacksIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDedicatedRacks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDedicatedRacks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated virtual server virtual disk images. func (r Account) GetVirtualDiskImages() (resp []datatypes.Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDiskImages", nil, &r.Options, &resp) return } -func (r Account) GetVirtualDiskImagesIter() (resp []datatypes.Virtual_Disk_Image, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDiskImages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Disk_Image{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualDiskImages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated virtual guest objects. func (r Account) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated virtual guest objects currently over bandwidth allocation. func (r Account) GetVirtualGuestsOverBandwidthAllocation() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsOverBandwidthAllocation", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsOverBandwidthAllocationIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsOverBandwidthAllocation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsOverBandwidthAllocation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated virtual guest objects currently over bandwidth allocation. func (r Account) GetVirtualGuestsProjectedOverBandwidthAllocation() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsProjectedOverBandwidthAllocation", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsProjectedOverBandwidthAllocationIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsProjectedOverBandwidthAllocation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsProjectedOverBandwidthAllocation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All virtual guests associated with an account that has the cPanel web hosting control panel installed. func (r Account) GetVirtualGuestsWithCpanel() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithCpanel", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsWithCpanelIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithCpanel", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithCpanel", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All virtual guests associated with an account that have McAfee Secure software components. func (r Account) GetVirtualGuestsWithMcafee() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafee", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsWithMcafeeIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafee", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafee", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All virtual guests associated with an account that have McAfee Secure AntiVirus for Redhat software components. func (r Account) GetVirtualGuestsWithMcafeeAntivirusRedhat() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusRedhat", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsWithMcafeeAntivirusRedhatIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusRedhat", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusRedhat", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All virtual guests associated with an account that has McAfee Secure AntiVirus for Windows software components. func (r Account) GetVirtualGuestsWithMcafeeAntivirusWindows() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusWindows", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsWithMcafeeAntivirusWindowsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusWindows", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeAntivirusWindows", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All virtual guests associated with an account that has McAfee Secure Intrusion Detection System software components. func (r Account) GetVirtualGuestsWithMcafeeIntrusionDetectionSystem() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeIntrusionDetectionSystem", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsWithMcafeeIntrusionDetectionSystemIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeIntrusionDetectionSystem", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithMcafeeIntrusionDetectionSystem", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All virtual guests associated with an account that has the Plesk web hosting control panel installed. func (r Account) GetVirtualGuestsWithPlesk() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithPlesk", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsWithPleskIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithPlesk", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithPlesk", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All virtual guests associated with an account that have the QuantaStor storage system installed. func (r Account) GetVirtualGuestsWithQuantastor() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithQuantastor", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsWithQuantastorIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithQuantastor", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithQuantastor", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All virtual guests associated with an account that has the Urchin web traffic analytics package installed. func (r Account) GetVirtualGuestsWithUrchin() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithUrchin", nil, &r.Options, &resp) return } -func (r Account) GetVirtualGuestsWithUrchinIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithUrchin", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualGuestsWithUrchin", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The bandwidth pooling for this account. func (r Account) GetVirtualPrivateRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualPrivateRack", nil, &r.Options, &resp) @@ -6740,120 +1969,24 @@ func (r Account) GetVirtualStorageArchiveRepositories() (resp []datatypes.Virtua return } -func (r Account) GetVirtualStorageArchiveRepositoriesIter() (resp []datatypes.Virtual_Storage_Repository, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStorageArchiveRepositories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Storage_Repository{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStorageArchiveRepositories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated virtual server public storage repositories. func (r Account) GetVirtualStoragePublicRepositories() (resp []datatypes.Virtual_Storage_Repository, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStoragePublicRepositories", nil, &r.Options, &resp) return } -func (r Account) GetVirtualStoragePublicRepositoriesIter() (resp []datatypes.Virtual_Storage_Repository, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStoragePublicRepositories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Storage_Repository{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVirtualStoragePublicRepositories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This returns a collection of active VMware software account license keys. func (r Account) GetVmWareActiveAccountLicenseKeys() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVmWareActiveAccountLicenseKeys", nil, &r.Options, &resp) return } -func (r Account) GetVmWareActiveAccountLicenseKeysIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVmWareActiveAccountLicenseKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVmWareActiveAccountLicenseKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated VPC configured virtual guest objects. func (r Account) GetVpcVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVpcVirtualGuests", nil, &r.Options, &resp) return } -func (r Account) GetVpcVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getVpcVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getVpcVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account) GetVpnConfigRequiresVPNManageFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account", "getVpnConfigRequiresVPNManageFlag", nil, &r.Options, &resp) @@ -6866,30 +1999,6 @@ func (r Account) GetWindowsUpdateStatus() (resp []datatypes.Container_Utility_Mi return } -func (r Account) GetWindowsUpdateStatusIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "getWindowsUpdateStatus", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "getWindowsUpdateStatus", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Determine if an account has an [[SoftLayer_Account_Attribute|attribute]] associated with it. hasAttribute() returns false if the attribute does not exist or if it does not have a value. func (r Account) HasAttribute(attributeType *string) (resp bool, err error) { params := []interface{}{ @@ -7062,33 +2171,6 @@ func (r Account) Validate(account *datatypes.Account) (resp []string, err error) return } -func (r Account) ValidateIter(account *datatypes.Account) (resp []string, err error) { - params := []interface{}{ - account, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account", "validate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account", "validate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method checks global and account specific requirements and returns true if the dollar amount entered is acceptable for this account and false otherwise. Please note the dollar amount is in USD. func (r Account) ValidateManualPaymentAmount(amount *string) (resp bool, err error) { params := []interface{}{ @@ -7168,30 +2250,6 @@ func (r Account_Address) GetAllDataCenters() (resp []datatypes.Account_Address, return } -func (r Account_Address) GetAllDataCentersIter() (resp []datatypes.Account_Address, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Address", "getAllDataCenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Address{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Address", "getAllDataCenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The customer user who created this address. func (r Account_Address) GetCreateUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account_Address", "getCreateUser", nil, &r.Options, &resp) @@ -7225,33 +2283,6 @@ func (r Account_Address) GetNetworkAddress(name *string) (resp []datatypes.Accou return } -func (r Account_Address) GetNetworkAddressIter(name *string) (resp []datatypes.Account_Address, err error) { - params := []interface{}{ - name, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Address", "getNetworkAddress", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Address{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Address", "getNetworkAddress", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Address) GetObject() (resp datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Account_Address", "getObject", nil, &r.Options, &resp) @@ -7389,33 +2420,6 @@ func (r Account_Affiliation) GetAccountAffiliationsByAffiliateId(affiliateId *st return } -func (r Account_Affiliation) GetAccountAffiliationsByAffiliateIdIter(affiliateId *string) (resp []datatypes.Account_Affiliation, err error) { - params := []interface{}{ - affiliateId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Affiliation", "getAccountAffiliationsByAffiliateId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Affiliation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Affiliation", "getAccountAffiliationsByAffiliateId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Affiliation) GetObject() (resp datatypes.Account_Affiliation, err error) { err = r.Session.DoRequest("SoftLayer_Account_Affiliation", "getObject", nil, &r.Options, &resp) @@ -7480,60 +2484,12 @@ func (r Account_Agreement) GetAttachedBillingAgreementFiles() (resp []datatypes. return } -func (r Account_Agreement) GetAttachedBillingAgreementFilesIter() (resp []datatypes.Account_MasterServiceAgreement, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getAttachedBillingAgreementFiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_MasterServiceAgreement{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getAttachedBillingAgreementFiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing items associated with an agreement. func (r Account_Agreement) GetBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getBillingItems", nil, &r.Options, &resp) return } -func (r Account_Agreement) GetBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Agreement) GetObject() (resp datatypes.Account_Agreement, err error) { err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getObject", nil, &r.Options, &resp) @@ -7552,30 +2508,6 @@ func (r Account_Agreement) GetTopLevelBillingItems() (resp []datatypes.Billing_I return } -func (r Account_Agreement) GetTopLevelBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getTopLevelBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Agreement", "getTopLevelBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Account authentication has many different settings that can be set. This class allows the customer or employee to set these settings. type Account_Authentication_Attribute struct { Session session.SLSession @@ -7686,30 +2618,6 @@ func (r Account_Authentication_Attribute_Type) GetAllObjects() (resp []datatypes return } -func (r Account_Authentication_Attribute_Type) GetAllObjectsIter() (resp []datatypes.Account_Attribute_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Authentication_Attribute_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Attribute_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Authentication_Attribute_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Authentication_Attribute_Type) GetObject() (resp datatypes.Account_Authentication_Attribute_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Authentication_Attribute_Type", "getObject", nil, &r.Options, &resp) @@ -7792,30 +2700,6 @@ func (r Account_Authentication_Saml) GetAttributes() (resp []datatypes.Account_A return } -func (r Account_Authentication_Saml) GetAttributesIter() (resp []datatypes.Account_Authentication_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Authentication_Saml", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Authentication_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Authentication_Saml", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return the service provider metadata in XML format. func (r Account_Authentication_Saml) GetMetadata() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account_Authentication_Saml", "getMetadata", nil, &r.Options, &resp) @@ -8047,30 +2931,6 @@ func (r Account_Contact) GetAllContactTypes() (resp []datatypes.Account_Contact_ return } -func (r Account_Contact) GetAllContactTypesIter() (resp []datatypes.Account_Contact_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Contact", "getAllContactTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Contact_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Contact", "getAllContactTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Contact) GetObject() (resp datatypes.Account_Contact, err error) { err = r.Session.DoRequest("SoftLayer_Account_Contact", "getObject", nil, &r.Options, &resp) @@ -8300,30 +3160,6 @@ func (r Account_Internal_Ibm) GetAccountTypes() (resp []string, err error) { return } -func (r Account_Internal_Ibm) GetAccountTypesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getAccountTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getAccountTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Gets the URL used to perform manager validation. func (r Account_Internal_Ibm) GetAuthorizationUrl(requestId *int) (resp string, err error) { params := []interface{}{ @@ -8339,60 +3175,12 @@ func (r Account_Internal_Ibm) GetBmsCountries() (resp []datatypes.BMS_Container_ return } -func (r Account_Internal_Ibm) GetBmsCountriesIter() (resp []datatypes.BMS_Container_Country, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountries", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.BMS_Container_Country{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountries", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Internal_Ibm) GetBmsCountryList() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountryList", nil, &r.Options, &resp) return } -func (r Account_Internal_Ibm) GetBmsCountryListIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountryList", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Internal_Ibm", "getBmsCountryList", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Exchanges a code for a token during manager validation. func (r Account_Internal_Ibm) GetEmployeeAccessToken(unverifiedAuthenticationCode *string) (resp string, err error) { params := []interface{}{ @@ -8669,30 +3457,6 @@ func (r Account_Link_OpenStack) ListOSProjects() (resp []datatypes.Account_Link_ return } -func (r Account_Link_OpenStack) ListOSProjectsIter() (resp []datatypes.Account_Link_OpenStack_ProjectDetails, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Link_OpenStack", "listOSProjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Link_OpenStack_ProjectDetails{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Link_OpenStack", "listOSProjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Account_Lockdown_Request data type holds information on API requests from brand customers. type Account_Lockdown_Request struct { Session session.SLSession @@ -8768,33 +3532,6 @@ func (r Account_Lockdown_Request) GetAccountHistory(accountId *int) (resp []data return } -func (r Account_Lockdown_Request) GetAccountHistoryIter(accountId *int) (resp []datatypes.Account_Lockdown_Request, err error) { - params := []interface{}{ - accountId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Lockdown_Request", "getAccountHistory", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Lockdown_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Lockdown_Request", "getAccountHistory", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Lockdown_Request) GetObject() (resp datatypes.Account_Lockdown_Request, err error) { err = r.Session.DoRequest("SoftLayer_Account_Lockdown_Request", "getObject", nil, &r.Options, &resp) @@ -8929,30 +3666,6 @@ func (r Account_Media) GetAllMediaTypes() (resp []datatypes.Account_Media_Type, return } -func (r Account_Media) GetAllMediaTypesIter() (resp []datatypes.Account_Media_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Media", "getAllMediaTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Media_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Media", "getAllMediaTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The customer user who created the media object. func (r Account_Media) GetCreateUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Account_Media", "getCreateUser", nil, &r.Options, &resp) @@ -9071,60 +3784,12 @@ func (r Account_Media_Data_Transfer_Request) GetActiveTickets() (resp []datatype return } -func (r Account_Media_Data_Transfer_Request) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getActiveTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getActiveTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of all the possible statuses to which a request may be set. func (r Account_Media_Data_Transfer_Request) GetAllRequestStatuses() (resp []datatypes.Account_Media_Data_Transfer_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getAllRequestStatuses", nil, &r.Options, &resp) return } -func (r Account_Media_Data_Transfer_Request) GetAllRequestStatusesIter() (resp []datatypes.Account_Media_Data_Transfer_Request_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getAllRequestStatuses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Media_Data_Transfer_Request_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getAllRequestStatuses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item for the original request. func (r Account_Media_Data_Transfer_Request) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getBillingItem", nil, &r.Options, &resp) @@ -9167,30 +3832,6 @@ func (r Account_Media_Data_Transfer_Request) GetShipments() (resp []datatypes.Ac return } -func (r Account_Media_Data_Transfer_Request) GetShipmentsIter() (resp []datatypes.Account_Shipment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getShipments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Shipment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getShipments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of the request. func (r Account_Media_Data_Transfer_Request) GetStatus() (resp datatypes.Account_Media_Data_Transfer_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getStatus", nil, &r.Options, &resp) @@ -9203,30 +3844,6 @@ func (r Account_Media_Data_Transfer_Request) GetTickets() (resp []datatypes.Tick return } -func (r Account_Media_Data_Transfer_Request) GetTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Media_Data_Transfer_Request", "getTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Account_Note struct { Session session.SLSession @@ -9309,30 +3926,6 @@ func (r Account_Note) GetNoteHistory() (resp []datatypes.Account_Note_History, e return } -func (r Account_Note) GetNoteHistoryIter() (resp []datatypes.Account_Note_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Note", "getNoteHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Note_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Note", "getNoteHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Note) GetObject() (resp datatypes.Account_Note, err error) { err = r.Session.DoRequest("SoftLayer_Account_Note", "getObject", nil, &r.Options, &resp) @@ -9401,30 +3994,6 @@ func (r Account_Partner_Referral_Prospect) GetSurveyQuestions() (resp []datatype return } -func (r Account_Partner_Referral_Prospect) GetSurveyQuestionsIter() (resp []datatypes.Survey_Question, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Partner_Referral_Prospect", "getSurveyQuestions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Survey_Question{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Partner_Referral_Prospect", "getSurveyQuestions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Account_Password contains username, passwords and notes for services that may require for external applications such the Webcc interface for the EVault Storage service. type Account_Password struct { Session session.SLSession @@ -9573,33 +4142,6 @@ func (r Account_ProofOfConcept) GetRequestsPendingIntegratedOfferingTeamReview(a return } -func (r Account_ProofOfConcept) GetRequestsPendingIntegratedOfferingTeamReviewIter(accessToken *string) (resp []datatypes.Container_Account_ProofOfConcept_Review_Summary, err error) { - params := []interface{}{ - accessToken, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getRequestsPendingIntegratedOfferingTeamReview", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Account_ProofOfConcept_Review_Summary{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getRequestsPendingIntegratedOfferingTeamReview", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of requests that are pending over threshold review func (r Account_ProofOfConcept) GetRequestsPendingOverThresholdReview(accessToken *string) (resp []datatypes.Container_Account_ProofOfConcept_Review_Summary, err error) { params := []interface{}{ @@ -9609,33 +4151,6 @@ func (r Account_ProofOfConcept) GetRequestsPendingOverThresholdReview(accessToke return } -func (r Account_ProofOfConcept) GetRequestsPendingOverThresholdReviewIter(accessToken *string) (resp []datatypes.Container_Account_ProofOfConcept_Review_Summary, err error) { - params := []interface{}{ - accessToken, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getRequestsPendingOverThresholdReview", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Account_ProofOfConcept_Review_Summary{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getRequestsPendingOverThresholdReview", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Exchanges a code for a token during reviewer validation. func (r Account_ProofOfConcept) GetReviewerAccessToken(unverifiedAuthenticationCode *string) (resp string, err error) { params := []interface{}{ @@ -9676,34 +4191,6 @@ func (r Account_ProofOfConcept) GetSubmittedRequests(email *string, sortOrder *s return } -func (r Account_ProofOfConcept) GetSubmittedRequestsIter(email *string, sortOrder *string) (resp []datatypes.Container_Account_ProofOfConcept_Review_Summary, err error) { - params := []interface{}{ - email, - sortOrder, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getSubmittedRequests", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Account_ProofOfConcept_Review_Summary{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getSubmittedRequests", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Gets email address users can use to ask for help/support func (r Account_ProofOfConcept) GetSupportEmailAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept", "getSupportEmailAddress", nil, &r.Options, &resp) @@ -9832,30 +4319,6 @@ func (r Account_ProofOfConcept_Approver) GetAllObjects() (resp []datatypes.Accou return } -func (r Account_ProofOfConcept_Approver) GetAllObjectsIter() (resp []datatypes.Account_ProofOfConcept_Approver, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_ProofOfConcept_Approver{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_ProofOfConcept_Approver) GetObject() (resp datatypes.Account_ProofOfConcept_Approver, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver", "getObject", nil, &r.Options, &resp) @@ -9966,30 +4429,6 @@ func (r Account_ProofOfConcept_Approver_Type) GetApprovers() (resp []datatypes.A return } -func (r Account_ProofOfConcept_Approver_Type) GetApproversIter() (resp []datatypes.Account_ProofOfConcept_Approver, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver_Type", "getApprovers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_ProofOfConcept_Approver{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver_Type", "getApprovers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_ProofOfConcept_Approver_Type) GetObject() (resp datatypes.Account_ProofOfConcept_Approver_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Approver_Type", "getObject", nil, &r.Options, &resp) @@ -10042,30 +4481,6 @@ func (r Account_ProofOfConcept_Campaign_Code) GetAllObjects() (resp []datatypes. return } -func (r Account_ProofOfConcept_Campaign_Code) GetAllObjectsIter() (resp []datatypes.Account_ProofOfConcept_Campaign_Code, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Campaign_Code", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_ProofOfConcept_Campaign_Code{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Campaign_Code", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_ProofOfConcept_Campaign_Code) GetObject() (resp datatypes.Account_ProofOfConcept_Campaign_Code, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Campaign_Code", "getObject", nil, &r.Options, &resp) @@ -10118,90 +4533,18 @@ func (r Account_ProofOfConcept_Funding_Type) GetAllObjects() (resp []datatypes.A return } -func (r Account_ProofOfConcept_Funding_Type) GetAllObjectsIter() (resp []datatypes.Account_ProofOfConcept_Funding_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_ProofOfConcept_Funding_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account_ProofOfConcept_Funding_Type) GetApproverTypes() (resp []datatypes.Account_ProofOfConcept_Approver_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApproverTypes", nil, &r.Options, &resp) return } -func (r Account_ProofOfConcept_Funding_Type) GetApproverTypesIter() (resp []datatypes.Account_ProofOfConcept_Approver_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApproverTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_ProofOfConcept_Approver_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApproverTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Account_ProofOfConcept_Funding_Type) GetApprovers() (resp []datatypes.Account_ProofOfConcept_Approver, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApprovers", nil, &r.Options, &resp) return } -func (r Account_ProofOfConcept_Funding_Type) GetApproversIter() (resp []datatypes.Account_ProofOfConcept_Approver, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApprovers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_ProofOfConcept_Approver{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getApprovers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_ProofOfConcept_Funding_Type) GetObject() (resp datatypes.Account_ProofOfConcept_Funding_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_ProofOfConcept_Funding_Type", "getObject", nil, &r.Options, &resp) @@ -10303,30 +4646,6 @@ func (r Account_Regional_Registry_Detail) GetDetails() (resp []datatypes.Network return } -func (r Account_Regional_Registry_Detail) GetDetailsIter() (resp []datatypes.Network_Subnet_Registration_Details, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Registration_Details{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Regional_Registry_Detail) GetObject() (resp datatypes.Account_Regional_Registry_Detail, err error) { err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getObject", nil, &r.Options, &resp) @@ -10339,30 +4658,6 @@ func (r Account_Regional_Registry_Detail) GetProperties() (resp []datatypes.Acco return } -func (r Account_Regional_Registry_Detail) GetPropertiesIter() (resp []datatypes.Account_Regional_Registry_Detail_Property, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getProperties", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Regional_Registry_Detail_Property{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getProperties", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [Deprecated] The associated RWhois handle of this detail object. Used only when detailed reassignments are necessary. func (r Account_Regional_Registry_Detail) GetRegionalInternetRegistryHandle() (resp datatypes.Account_Rwhois_Handle, err error) { err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "getRegionalInternetRegistryHandle", nil, &r.Options, &resp) @@ -10393,30 +4688,6 @@ func (r Account_Regional_Registry_Detail) ValidatePersonForAllRegistrars() (resp return } -func (r Account_Regional_Registry_Detail) ValidatePersonForAllRegistrarsIter() (resp []datatypes.Container_Message, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "validatePersonForAllRegistrars", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Message{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail", "validatePersonForAllRegistrars", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The subnet registration detail property type has been deprecated. // // Subnet registration properties are used to define various attributes of the [[SoftLayer_Account_Regional_Registry_Detail|detail objects]]. These properties are defined by the [[SoftLayer_Account_Regional_Registry_Detail_Property_Type]] objects, which describe the available value formats. @@ -10486,33 +4757,6 @@ func (r Account_Regional_Registry_Detail_Property) CreateObjects(templateObjects return } -func (r Account_Regional_Registry_Detail_Property) CreateObjectsIter(templateObjects []datatypes.Account_Regional_Registry_Detail_Property) (resp []datatypes.Account_Regional_Registry_Detail_Property, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Regional_Registry_Detail_Property{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The subnet registration detail property service has been deprecated. // // This method will delete an existing SoftLayer_Account_Regional_Registry_Detail_Property object. @@ -10614,30 +4858,6 @@ func (r Account_Regional_Registry_Detail_Property_Type) GetAllObjects() (resp [] return } -func (r Account_Regional_Registry_Detail_Property_Type) GetAllObjectsIter() (resp []datatypes.Account_Regional_Registry_Detail_Property_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Regional_Registry_Detail_Property_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Regional_Registry_Detail_Property_Type) GetObject() (resp datatypes.Account_Regional_Registry_Detail_Property_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property_Type", "getObject", nil, &r.Options, &resp) @@ -10696,30 +4916,6 @@ func (r Account_Regional_Registry_Detail_Type) GetAllObjects() (resp []datatypes return } -func (r Account_Regional_Registry_Detail_Type) GetAllObjectsIter() (resp []datatypes.Account_Regional_Registry_Detail_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Regional_Registry_Detail_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Account_Regional_Registry_Detail_Type) GetObject() (resp datatypes.Account_Regional_Registry_Detail_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Type", "getObject", nil, &r.Options, &resp) @@ -10914,30 +5110,6 @@ func (r Account_Shipment) GetAllCouriers() (resp []datatypes.Auxiliary_Shipping_ return } -func (r Account_Shipment) GetAllCouriersIter() (resp []datatypes.Auxiliary_Shipping_Courier, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllCouriers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Auxiliary_Shipping_Courier{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllCouriers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a list of available shipping couriers. func (r Account_Shipment) GetAllCouriersByType(courierTypeKeyName *string) (resp []datatypes.Auxiliary_Shipping_Courier, err error) { params := []interface{}{ @@ -10947,93 +5119,18 @@ func (r Account_Shipment) GetAllCouriersByType(courierTypeKeyName *string) (resp return } -func (r Account_Shipment) GetAllCouriersByTypeIter(courierTypeKeyName *string) (resp []datatypes.Auxiliary_Shipping_Courier, err error) { - params := []interface{}{ - courierTypeKeyName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllCouriersByType", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Auxiliary_Shipping_Courier{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllCouriersByType", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a a list of shipment statuses. func (r Account_Shipment) GetAllShipmentStatuses() (resp []datatypes.Account_Shipment_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentStatuses", nil, &r.Options, &resp) return } -func (r Account_Shipment) GetAllShipmentStatusesIter() (resp []datatypes.Account_Shipment_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentStatuses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Shipment_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentStatuses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a a list of shipment types. func (r Account_Shipment) GetAllShipmentTypes() (resp []datatypes.Account_Shipment_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentTypes", nil, &r.Options, &resp) return } -func (r Account_Shipment) GetAllShipmentTypesIter() (resp []datatypes.Account_Shipment_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Shipment_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getAllShipmentTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The courier handling the shipment. func (r Account_Shipment) GetCourier() (resp datatypes.Auxiliary_Shipping_Courier, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getCourier", nil, &r.Options, &resp) @@ -11100,30 +5197,6 @@ func (r Account_Shipment) GetShipmentItems() (resp []datatypes.Account_Shipment_ return } -func (r Account_Shipment) GetShipmentItemsIter() (resp []datatypes.Account_Shipment_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getShipmentItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Shipment_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getShipmentItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of the shipment. func (r Account_Shipment) GetStatus() (resp datatypes.Account_Shipment_Status, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getStatus", nil, &r.Options, &resp) @@ -11136,30 +5209,6 @@ func (r Account_Shipment) GetTrackingData() (resp []datatypes.Account_Shipment_T return } -func (r Account_Shipment) GetTrackingDataIter() (resp []datatypes.Account_Shipment_Tracking_Data, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getTrackingData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Shipment_Tracking_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getTrackingData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type of shipment (e.g. for Data Transfer Service or Colocation Service). func (r Account_Shipment) GetType() (resp datatypes.Account_Shipment_Type, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment", "getType", nil, &r.Options, &resp) @@ -11435,33 +5484,6 @@ func (r Account_Shipment_Tracking_Data) CreateObjects(templateObjects []datatype return } -func (r Account_Shipment_Tracking_Data) CreateObjectsIter(templateObjects []datatypes.Account_Shipment_Tracking_Data) (resp []datatypes.Account_Shipment_Tracking_Data, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Account_Shipment_Tracking_Data", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Shipment_Tracking_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Account_Shipment_Tracking_Data", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // deleteObject permanently removes a shipment tracking datum (number) func (r Account_Shipment_Tracking_Data) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account_Shipment_Tracking_Data", "deleteObject", nil, &r.Options, &resp) diff --git a/services/auxiliary.go b/services/auxiliary.go index 274068b..bbf0f76 100644 --- a/services/auxiliary.go +++ b/services/auxiliary.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -73,33 +72,6 @@ func (r Auxiliary_Network_Status) GetNetworkStatus(target *string) (resp []datat return } -func (r Auxiliary_Network_Status) GetNetworkStatusIter(target *string) (resp []datatypes.Container_Auxiliary_Network_Status_Reading, err error) { - params := []interface{}{ - target, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Auxiliary_Network_Status", "getNetworkStatus", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Auxiliary_Network_Status_Reading{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Auxiliary_Network_Status", "getNetworkStatus", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // A SoftLayer_Auxiliary_Notification_Emergency data object represents a notification event being broadcast to the SoftLayer customer base. It is used to provide information regarding outages or current known issues. type Auxiliary_Notification_Emergency struct { Session session.SLSession @@ -146,60 +118,12 @@ func (r Auxiliary_Notification_Emergency) GetAllObjects() (resp []datatypes.Auxi return } -func (r Auxiliary_Notification_Emergency) GetAllObjectsIter() (resp []datatypes.Auxiliary_Notification_Emergency, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Auxiliary_Notification_Emergency{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve an array of SoftLayer_Auxiliary_Notification_Emergency data types, which contain all current notification events. func (r Auxiliary_Notification_Emergency) GetCurrentNotifications() (resp []datatypes.Auxiliary_Notification_Emergency, err error) { err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getCurrentNotifications", nil, &r.Options, &resp) return } -func (r Auxiliary_Notification_Emergency) GetCurrentNotificationsIter() (resp []datatypes.Auxiliary_Notification_Emergency, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getCurrentNotifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Auxiliary_Notification_Emergency{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getCurrentNotifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Auxiliary_Notification_Emergency object, it can be used to check for current notifications being broadcast by SoftLayer. func (r Auxiliary_Notification_Emergency) GetObject() (resp datatypes.Auxiliary_Notification_Emergency, err error) { err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getObject", nil, &r.Options, &resp) @@ -264,30 +188,6 @@ func (r Auxiliary_Shipping_Courier_Type) GetCourier() (resp []datatypes.Auxiliar return } -func (r Auxiliary_Shipping_Courier_Type) GetCourierIter() (resp []datatypes.Auxiliary_Shipping_Courier, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getCourier", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Auxiliary_Shipping_Courier{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getCourier", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Auxiliary_Shipping_Courier_Type) GetObject() (resp datatypes.Auxiliary_Shipping_Courier_Type, err error) { err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getObject", nil, &r.Options, &resp) diff --git a/services/billing.go b/services/billing.go index 291da4c..4ee7522 100644 --- a/services/billing.go +++ b/services/billing.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,30 +68,6 @@ func (r Billing_Currency) GetAllObjects() (resp []datatypes.Billing_Currency, er return } -func (r Billing_Currency) GetAllObjectsIter() (resp []datatypes.Billing_Currency, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Currency{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current exchange rate func (r Billing_Currency) GetCurrentExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getCurrentExchangeRate", nil, &r.Options, &resp) @@ -161,30 +136,6 @@ func (r Billing_Currency_Country) GetCountriesWithListOfEligibleCurrencies() (re return } -func (r Billing_Currency_Country) GetCountriesWithListOfEligibleCurrenciesIter() (resp []datatypes.Container_Billing_Currency_Country, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Currency_Country", "getCountriesWithListOfEligibleCurrencies", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Billing_Currency_Country{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Currency_Country", "getCountriesWithListOfEligibleCurrencies", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Currency_Country) GetObject() (resp datatypes.Billing_Currency_Country, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Currency_Country", "getObject", nil, &r.Options, &resp) @@ -240,63 +191,12 @@ func (r Billing_Currency_ExchangeRate) GetAllCurrencyExchangeRates(stringDate *s return } -func (r Billing_Currency_ExchangeRate) GetAllCurrencyExchangeRatesIter(stringDate *string) (resp []datatypes.Billing_Currency_ExchangeRate, err error) { - params := []interface{}{ - stringDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getAllCurrencyExchangeRates", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Currency_ExchangeRate{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getAllCurrencyExchangeRates", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Currency_ExchangeRate) GetCurrencies() (resp []datatypes.Billing_Currency, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getCurrencies", nil, &r.Options, &resp) return } -func (r Billing_Currency_ExchangeRate) GetCurrenciesIter() (resp []datatypes.Billing_Currency, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getCurrencies", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Currency{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getCurrencies", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Currency_ExchangeRate) GetExchangeRate(to *string, from *string, effectiveDate *datatypes.Time) (resp datatypes.Billing_Currency_ExchangeRate, err error) { params := []interface{}{ @@ -388,30 +288,6 @@ func (r Billing_Info) GetAchInformation() (resp []datatypes.Billing_Info_Ach, er return } -func (r Billing_Info) GetAchInformationIter() (resp []datatypes.Billing_Info_Ach, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Info", "getAchInformation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Info_Ach{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Info", "getAchInformation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Currency to be used by this customer account. func (r Billing_Info) GetCurrency() (resp datatypes.Billing_Currency, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Info", "getCurrency", nil, &r.Options, &resp) @@ -534,30 +410,6 @@ func (r Billing_Invoice) GetInvoiceTopLevelItems() (resp []datatypes.Billing_Inv return } -func (r Billing_Invoice) GetInvoiceTopLevelItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTopLevelItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTopLevelItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The total amount of this invoice. func (r Billing_Invoice) GetInvoiceTotalAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTotalAmount", nil, &r.Options, &resp) @@ -600,30 +452,6 @@ func (r Billing_Invoice) GetItems() (resp []datatypes.Billing_Invoice_Item, err return } -func (r Billing_Invoice) GetItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Exchange rate used for billing this invoice. func (r Billing_Invoice) GetLocalCurrencyExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getLocalCurrencyExchangeRate", nil, &r.Options, &resp) @@ -648,30 +476,6 @@ func (r Billing_Invoice) GetPayments() (resp []datatypes.Billing_Invoice_Receiva return } -func (r Billing_Invoice) GetPaymentsIter() (resp []datatypes.Billing_Invoice_Receivable_Payment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPayments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Receivable_Payment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPayments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a PDF record of a SoftLayer invoice. SoftLayer keeps PDF records of all closed invoices for customer retrieval from the portal and API. You must have a PDF reader installed in order to view these invoice files. func (r Billing_Invoice) GetPdf() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPdf", nil, &r.Options, &resp) @@ -738,30 +542,6 @@ func (r Billing_Invoice) GetTaxInfoHistory() (resp []datatypes.Billing_Invoice_T return } -func (r Billing_Invoice) GetTaxInfoHistoryIter() (resp []datatypes.Billing_Invoice_Tax_Info, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxInfoHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Tax_Info{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxInfoHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This is a message explaining the tax treatment for this invoice. func (r Billing_Invoice) GetTaxMessage() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxMessage", nil, &r.Options, &resp) @@ -786,30 +566,6 @@ func (r Billing_Invoice) GetZeroFeeItemCounts() (resp []datatypes.Container_Prod return } -func (r Billing_Invoice) GetZeroFeeItemCountsIter() (resp []datatypes.Container_Product_Item_Category_ZeroFee_Count, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getZeroFeeItemCounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Product_Item_Category_ZeroFee_Count{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getZeroFeeItemCounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Each billing invoice item makes up a record within an invoice. This provides you with a detailed record of everything related to an invoice item. When you are billed, our system takes active billing items and creates an invoice. These invoice items are a copy of your active billing items, and make up the contents of your invoice. type Billing_Invoice_Item struct { Session session.SLSession @@ -856,30 +612,6 @@ func (r Billing_Invoice_Item) GetAssociatedChildren() (resp []datatypes.Billing_ return } -func (r Billing_Invoice_Item) GetAssociatedChildrenIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getAssociatedChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getAssociatedChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An Invoice Item's associated invoice item. If this is populated, it means this is an orphaned invoice item, but logically belongs to the associated invoice item. func (r Billing_Invoice_Item) GetAssociatedInvoiceItem() (resp datatypes.Billing_Invoice_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getAssociatedInvoiceItem", nil, &r.Options, &resp) @@ -904,30 +636,6 @@ func (r Billing_Invoice_Item) GetChildren() (resp []datatypes.Billing_Invoice_It return } -func (r Billing_Invoice_Item) GetChildrenIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This is the DPart for invoice item. func (r Billing_Invoice_Item) GetDPart() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getDPart", nil, &r.Options, &resp) @@ -940,30 +648,6 @@ func (r Billing_Invoice_Item) GetFilteredAssociatedChildren() (resp []datatypes. return } -func (r Billing_Invoice_Item) GetFilteredAssociatedChildrenIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getFilteredAssociatedChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getFilteredAssociatedChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Indicating whether this invoice item is billed on an hourly basis. func (r Billing_Invoice_Item) GetHourlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getHourlyFlag", nil, &r.Options, &resp) @@ -988,30 +672,6 @@ func (r Billing_Invoice_Item) GetNonZeroAssociatedChildren() (resp []datatypes.B return } -func (r Billing_Invoice_Item) GetNonZeroAssociatedChildrenIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getNonZeroAssociatedChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getNonZeroAssociatedChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Billing_Invoice_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Invoice_Item service. You can only retrieve the items tied to the account that your portal user is assigned to. func (r Billing_Invoice_Item) GetObject() (resp datatypes.Billing_Invoice_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getObject", nil, &r.Options, &resp) @@ -1179,30 +839,6 @@ func (r Billing_Invoice_Tax_Status) GetAllObjects() (resp []datatypes.Billing_In return } -func (r Billing_Invoice_Tax_Status) GetAllObjectsIter() (resp []datatypes.Billing_Invoice_Tax_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Status", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Tax_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Status", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Invoice_Tax_Status) GetObject() (resp datatypes.Billing_Invoice_Tax_Status, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Status", "getObject", nil, &r.Options, &resp) @@ -1255,30 +891,6 @@ func (r Billing_Invoice_Tax_Type) GetAllObjects() (resp []datatypes.Billing_Invo return } -func (r Billing_Invoice_Tax_Type) GetAllObjectsIter() (resp []datatypes.Billing_Invoice_Tax_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Tax_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Invoice_Tax_Type) GetObject() (resp datatypes.Billing_Invoice_Tax_Type, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Type", "getObject", nil, &r.Options, &resp) @@ -1387,90 +999,18 @@ func (r Billing_Item) GetActiveAssociatedChildren() (resp []datatypes.Billing_It return } -func (r Billing_Item) GetActiveAssociatedChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Billing_Item) GetActiveAssociatedGuestDiskBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) return } -func (r Billing_Item) GetActiveAssociatedGuestDiskBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedGuestDiskBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's active bundled billing items. func (r Billing_Item) GetActiveBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveBundledItems", nil, &r.Options, &resp) return } -func (r Billing_Item) GetActiveBundledItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveBundledItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveBundledItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A service cancellation request item that corresponds to the billing item. func (r Billing_Item) GetActiveCancellationItem() (resp datatypes.Billing_Item_Cancellation_Request_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveCancellationItem", nil, &r.Options, &resp) @@ -1483,30 +1023,6 @@ func (r Billing_Item) GetActiveChildren() (resp []datatypes.Billing_Item, err er return } -func (r Billing_Item) GetActiveChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Billing_Item) GetActiveFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveFlag", nil, &r.Options, &resp) @@ -1519,60 +1035,12 @@ func (r Billing_Item) GetActiveSparePoolAssociatedGuestDiskBillingItems() (resp return } -func (r Billing_Item) GetActiveSparePoolAssociatedGuestDiskBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's spare pool bundled billing items. func (r Billing_Item) GetActiveSparePoolBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolBundledItems", nil, &r.Options, &resp) return } -func (r Billing_Item) GetActiveSparePoolBundledItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolBundledItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolBundledItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A billing item's associated parent. This is to be used for billing items that are "floating", and therefore are not child items of any parent billing item. If it is desired to associate an item to another, populate this with the SoftLayer_Billing_Item ID of that associated parent item. func (r Billing_Item) GetAssociatedBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedBillingItem", nil, &r.Options, &resp) @@ -1585,120 +1053,24 @@ func (r Billing_Item) GetAssociatedBillingItemHistory() (resp []datatypes.Billin return } -func (r Billing_Item) GetAssociatedBillingItemHistoryIter() (resp []datatypes.Billing_Item_Association_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedBillingItemHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Association_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedBillingItemHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's associated child billing items. This includes "floating" items that are not necessarily child billing items of this billing item. func (r Billing_Item) GetAssociatedChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedChildren", nil, &r.Options, &resp) return } -func (r Billing_Item) GetAssociatedChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A billing item's associated parent billing item. This object will be the same as the parent billing item if parentId is set. func (r Billing_Item) GetAssociatedParent() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedParent", nil, &r.Options, &resp) return } -func (r Billing_Item) GetAssociatedParentIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedParent", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedParent", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Billing_Item) GetAvailableMatchingVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAvailableMatchingVlans", nil, &r.Options, &resp) return } -func (r Billing_Item) GetAvailableMatchingVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAvailableMatchingVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAvailableMatchingVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The bandwidth allocation for a billing item. func (r Billing_Item) GetBandwidthAllocation() (resp datatypes.Network_Bandwidth_Version1_Allocation, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -1711,90 +1083,18 @@ func (r Billing_Item) GetBillableChildren() (resp []datatypes.Billing_Item, err return } -func (r Billing_Item) GetBillableChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBillableChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBillableChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's bundled billing items. func (r Billing_Item) GetBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBundledItems", nil, &r.Options, &resp) return } -func (r Billing_Item) GetBundledItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBundledItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBundledItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's active child billing items. func (r Billing_Item) GetCanceledChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCanceledChildren", nil, &r.Options, &resp) return } -func (r Billing_Item) GetCanceledChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCanceledChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCanceledChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item's cancellation reason. func (r Billing_Item) GetCancellationReason() (resp datatypes.Billing_Item_Cancellation_Reason, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCancellationReason", nil, &r.Options, &resp) @@ -1807,30 +1107,6 @@ func (r Billing_Item) GetCancellationRequests() (resp []datatypes.Billing_Item_C return } -func (r Billing_Item) GetCancellationRequestsIter() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCancellationRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Cancellation_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCancellationRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The item category to which the billing item's item belongs. func (r Billing_Item) GetCategory() (resp datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCategory", nil, &r.Options, &resp) @@ -1843,120 +1119,24 @@ func (r Billing_Item) GetChildren() (resp []datatypes.Billing_Item, err error) { return } -func (r Billing_Item) GetChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's active child billing items. func (r Billing_Item) GetChildrenWithActiveAgreement() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildrenWithActiveAgreement", nil, &r.Options, &resp) return } -func (r Billing_Item) GetChildrenWithActiveAgreementIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildrenWithActiveAgreement", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildrenWithActiveAgreement", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve For product items which have a downgrade path defined, this will return those product items. func (r Billing_Item) GetDowngradeItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getDowngradeItems", nil, &r.Options, &resp) return } -func (r Billing_Item) GetDowngradeItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getDowngradeItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getDowngradeItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's associated child billing items, excluding some items with a $0.00 recurring fee. func (r Billing_Item) GetFilteredNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp) return } -func (r Billing_Item) GetFilteredNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getFilteredNextInvoiceChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag that will reflect whether this billing item is billed on an hourly basis or not. func (r Billing_Item) GetHourlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getHourlyFlag", nil, &r.Options, &resp) @@ -1975,30 +1155,6 @@ func (r Billing_Item) GetInvoiceItems() (resp []datatypes.Billing_Invoice_Item, return } -func (r Billing_Item) GetInvoiceItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getInvoiceItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getInvoiceItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The entry in the SoftLayer product catalog that a billing item is based upon. func (r Billing_Item) GetItem() (resp datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getItem", nil, &r.Options, &resp) @@ -2017,30 +1173,6 @@ func (r Billing_Item) GetNextInvoiceChildren() (resp []datatypes.Billing_Item, e return } -func (r Billing_Item) GetNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's total, including any child billing items if they exist.' func (r Billing_Item) GetNextInvoiceTotalOneTimeAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceTotalOneTimeAmount", nil, &r.Options, &resp) @@ -2071,30 +1203,6 @@ func (r Billing_Item) GetNonZeroNextInvoiceChildren() (resp []datatypes.Billing_ return } -func (r Billing_Item) GetNonZeroNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNonZeroNextInvoiceChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNonZeroNextInvoiceChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Billing_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item service. You can only retrieve billing items tied to the account that your portal user is assigned to. Billing items are an account's items of billable items. There are "parent" billing items and "child" billing items. The server billing item is generally referred to as a parent billing item. The items tied to a server, such as ram, harddrives, and operating systems are considered "child" billing items. func (r Billing_Item) GetObject() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getObject", nil, &r.Options, &resp) @@ -2161,34 +1269,6 @@ func (r Billing_Item) GetServiceBillingItemsByCategory(categoryCode *string, inc return } -func (r Billing_Item) GetServiceBillingItemsByCategoryIter(categoryCode *string, includeZeroRecurringFee *bool) (resp []datatypes.Billing_Item, err error) { - params := []interface{}{ - categoryCode, - includeZeroRecurringFee, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getServiceBillingItemsByCategory", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getServiceBillingItemsByCategory", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A friendly description of software component func (r Billing_Item) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "getSoftwareDescription", nil, &r.Options, &resp) @@ -2207,30 +1287,6 @@ func (r Billing_Item) GetUpgradeItems() (resp []datatypes.Product_Item, err erro return } -func (r Billing_Item) GetUpgradeItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getUpgradeItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item", "getUpgradeItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Remove the association from a billing item. func (r Billing_Item) RemoveAssociationId() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item", "removeAssociationId", nil, &r.Options, &resp) @@ -2298,30 +1354,6 @@ func (r Billing_Item_Cancellation_Reason) GetAllCancellationReasons() (resp []da return } -func (r Billing_Item_Cancellation_Reason) GetAllCancellationReasonsIter() (resp []datatypes.Billing_Item_Cancellation_Reason, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getAllCancellationReasons", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Cancellation_Reason{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getAllCancellationReasons", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An billing cancellation reason category. func (r Billing_Item_Cancellation_Reason) GetBillingCancellationReasonCategory() (resp datatypes.Billing_Item_Cancellation_Reason_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getBillingCancellationReasonCategory", nil, &r.Options, &resp) @@ -2334,30 +1366,6 @@ func (r Billing_Item_Cancellation_Reason) GetBillingItems() (resp []datatypes.Bi return } -func (r Billing_Item_Cancellation_Reason) GetBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Item_Cancellation_Reason) GetObject() (resp datatypes.Billing_Item_Cancellation_Reason, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getObject", nil, &r.Options, &resp) @@ -2416,60 +1424,12 @@ func (r Billing_Item_Cancellation_Reason_Category) GetAllCancellationReasonCateg return } -func (r Billing_Item_Cancellation_Reason_Category) GetAllCancellationReasonCategoriesIter() (resp []datatypes.Billing_Item_Cancellation_Reason_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getAllCancellationReasonCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Cancellation_Reason_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getAllCancellationReasonCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The corresponding billing cancellation reasons having the specific billing cancellation reason category. func (r Billing_Item_Cancellation_Reason_Category) GetBillingCancellationReasons() (resp []datatypes.Billing_Item_Cancellation_Reason, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getBillingCancellationReasons", nil, &r.Options, &resp) return } -func (r Billing_Item_Cancellation_Reason_Category) GetBillingCancellationReasonsIter() (resp []datatypes.Billing_Item_Cancellation_Reason, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getBillingCancellationReasons", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Cancellation_Reason{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getBillingCancellationReasons", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Item_Cancellation_Reason_Category) GetObject() (resp datatypes.Billing_Item_Cancellation_Reason_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getObject", nil, &r.Options, &resp) @@ -2541,30 +1501,6 @@ func (r Billing_Item_Cancellation_Request) GetAllCancellationRequests() (resp [] return } -func (r Billing_Item_Cancellation_Request) GetAllCancellationRequestsIter() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getAllCancellationRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Cancellation_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getAllCancellationRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Services can be canceled 2 or 3 days prior to your next bill date. This service returns the time by which a cancellation request submission is permitted in the current billing cycle. If the current time falls into the cut off date, this will return next earliest cancellation cut off date. // // Available category codes are: service, server @@ -2583,30 +1519,6 @@ func (r Billing_Item_Cancellation_Request) GetItems() (resp []datatypes.Billing_ return } -func (r Billing_Item_Cancellation_Request) GetItemsIter() (resp []datatypes.Billing_Item_Cancellation_Request_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Cancellation_Request_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Billing_Item_Cancellation_Request object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item_Cancellation_Request service. You can only retrieve cancellation request records that are assigned to your SoftLayer account. func (r Billing_Item_Cancellation_Request) GetObject() (resp datatypes.Billing_Item_Cancellation_Request, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getObject", nil, &r.Options, &resp) @@ -2704,30 +1616,6 @@ func (r Billing_Item_Chronicle) GetAssociatedChildren() (resp []datatypes.Billin return } -func (r Billing_Item_Chronicle) GetAssociatedChildrenIter() (resp []datatypes.Billing_Item_Chronicle, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getAssociatedChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Chronicle{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getAssociatedChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Item_Chronicle) GetObject() (resp datatypes.Billing_Item_Chronicle, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getObject", nil, &r.Options, &resp) @@ -2840,90 +1728,18 @@ func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedChildren() (resp return } -func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedGuestDiskBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedGuestDiskBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedGuestDiskBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's active bundled billing items. func (r Billing_Item_Virtual_DedicatedHost) GetActiveBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveBundledItems", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetActiveBundledItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveBundledItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveBundledItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A service cancellation request item that corresponds to the billing item. func (r Billing_Item_Virtual_DedicatedHost) GetActiveCancellationItem() (resp datatypes.Billing_Item_Cancellation_Request_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveCancellationItem", nil, &r.Options, &resp) @@ -2936,30 +1752,6 @@ func (r Billing_Item_Virtual_DedicatedHost) GetActiveChildren() (resp []datatype return } -func (r Billing_Item_Virtual_DedicatedHost) GetActiveChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Billing_Item_Virtual_DedicatedHost) GetActiveFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveFlag", nil, &r.Options, &resp) @@ -2972,60 +1764,12 @@ func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolAssociatedGuestDis return } -func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolAssociatedGuestDiskBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's spare pool bundled billing items. func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolBundledItems", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolBundledItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolBundledItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolBundledItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A billing item's associated parent. This is to be used for billing items that are "floating", and therefore are not child items of any parent billing item. If it is desired to associate an item to another, populate this with the SoftLayer_Billing_Item ID of that associated parent item. func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedBillingItem", nil, &r.Options, &resp) @@ -3038,120 +1782,24 @@ func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedBillingItemHistory() (r return } -func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedBillingItemHistoryIter() (resp []datatypes.Billing_Item_Association_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedBillingItemHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Association_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedBillingItemHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's associated child billing items. This includes "floating" items that are not necessarily child billing items of this billing item. func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedChildren", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A billing item's associated parent billing item. This object will be the same as the parent billing item if parentId is set. func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedParent() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedParent", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedParentIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedParent", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedParent", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Billing_Item_Virtual_DedicatedHost) GetAvailableMatchingVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAvailableMatchingVlans", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetAvailableMatchingVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAvailableMatchingVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAvailableMatchingVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The bandwidth allocation for a billing item. func (r Billing_Item_Virtual_DedicatedHost) GetBandwidthAllocation() (resp datatypes.Network_Bandwidth_Version1_Allocation, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -3164,90 +1812,18 @@ func (r Billing_Item_Virtual_DedicatedHost) GetBillableChildren() (resp []dataty return } -func (r Billing_Item_Virtual_DedicatedHost) GetBillableChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBillableChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBillableChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's bundled billing items. func (r Billing_Item_Virtual_DedicatedHost) GetBundledItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBundledItems", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetBundledItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBundledItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBundledItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's active child billing items. func (r Billing_Item_Virtual_DedicatedHost) GetCanceledChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCanceledChildren", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetCanceledChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCanceledChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCanceledChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item's cancellation reason. func (r Billing_Item_Virtual_DedicatedHost) GetCancellationReason() (resp datatypes.Billing_Item_Cancellation_Reason, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCancellationReason", nil, &r.Options, &resp) @@ -3260,30 +1836,6 @@ func (r Billing_Item_Virtual_DedicatedHost) GetCancellationRequests() (resp []da return } -func (r Billing_Item_Virtual_DedicatedHost) GetCancellationRequestsIter() (resp []datatypes.Billing_Item_Cancellation_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCancellationRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Cancellation_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCancellationRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The item category to which the billing item's item belongs. func (r Billing_Item_Virtual_DedicatedHost) GetCategory() (resp datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCategory", nil, &r.Options, &resp) @@ -3296,120 +1848,24 @@ func (r Billing_Item_Virtual_DedicatedHost) GetChildren() (resp []datatypes.Bill return } -func (r Billing_Item_Virtual_DedicatedHost) GetChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's active child billing items. func (r Billing_Item_Virtual_DedicatedHost) GetChildrenWithActiveAgreement() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildrenWithActiveAgreement", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetChildrenWithActiveAgreementIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildrenWithActiveAgreement", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildrenWithActiveAgreement", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve For product items which have a downgrade path defined, this will return those product items. func (r Billing_Item_Virtual_DedicatedHost) GetDowngradeItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getDowngradeItems", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetDowngradeItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getDowngradeItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getDowngradeItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's associated child billing items, excluding some items with a $0.00 recurring fee. func (r Billing_Item_Virtual_DedicatedHost) GetFilteredNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp) return } -func (r Billing_Item_Virtual_DedicatedHost) GetFilteredNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getFilteredNextInvoiceChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag that will reflect whether this billing item is billed on an hourly basis or not. func (r Billing_Item_Virtual_DedicatedHost) GetHourlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getHourlyFlag", nil, &r.Options, &resp) @@ -3428,30 +1884,6 @@ func (r Billing_Item_Virtual_DedicatedHost) GetInvoiceItems() (resp []datatypes. return } -func (r Billing_Item_Virtual_DedicatedHost) GetInvoiceItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getInvoiceItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getInvoiceItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The entry in the SoftLayer product catalog that a billing item is based upon. func (r Billing_Item_Virtual_DedicatedHost) GetItem() (resp datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getItem", nil, &r.Options, &resp) @@ -3470,30 +1902,6 @@ func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceChildren() (resp []dat return } -func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A Billing Item's total, including any child billing items if they exist.' func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceTotalOneTimeAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceTotalOneTimeAmount", nil, &r.Options, &resp) @@ -3524,30 +1932,6 @@ func (r Billing_Item_Virtual_DedicatedHost) GetNonZeroNextInvoiceChildren() (res return } -func (r Billing_Item_Virtual_DedicatedHost) GetNonZeroNextInvoiceChildrenIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNonZeroNextInvoiceChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNonZeroNextInvoiceChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Billing_Item_Virtual_DedicatedHost) GetObject() (resp datatypes.Billing_Item_Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getObject", nil, &r.Options, &resp) @@ -3620,34 +2004,6 @@ func (r Billing_Item_Virtual_DedicatedHost) GetServiceBillingItemsByCategory(cat return } -func (r Billing_Item_Virtual_DedicatedHost) GetServiceBillingItemsByCategoryIter(categoryCode *string, includeZeroRecurringFee *bool) (resp []datatypes.Billing_Item, err error) { - params := []interface{}{ - categoryCode, - includeZeroRecurringFee, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getServiceBillingItemsByCategory", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getServiceBillingItemsByCategory", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A friendly description of software component func (r Billing_Item_Virtual_DedicatedHost) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getSoftwareDescription", nil, &r.Options, &resp) @@ -3666,30 +2022,6 @@ func (r Billing_Item_Virtual_DedicatedHost) GetUpgradeItems() (resp []datatypes. return } -func (r Billing_Item_Virtual_DedicatedHost) GetUpgradeItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getUpgradeItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getUpgradeItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Remove the association from a billing item. func (r Billing_Item_Virtual_DedicatedHost) RemoveAssociationId() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "removeAssociationId", nil, &r.Options, &resp) @@ -3769,30 +2101,6 @@ func (r Billing_Order) GetAllObjects() (resp []datatypes.Billing_Order, err erro return } -func (r Billing_Order) GetAllObjectsIter() (resp []datatypes.Billing_Order, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Billing_Order) GetBrand() (resp datatypes.Brand, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getBrand", nil, &r.Options, &resp) @@ -3811,60 +2119,12 @@ func (r Billing_Order) GetCoreRestrictedItems() (resp []datatypes.Billing_Order_ return } -func (r Billing_Order) GetCoreRestrictedItemsIter() (resp []datatypes.Billing_Order_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCoreRestrictedItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCoreRestrictedItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All credit card transactions associated with this order. If this order was not placed with a credit card, this will be empty. func (r Billing_Order) GetCreditCardTransactions() (resp []datatypes.Billing_Payment_Card_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCreditCardTransactions", nil, &r.Options, &resp) return } -func (r Billing_Order) GetCreditCardTransactionsIter() (resp []datatypes.Billing_Payment_Card_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCreditCardTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Payment_Card_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCreditCardTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Billing_Order) GetExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getExchangeRate", nil, &r.Options, &resp) @@ -3883,30 +2143,6 @@ func (r Billing_Order) GetItems() (resp []datatypes.Billing_Order_Item, err erro return } -func (r Billing_Order) GetItemsIter() (resp []datatypes.Billing_Order_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Billing_Order object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Order service. You can only retrieve orders that are assigned to your portal user's account. func (r Billing_Order) GetObject() (resp datatypes.Billing_Order, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getObject", nil, &r.Options, &resp) @@ -3937,60 +2173,12 @@ func (r Billing_Order) GetOrderStatuses() (resp []datatypes.Container_Billing_Or return } -func (r Billing_Order) GetOrderStatusesIter() (resp []datatypes.Container_Billing_Order_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderStatuses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Billing_Order_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderStatuses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An order's top level items. This normally includes the server line item and any non-server additional services such as NAS or ISCSI. func (r Billing_Order) GetOrderTopLevelItems() (resp []datatypes.Billing_Order_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTopLevelItems", nil, &r.Options, &resp) return } -func (r Billing_Order) GetOrderTopLevelItemsIter() (resp []datatypes.Billing_Order_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTopLevelItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTopLevelItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This amount represents the order's initial charge including set up fee and taxes. func (r Billing_Order) GetOrderTotalAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalAmount", nil, &r.Options, &resp) @@ -4051,30 +2239,6 @@ func (r Billing_Order) GetPaypalTransactions() (resp []datatypes.Billing_Payment return } -func (r Billing_Order) GetPaypalTransactionsIter() (resp []datatypes.Billing_Payment_PayPal_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPaypalTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Payment_PayPal_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPaypalTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a PDF record of a SoftLayer quote. If the order is not a quote, an error will be thrown. func (r Billing_Order) GetPdf() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPdf", nil, &r.Options, &resp) @@ -4253,30 +2417,6 @@ func (r Billing_Order_Cart) GetOrdersFromQuote() (resp []datatypes.Billing_Order return } -func (r Billing_Order_Cart) GetOrdersFromQuoteIter() (resp []datatypes.Billing_Order, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getOrdersFromQuote", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getOrdersFromQuote", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a PDF copy of the cart. func (r Billing_Order_Cart) GetPdf() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getPdf", nil, &r.Options, &resp) @@ -4415,30 +2555,6 @@ func (r Billing_Order_Item) GetBundledItems() (resp []datatypes.Billing_Order_It return } -func (r Billing_Order_Item) GetBundledItemsIter() (resp []datatypes.Billing_Order_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getBundledItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getBundledItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The item category tied to an order item. func (r Billing_Order_Item) GetCategory() (resp datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getCategory", nil, &r.Options, &resp) @@ -4451,30 +2567,6 @@ func (r Billing_Order_Item) GetChildren() (resp []datatypes.Billing_Order_Item, return } -func (r Billing_Order_Item) GetChildrenIter() (resp []datatypes.Billing_Order_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's universally unique identifier. func (r Billing_Order_Item) GetGlobalIdentifier() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getGlobalIdentifier", nil, &r.Options, &resp) @@ -4499,30 +2591,6 @@ func (r Billing_Order_Item) GetItemCategoryAnswers() (resp []datatypes.Billing_O return } -func (r Billing_Order_Item) GetItemCategoryAnswersIter() (resp []datatypes.Billing_Order_Item_Category_Answer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItemCategoryAnswers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Item_Category_Answer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItemCategoryAnswers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Product_Item_Price tied to an order item. The item price object describes the cost of an item. func (r Billing_Order_Item) GetItemPrice() (resp datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItemPrice", nil, &r.Options, &resp) @@ -4541,30 +2609,6 @@ func (r Billing_Order_Item) GetNextOrderChildren() (resp []datatypes.Billing_Ord return } -func (r Billing_Order_Item) GetNextOrderChildrenIter() (resp []datatypes.Billing_Order_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getNextOrderChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getNextOrderChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Billing_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item service. You can only retrieve billing items tied to the account that your portal user is assigned to. Billing items are an account's items of billable items. There are "parent" billing items and "child" billing items. The server billing item is generally referred to as a parent billing item. The items tied to a server, such as ram, harddrives, and operating systems are considered "child" billing items. func (r Billing_Order_Item) GetObject() (resp datatypes.Billing_Order_Item, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getObject", nil, &r.Options, &resp) @@ -4631,30 +2675,6 @@ func (r Billing_Order_Item) GetStorageGroups() (resp []datatypes.Configuration_S return } -func (r Billing_Order_Item) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group_Order, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group_Order{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The recurring fee of an ordered item. This amount represents the fees that will be charged on a recurring (usually monthly) basis. func (r Billing_Order_Item) GetTotalRecurringAmount() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getTotalRecurringAmount", nil, &r.Options, &resp) @@ -4755,30 +2775,6 @@ func (r Billing_Order_Quote) GetOrdersFromQuote() (resp []datatypes.Billing_Orde return } -func (r Billing_Order_Quote) GetOrdersFromQuoteIter() (resp []datatypes.Billing_Order, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getOrdersFromQuote", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getOrdersFromQuote", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a PDF record of a SoftLayer quoted order. SoftLayer keeps PDF records of all quoted orders for customer retrieval from the portal and API. You must have a PDF reader installed in order to view these quoted order files. func (r Billing_Order_Quote) GetPdf() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getPdf", nil, &r.Options, &resp) diff --git a/services/brand.go b/services/brand.go index ee931af..a19a601 100644 --- a/services/brand.go +++ b/services/brand.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -211,30 +210,6 @@ func (r Brand) GetAllOwnedAccounts() (resp []datatypes.Account, err error) { return } -func (r Brand) GetAllOwnedAccountsIter() (resp []datatypes.Account, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getAllOwnedAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getAllOwnedAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // (DEPRECATED) Use [[SoftLayer_Ticket_Subject::getAllObjects]] method. // Deprecated: This function has been marked as deprecated. func (r Brand) GetAllTicketSubjects(account *datatypes.Account) (resp []datatypes.Ticket_Subject, err error) { @@ -245,33 +220,6 @@ func (r Brand) GetAllTicketSubjects(account *datatypes.Account) (resp []datatype return } -func (r Brand) GetAllTicketSubjectsIter(account *datatypes.Account) (resp []datatypes.Ticket_Subject, err error) { - params := []interface{}{ - account, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getAllTicketSubjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Subject{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getAllTicketSubjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This flag indicates if creation of accounts is allowed. func (r Brand) GetAllowAccountCreationFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getAllowAccountCreationFlag", nil, &r.Options, &resp) @@ -284,30 +232,6 @@ func (r Brand) GetBillingItemSnapshots() (resp []datatypes.Billing_Item_Chronicl return } -func (r Brand) GetBillingItemSnapshotsIter() (resp []datatypes.Billing_Item_Chronicle, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Chronicle{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This service returns the snapshots of billing items recorded periodically given an account ID. The provided account ID must be owned by the brand that calls this service. In this context, it can be interpreted that the billing items snapshots belong to both the account and that accounts brand. Retrieving billing item snapshots is more performant than retrieving billing items directly and performs less relational joins improving retrieval efficiency. // // The downside is, they are not real time, and do not share relational parity with the original billing item. @@ -319,33 +243,6 @@ func (r Brand) GetBillingItemSnapshotsForSingleOwnedAccount(accountId *int) (res return } -func (r Brand) GetBillingItemSnapshotsForSingleOwnedAccountIter(accountId *int) (resp []datatypes.Billing_Item_Chronicle, err error) { - params := []interface{}{ - accountId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshotsForSingleOwnedAccount", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Chronicle{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshotsForSingleOwnedAccount", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This service returns the snapshots of billing items recorded periodically given an account ID owned by the brand those billing items belong to. Retrieving billing item snapshots is more performant than retrieving billing items directly and performs less relational joins improving retrieval efficiency. // // The downside is, they are not real time, and do not share relational parity with the original billing item. @@ -357,33 +254,6 @@ func (r Brand) GetBillingItemSnapshotsWithExternalAccountId(externalAccountId *s return } -func (r Brand) GetBillingItemSnapshotsWithExternalAccountIdIter(externalAccountId *string) (resp []datatypes.Billing_Item_Chronicle, err error) { - params := []interface{}{ - externalAccountId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshotsWithExternalAccountId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item_Chronicle{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getBillingItemSnapshotsWithExternalAccountId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Business Partner details for the brand. Country Enterprise Code, Channel, Segment, Reseller Level. func (r Brand) GetBusinessPartner() (resp datatypes.Brand_Business_Partner, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getBusinessPartner", nil, &r.Options, &resp) @@ -408,90 +278,18 @@ func (r Brand) GetContactInformation() (resp []datatypes.Brand_Contact, err erro return } -func (r Brand) GetContactInformationIter() (resp []datatypes.Brand_Contact, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getContactInformation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Brand_Contact{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getContactInformation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The contacts for the brand. func (r Brand) GetContacts() (resp []datatypes.Brand_Contact, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getContacts", nil, &r.Options, &resp) return } -func (r Brand) GetContactsIter() (resp []datatypes.Brand_Contact, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getContacts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Brand_Contact{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getContacts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain. func (r Brand) GetCustomerCountryLocationRestrictions() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getCustomerCountryLocationRestrictions", nil, &r.Options, &resp) return } -func (r Brand) GetCustomerCountryLocationRestrictionsIter() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getCustomerCountryLocationRestrictions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Brand_Restriction_Location_CustomerCountry{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getCustomerCountryLocationRestrictions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Brand) GetDistributor() (resp datatypes.Brand, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getDistributor", nil, &r.Options, &resp) @@ -516,30 +314,6 @@ func (r Brand) GetHardware() (resp []datatypes.Hardware, err error) { return } -func (r Brand) GetHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Brand) GetHasAgentAdvancedSupportFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getHasAgentAdvancedSupportFlag", nil, &r.Options, &resp) @@ -570,60 +344,12 @@ func (r Brand) GetOpenTickets() (resp []datatypes.Ticket, err error) { return } -func (r Brand) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getOpenTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getOpenTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Active accounts owned by the brand. func (r Brand) GetOwnedAccounts() (resp []datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getOwnedAccounts", nil, &r.Options, &resp) return } -func (r Brand) GetOwnedAccountsIter() (resp []datatypes.Account, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getOwnedAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getOwnedAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Brand) GetSecurityLevel() (resp datatypes.Security_Level, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getSecurityLevel", nil, &r.Options, &resp) @@ -636,60 +362,12 @@ func (r Brand) GetTicketGroups() (resp []datatypes.Ticket_Group, err error) { return } -func (r Brand) GetTicketGroupsIter() (resp []datatypes.Ticket_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getTicketGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getTicketGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Brand) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getTickets", nil, &r.Options, &resp) return } -func (r Brand) GetTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // (DEPRECATED) Use [[SoftLayer_User_Customer::getImpersonationToken]] method. func (r Brand) GetToken(userId *int) (resp string, err error) { params := []interface{}{ @@ -705,60 +383,12 @@ func (r Brand) GetUsers() (resp []datatypes.User_Customer, err error) { return } -func (r Brand) GetUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated virtual guest objects. func (r Brand) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "getVirtualGuests", nil, &r.Options, &resp) return } -func (r Brand) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Check if the brand is IBM SLIC top level brand or sub brand. func (r Brand) IsIbmSlicBrand() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Brand", "isIbmSlicBrand", nil, &r.Options, &resp) @@ -929,30 +559,6 @@ func (r Brand_Restriction_Location_CustomerCountry) GetAllObjects() (resp []data return } -func (r Brand_Restriction_Location_CustomerCountry) GetAllObjectsIter() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Brand_Restriction_Location_CustomerCountry{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This references the brand that has a brand-location-country restriction setup. func (r Brand_Restriction_Location_CustomerCountry) GetBrand() (resp datatypes.Brand, err error) { err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getBrand", nil, &r.Options, &resp) diff --git a/services/catalyst.go b/services/catalyst.go index 9a98dc3..6462ac0 100644 --- a/services/catalyst.go +++ b/services/catalyst.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,30 +68,6 @@ func (r Catalyst_Company_Type) GetAllObjects() (resp []datatypes.Catalyst_Compan return } -func (r Catalyst_Company_Type) GetAllObjectsIter() (resp []datatypes.Catalyst_Company_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Catalyst_Company_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Catalyst_Company_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Catalyst_Company_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Catalyst_Company_Type) GetObject() (resp datatypes.Catalyst_Company_Type, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Company_Type", "getObject", nil, &r.Options, &resp) @@ -157,30 +132,6 @@ func (r Catalyst_Enrollment) GetAffiliates() (resp []datatypes.Catalyst_Affiliat return } -func (r Catalyst_Enrollment) GetAffiliatesIter() (resp []datatypes.Catalyst_Affiliate, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getAffiliates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Catalyst_Affiliate{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getAffiliates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Catalyst_Enrollment) GetCompanyType() (resp datatypes.Catalyst_Company_Type, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getCompanyType", nil, &r.Options, &resp) @@ -193,120 +144,24 @@ func (r Catalyst_Enrollment) GetCompanyTypes() (resp []datatypes.Catalyst_Compan return } -func (r Catalyst_Enrollment) GetCompanyTypesIter() (resp []datatypes.Catalyst_Company_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getCompanyTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Catalyst_Company_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getCompanyTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Catalyst_Enrollment) GetEnrollmentRequestAnnualRevenueOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestAnnualRevenueOptions", nil, &r.Options, &resp) return } -func (r Catalyst_Enrollment) GetEnrollmentRequestAnnualRevenueOptionsIter() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestAnnualRevenueOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestAnnualRevenueOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Catalyst_Enrollment) GetEnrollmentRequestUserCountOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestUserCountOptions", nil, &r.Options, &resp) return } -func (r Catalyst_Enrollment) GetEnrollmentRequestUserCountOptionsIter() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestUserCountOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestUserCountOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Catalyst_Enrollment) GetEnrollmentRequestYearsInOperationOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestYearsInOperationOptions", nil, &r.Options, &resp) return } -func (r Catalyst_Enrollment) GetEnrollmentRequestYearsInOperationOptionsIter() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestYearsInOperationOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestYearsInOperationOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Catalyst_Enrollment) GetIsActiveFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getIsActiveFlag", nil, &r.Options, &resp) diff --git a/services/compliance.go b/services/compliance.go index 12baf53..0940658 100644 --- a/services/compliance.go +++ b/services/compliance.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,30 +68,6 @@ func (r Compliance_Report_Type) GetAllObjects() (resp []datatypes.Compliance_Rep return } -func (r Compliance_Report_Type) GetAllObjectsIter() (resp []datatypes.Compliance_Report_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Compliance_Report_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Compliance_Report_Type) GetObject() (resp datatypes.Compliance_Report_Type, err error) { err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getObject", nil, &r.Options, &resp) diff --git a/services/configuration.go b/services/configuration.go index f8d2491..1343c6a 100644 --- a/services/configuration.go +++ b/services/configuration.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,60 +68,12 @@ func (r Configuration_Storage_Group_Array_Type) GetAllObjects() (resp []datatype return } -func (r Configuration_Storage_Group_Array_Type) GetAllObjectsIter() (resp []datatypes.Configuration_Storage_Group_Array_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group_Array_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Storage_Group_Array_Type) GetHardwareComponentModels() (resp []datatypes.Hardware_Component_Model, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getHardwareComponentModels", nil, &r.Options, &resp) return } -func (r Configuration_Storage_Group_Array_Type) GetHardwareComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getHardwareComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getHardwareComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Configuration_Storage_Group_Array_Type) GetObject() (resp datatypes.Configuration_Storage_Group_Array_Type, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getObject", nil, &r.Options, &resp) @@ -205,120 +156,24 @@ func (r Configuration_Template) GetAllObjects() (resp []datatypes.Configuration_ return } -func (r Configuration_Template) GetAllObjectsIter() (resp []datatypes.Configuration_Template, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Template) GetConfigurationSections() (resp []datatypes.Configuration_Template_Section, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getConfigurationSections", nil, &r.Options, &resp) return } -func (r Configuration_Template) GetConfigurationSectionsIter() (resp []datatypes.Configuration_Template_Section, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getConfigurationSections", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template_Section{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getConfigurationSections", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Template) GetDefaultValues() (resp []datatypes.Configuration_Template_Section_Definition_Value, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefaultValues", nil, &r.Options, &resp) return } -func (r Configuration_Template) GetDefaultValuesIter() (resp []datatypes.Configuration_Template_Section_Definition_Value, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefaultValues", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template_Section_Definition_Value{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefaultValues", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Template) GetDefinitions() (resp []datatypes.Configuration_Template_Section_Definition, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefinitions", nil, &r.Options, &resp) return } -func (r Configuration_Template) GetDefinitionsIter() (resp []datatypes.Configuration_Template_Section_Definition, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefinitions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template_Section_Definition{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefinitions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Template) GetItem() (resp datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getItem", nil, &r.Options, &resp) @@ -406,30 +261,6 @@ func (r Configuration_Template_Section) GetDefinitions() (resp []datatypes.Confi return } -func (r Configuration_Template_Section) GetDefinitionsIter() (resp []datatypes.Configuration_Template_Section_Definition, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getDefinitions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template_Section_Definition{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getDefinitions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Template_Section) GetDisallowedDeletionFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getDisallowedDeletionFlag", nil, &r.Options, &resp) @@ -460,30 +291,6 @@ func (r Configuration_Template_Section) GetProfiles() (resp []datatypes.Configur return } -func (r Configuration_Template_Section) GetProfilesIter() (resp []datatypes.Configuration_Template_Section_Profile, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getProfiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template_Section_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getProfiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Template_Section) GetSectionType() (resp datatypes.Configuration_Template_Section_Type, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSectionType", nil, &r.Options, &resp) @@ -502,30 +309,6 @@ func (r Configuration_Template_Section) GetSubSections() (resp []datatypes.Confi return } -func (r Configuration_Template_Section) GetSubSectionsIter() (resp []datatypes.Configuration_Template_Section, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSubSections", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template_Section{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSubSections", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Template_Section) GetTemplate() (resp datatypes.Configuration_Template, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getTemplate", nil, &r.Options, &resp) @@ -586,30 +369,6 @@ func (r Configuration_Template_Section_Definition) GetAttributes() (resp []datat return } -func (r Configuration_Template_Section_Definition) GetAttributesIter() (resp []datatypes.Configuration_Template_Section_Definition_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template_Section_Definition_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Configuration_Template_Section_Definition) GetDefaultValue() (resp datatypes.Configuration_Template_Section_Definition_Value, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getDefaultValue", nil, &r.Options, &resp) @@ -694,30 +453,6 @@ func (r Configuration_Template_Section_Definition_Group) GetAllGroups() (resp [] return } -func (r Configuration_Template_Section_Definition_Group) GetAllGroupsIter() (resp []datatypes.Configuration_Template_Section_Definition_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getAllGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template_Section_Definition_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getAllGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Configuration_Template_Section_Definition_Group) GetObject() (resp datatypes.Configuration_Template_Section_Definition_Group, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getObject", nil, &r.Options, &resp) diff --git a/services/dns.go b/services/dns.go index e56d9e4..edf6c12 100644 --- a/services/dns.go +++ b/services/dns.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -152,33 +151,6 @@ func (r Dns_Domain) CreateObjects(templateObjects []datatypes.Dns_Domain) (resp return } -func (r Dns_Domain) CreateObjectsIter(templateObjects []datatypes.Dns_Domain) (resp []datatypes.Dns_Domain, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Domain", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Domain", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // setPtrRecordForIpAddress() sets a single reverse DNS record for a single IP address and returns the newly created or edited [[SoftLayer_Dns_Domain_ResourceRecord]] record. Currently this method only supports IPv4 addresses and performs no operation when given an IPv6 address. func (r Dns_Domain) CreatePtrRecord(ipAddress *string, ptrRecord *string, ttl *int) (resp datatypes.Dns_Domain_ResourceRecord, err error) { params := []interface{}{ @@ -233,33 +205,6 @@ func (r Dns_Domain) GetByDomainName(name *string) (resp []datatypes.Dns_Domain, return } -func (r Dns_Domain) GetByDomainNameIter(name *string) (resp []datatypes.Dns_Domain, err error) { - params := []interface{}{ - name, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getByDomainName", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getByDomainName", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating that the dns domain record is a managed resource. func (r Dns_Domain) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -278,30 +223,6 @@ func (r Dns_Domain) GetResourceRecords() (resp []datatypes.Dns_Domain_ResourceRe return } -func (r Dns_Domain) GetResourceRecordsIter() (resp []datatypes.Dns_Domain_ResourceRecord, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getResourceRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain_ResourceRecord{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getResourceRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The secondary DNS record that defines this domain as being managed through zone transfers. func (r Dns_Domain) GetSecondary() (resp datatypes.Dns_Secondary, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Domain", "getSecondary", nil, &r.Options, &resp) @@ -394,33 +315,6 @@ func (r Dns_Domain_ResourceRecord) CreateObjects(templateObjects []datatypes.Dns return } -func (r Dns_Domain_ResourceRecord) CreateObjectsIter(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain_ResourceRecord{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Delete a domain's resource record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord object. The serial number of the domain associated with this resource record is updated upon deletion. You may not delete SOA, NS, or PTR resource records. // // ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. @@ -538,33 +432,6 @@ func (r Dns_Domain_ResourceRecord_MxType) CreateObjects(templateObjects []dataty return } -func (r Dns_Domain_ResourceRecord_MxType) CreateObjectsIter(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_MxType", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain_ResourceRecord{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_MxType", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Delete a domain's MX record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord_MxType object. The serial number of the domain associated with this MX record is updated upon deletion. // // ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. @@ -678,33 +545,6 @@ func (r Dns_Domain_ResourceRecord_SrvType) CreateObjects(templateObjects []datat return } -func (r Dns_Domain_ResourceRecord_SrvType) CreateObjectsIter(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_SrvType", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain_ResourceRecord{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_SrvType", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Delete a domain's SRV record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord_SrvType object. The serial number of the domain associated with this SRV record is updated upon deletion. // // ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. @@ -834,33 +674,6 @@ func (r Dns_Secondary) CreateObjects(templateObjects []datatypes.Dns_Secondary) return } -func (r Dns_Secondary) CreateObjectsIter(templateObjects []datatypes.Dns_Secondary) (resp []datatypes.Dns_Secondary, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Secondary{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Delete a secondary DNS Record. This will also remove any associated domain records and resource records on the SoftLayer nameservers that were created as a result of the zone transfers. This action cannot be undone. func (r Dns_Secondary) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "deleteObject", nil, &r.Options, &resp) @@ -891,33 +704,6 @@ func (r Dns_Secondary) GetByDomainName(name *string) (resp []datatypes.Dns_Secon return } -func (r Dns_Secondary) GetByDomainNameIter(name *string) (resp []datatypes.Dns_Secondary, err error) { - params := []interface{}{ - name, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getByDomainName", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Secondary{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getByDomainName", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The domain record created by zone transfer from a secondary DNS record. func (r Dns_Secondary) GetDomain() (resp datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getDomain", nil, &r.Options, &resp) @@ -930,30 +716,6 @@ func (r Dns_Secondary) GetErrorMessages() (resp []datatypes.Dns_Message, err err return } -func (r Dns_Secondary) GetErrorMessagesIter() (resp []datatypes.Dns_Message, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getErrorMessages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Message{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getErrorMessages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Dns_Secondary object whose ID number corresponds to the ID number of the init paramater passed to the SoftLayer_Dns_Secondary service. You can only retrieve a secondary DNS record that is assigned to your SoftLayer customer account. func (r Dns_Secondary) GetObject() (resp datatypes.Dns_Secondary, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "getObject", nil, &r.Options, &resp) diff --git a/services/email.go b/services/email.go index 4773010..2d36ae9 100644 --- a/services/email.go +++ b/services/email.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -81,30 +80,6 @@ func (r Email_Subscription) GetAllObjects() (resp []datatypes.Email_Subscription return } -func (r Email_Subscription) GetAllObjectsIter() (resp []datatypes.Email_Subscription, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Email_Subscription", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Email_Subscription{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Email_Subscription", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Email_Subscription) GetEnabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Email_Subscription", "getEnabled", nil, &r.Options, &resp) @@ -163,30 +138,6 @@ func (r Email_Subscription_Group) GetAllObjects() (resp []datatypes.Email_Subscr return } -func (r Email_Subscription_Group) GetAllObjectsIter() (resp []datatypes.Email_Subscription_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Email_Subscription_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Email_Subscription_Group) GetObject() (resp datatypes.Email_Subscription_Group, err error) { err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getObject", nil, &r.Options, &resp) @@ -198,27 +149,3 @@ func (r Email_Subscription_Group) GetSubscriptions() (resp []datatypes.Email_Sub err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getSubscriptions", nil, &r.Options, &resp) return } - -func (r Email_Subscription_Group) GetSubscriptionsIter() (resp []datatypes.Email_Subscription, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getSubscriptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Email_Subscription{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Email_Subscription_Group", "getSubscriptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} diff --git a/services/event.go b/services/event.go index 9bd64d8..69307bb 100644 --- a/services/event.go +++ b/services/event.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -72,123 +71,24 @@ func (r Event_Log) GetAllEventNames(objectName *string) (resp []string, err erro return } -func (r Event_Log) GetAllEventNamesIter(objectName *string) (resp []string, err error) { - params := []interface{}{ - objectName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventNames", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventNames", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This all indexed event object names. func (r Event_Log) GetAllEventObjectNames() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventObjectNames", nil, &r.Options, &resp) return } -func (r Event_Log) GetAllEventObjectNamesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventObjectNames", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventObjectNames", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Event_Log) GetAllObjects() (resp []datatypes.Event_Log, err error) { err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllObjects", nil, &r.Options, &resp) return } -func (r Event_Log) GetAllObjectsIter() (resp []datatypes.Event_Log, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Event_Log{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Event_Log) GetAllUserTypes() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllUserTypes", nil, &r.Options, &resp) return } -func (r Event_Log) GetAllUserTypesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllUserTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllUserTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Event_Log) GetUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Event_Log", "getUser", nil, &r.Options, &resp) diff --git a/services/flexiblecredit.go b/services/flexiblecredit.go index 7d415ab..8d02519 100644 --- a/services/flexiblecredit.go +++ b/services/flexiblecredit.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -72,63 +71,12 @@ func (r FlexibleCredit_Program) GetAffiliatesAvailableForSelfEnrollmentByVerific return } -func (r FlexibleCredit_Program) GetAffiliatesAvailableForSelfEnrollmentByVerificationTypeIter(verificationTypeKeyName *string) (resp []datatypes.FlexibleCredit_Affiliate, err error) { - params := []interface{}{ - verificationTypeKeyName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getAffiliatesAvailableForSelfEnrollmentByVerificationType", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.FlexibleCredit_Affiliate{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getAffiliatesAvailableForSelfEnrollmentByVerificationType", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r FlexibleCredit_Program) GetCompanyTypes() (resp []datatypes.FlexibleCredit_Company_Type, err error) { err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getCompanyTypes", nil, &r.Options, &resp) return } -func (r FlexibleCredit_Program) GetCompanyTypesIter() (resp []datatypes.FlexibleCredit_Company_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getCompanyTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.FlexibleCredit_Company_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getCompanyTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r FlexibleCredit_Program) GetObject() (resp datatypes.FlexibleCredit_Program, err error) { err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getObject", nil, &r.Options, &resp) diff --git a/services/hardware.go b/services/hardware.go index 5f573cb..c1d9bde 100644 --- a/services/hardware.go +++ b/services/hardware.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -447,90 +446,18 @@ func (r Hardware) GetActiveComponents() (resp []datatypes.Hardware_Component, er return } -func (r Hardware) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's active network monitoring incidents. func (r Hardware) GetActiveNetworkMonitorIncident() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) return } -func (r Hardware) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAllPowerComponents", nil, &r.Options, &resp) return } -func (r Hardware) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getAllPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getAllPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedHost", nil, &r.Options, &resp) @@ -543,60 +470,12 @@ func (r Hardware) GetAllowedNetworkStorage() (resp []datatypes.Network_Storage, return } -func (r Hardware) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } -func (r Hardware) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -612,93 +491,18 @@ func (r Hardware) GetAttachedNetworkStorages(nasType *string) (resp []datatypes. return } -func (r Hardware) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getAttachedNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getAttachedNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAttributes", nil, &r.Options, &resp) return } -func (r Hardware) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } -func (r Hardware) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -708,33 +512,6 @@ func (r Hardware) GetAvailableNetworkStorages(nasType *string) (resp []datatypes return } -func (r Hardware) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getAvailableNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The average daily public bandwidth usage for the current billing cycle. func (r Hardware) GetAverageDailyPublicBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getAverageDailyPublicBandwidthUsage", nil, &r.Options, &resp) @@ -757,30 +534,6 @@ func (r Hardware) GetBackendNetworkComponents() (resp []datatypes.Network_Compon return } -func (r Hardware) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -797,30 +550,6 @@ func (r Hardware) GetBackendRouters() (resp []datatypes.Hardware, err error) { return } -func (r Hardware) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getBackendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getBackendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -839,30 +568,6 @@ func (r Hardware) GetBenchmarkCertifications() (resp []datatypes.Hardware_Benchm return } -func (r Hardware) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getBenchmarkCertifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Benchmark_Certification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getBenchmarkCertifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the billing item for a server. func (r Hardware) GetBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getBillingItem", nil, &r.Options, &resp) @@ -893,30 +598,6 @@ func (r Hardware) GetChildrenHardware() (resp []datatypes.Hardware, err error) { return } -func (r Hardware) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getChildrenHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getChildrenHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -929,30 +610,6 @@ func (r Hardware) GetComponents() (resp []datatypes.Hardware_Component, err erro return } -func (r Hardware) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A continuous data protection/server backup software component object. func (r Hardware) GetContinuousDataProtectionSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getContinuousDataProtectionSoftwareComponent", nil, &r.Options, &resp) @@ -979,30 +636,6 @@ func (r Hardware) GetCurrentBillingDetail() (resp []datatypes.Billing_Item, err return } -func (r Hardware) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getCurrentBillingDetail", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getCurrentBillingDetail", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -1043,330 +676,66 @@ func (r Hardware) GetDownlinkHardware() (resp []datatypes.Hardware, err error) { return } -func (r Hardware) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkServers", nil, &r.Options, &resp) return } -func (r Hardware) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownlinkVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware downstream from a network device. func (r Hardware) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } -func (r Hardware) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamHardwareBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Uplink_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamHardwareBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } -func (r Hardware) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamServers", nil, &r.Options, &resp) return } -func (r Hardware) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDownstreamVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getDriveControllers", nil, &r.Options, &resp) return } -func (r Hardware) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getDriveControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getDriveControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } -func (r Hardware) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getEvaultNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getEvaultNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -1395,30 +764,6 @@ func (r Hardware) GetFrontendNetworkComponents() (resp []datatypes.Network_Compo return } -func (r Hardware) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getFrontendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getFrontendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -1435,30 +780,6 @@ func (r Hardware) GetFrontendRouters() (resp []datatypes.Hardware, err error) { return } -func (r Hardware) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getFrontendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getFrontendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the future billing item for a server. func (r Hardware) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getFutureBillingItem", nil, &r.Options, &resp) @@ -1477,30 +798,6 @@ func (r Hardware) GetHardDrives() (resp []datatypes.Hardware_Component, err erro return } -func (r Hardware) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getHardDrives", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getHardDrives", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The chassis that a piece of hardware is housed in. func (r Hardware) GetHardwareChassis() (resp datatypes.Hardware_Chassis, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getHardwareChassis", nil, &r.Options, &resp) @@ -1559,34 +856,6 @@ func (r Hardware) GetHourlyBandwidth(mode *string, day *datatypes.Time) (resp [] return } -func (r Hardware) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - mode, - day, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getHourlyBandwidth", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getHourlyBandwidth", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A server's hourly billing status. func (r Hardware) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -1653,30 +922,6 @@ func (r Hardware) GetMemory() (resp []datatypes.Hardware_Component, err error) { return } -func (r Hardware) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getMemory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getMemory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getMemoryCapacity", nil, &r.Options, &resp) @@ -1695,30 +940,6 @@ func (r Hardware) GetModules() (resp []datatypes.Hardware_Component, err error) return } -func (r Hardware) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getModules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getModules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getMonitoringRobot", nil, &r.Options, &resp) @@ -1749,60 +970,12 @@ func (r Hardware) GetNetworkCards() (resp []datatypes.Hardware_Component, err er return } -func (r Hardware) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkCards", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkCards", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Returns a hardware's network components. func (r Hardware) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -1827,120 +1000,24 @@ func (r Hardware) GetNetworkMonitorAttachedDownHardware() (resp []datatypes.Hard return } -func (r Hardware) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } -func (r Hardware) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitorIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitors", nil, &r.Options, &resp) return } -func (r Hardware) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkMonitors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkStatus", nil, &r.Options, &resp) @@ -1959,60 +1036,12 @@ func (r Hardware) GetNetworkStorage() (resp []datatypes.Network_Storage, err err return } -func (r Hardware) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkVlans", nil, &r.Options, &resp) return } -func (r Hardware) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -2025,30 +1054,6 @@ func (r Hardware) GetNotesHistory() (resp []datatypes.Hardware_Note, err error) return } -func (r Hardware) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNotesHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Note{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNotesHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getNvRamCapacity", nil, &r.Options, &resp) @@ -2061,30 +1066,6 @@ func (r Hardware) GetNvRamComponentModels() (resp []datatypes.Hardware_Component return } -func (r Hardware) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getNvRamComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getNvRamComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Hardware object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Hardware service. You can only retrieve the account that your portal user is assigned to. func (r Hardware) GetObject() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getObject", nil, &r.Options, &resp) @@ -2139,60 +1120,12 @@ func (r Hardware) GetPowerComponents() (resp []datatypes.Hardware_Power_Componen return } -func (r Hardware) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerSupply", nil, &r.Options, &resp) return } -func (r Hardware) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerSupply", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getPowerSupply", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware's primary private IP address. func (r Hardware) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -2227,34 +1160,6 @@ func (r Hardware) GetPrivateBandwidthData(startTime *int, endTime *int) (resp [] return } -func (r Hardware) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getPrivateBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getPrivateBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether the hardware only has access to the private network. func (r Hardware) GetPrivateNetworkOnlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getPrivateNetworkOnlyFlag", nil, &r.Options, &resp) @@ -2279,30 +1184,6 @@ func (r Hardware) GetProcessors() (resp []datatypes.Hardware_Component, err erro return } -func (r Hardware) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getProcessors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getProcessors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a graph of a server's public network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPublicBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware) GetPublicBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -2313,34 +1194,6 @@ func (r Hardware) GetPublicBandwidthData(startTime *int, endTime *int) (resp []d return } -func (r Hardware) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getPublicBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getPublicBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware) GetRack() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRack", nil, &r.Options, &resp) @@ -2353,90 +1206,18 @@ func (r Hardware) GetRaidControllers() (resp []datatypes.Hardware_Component, err return } -func (r Hardware) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getRaidControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getRaidControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Recent events that impact this hardware. func (r Hardware) GetRecentEvents() (resp []datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRecentEvents", nil, &r.Options, &resp) return } -func (r Hardware) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getRecentEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getRecentEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve User credentials to issue commands and/or interact with the server's remote management card. func (r Hardware) GetRemoteManagementAccounts() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRemoteManagementAccounts", nil, &r.Options, &resp) return } -func (r Hardware) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getRemoteManagementAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getRemoteManagementAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -2449,210 +1230,42 @@ func (r Hardware) GetResourceConfigurations() (resp []datatypes.Hardware_Resourc return } -func (r Hardware) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceConfigurations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Resource_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceConfigurations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } -func (r Hardware) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupMemberReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupMemberReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupRoles", nil, &r.Options, &resp) return } -func (r Hardware) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroupRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The resource groups in which this hardware is a member. func (r Hardware) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroups", nil, &r.Options, &resp) return } -func (r Hardware) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getResourceGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's routers. func (r Hardware) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getRouters", nil, &r.Options, &resp) return } -func (r Hardware) GetRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's vulnerability scan requests. func (r Hardware) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSecurityScanRequests", nil, &r.Options, &resp) return } -func (r Hardware) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getSecurityScanRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Security_Scanner_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getSecurityScanRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getSensorData”' method retrieves a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures various information, including system temperatures, voltages and other local server settings. Sensor data is cached for 30 second; calls made to this method for the same server within 30 seconds of each other will result in the same data being returned. To ensure that the data retrieved retrieves snapshot of varied data, make calls greater than 30 seconds apart. func (r Hardware) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorData", nil, &r.Options, &resp) return } -func (r Hardware) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_SensorReading{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getSensorDataWithGraphs”' method retrieves the raw data returned from the server's remote management card. Along with raw data, graphs for the CPU and system temperatures and fan speeds are also returned. For more details on what information is returned, refer to the ”getSensorData” method. func (r Hardware) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -2665,30 +1278,6 @@ func (r Hardware) GetServerFanSpeedGraphs() (resp []datatypes.Container_RemoteMa return } -func (r Hardware) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getServerFanSpeedGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getServerFanSpeedGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getPowerState”' method retrieves the power state for the selected server. The server's power status is retrieved from its remote management card. This method returns "on", for a server that has been powered on, or "off" for servers powered off. func (r Hardware) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getServerPowerState", nil, &r.Options, &resp) @@ -2707,30 +1296,6 @@ func (r Hardware) GetServerTemperatureGraphs() (resp []datatypes.Container_Remot return } -func (r Hardware) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getServerTemperatureGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getServerTemperatureGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getServiceProvider", nil, &r.Options, &resp) @@ -2743,30 +1308,6 @@ func (r Hardware) GetSoftwareComponents() (resp []datatypes.Software_Component, return } -func (r Hardware) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getSoftwareComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getSoftwareComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the billing item for a spare pool server. func (r Hardware) GetSparePoolBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSparePoolBillingItem", nil, &r.Options, &resp) @@ -2779,120 +1320,24 @@ func (r Hardware) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err error) { return } -func (r Hardware) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware) GetStorageGroups() (resp []datatypes.Configuration_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageGroups", nil, &r.Options, &resp) return } -func (r Hardware) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getStorageNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getTagReferences", nil, &r.Options, &resp) return } -func (r Hardware) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getTopLevelLocation", nil, &r.Options, &resp) @@ -2905,60 +1350,12 @@ func (r Hardware) GetTransactionHistory() (resp []datatypes.Provisioning_Version return } -func (r Hardware) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getTransactionHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getTransactionHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a list of upgradeable items available to this piece of hardware. Currently, getUpgradeItemPrices retrieves upgrades available for a server's memory, hard drives, network port speed, bandwidth allocation and GPUs. func (r Hardware) GetUpgradeItemPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeItemPrices", nil, &r.Options, &resp) return } -func (r Hardware) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated upgrade request object, if any. func (r Hardware) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeRequest", nil, &r.Options, &resp) @@ -2971,30 +1368,6 @@ func (r Hardware) GetUpgradeableActiveComponents() (resp []datatypes.Hardware_Co return } -func (r Hardware) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeableActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getUpgradeableActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network device connected to a piece of hardware. func (r Hardware) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getUplinkHardware", nil, &r.Options, &resp) @@ -3007,60 +1380,12 @@ func (r Hardware) GetUplinkNetworkComponents() (resp []datatypes.Network_Compone return } -func (r Hardware) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getUplinkNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getUplinkNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getUserData", nil, &r.Options, &resp) return } -func (r Hardware) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getUserData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getUserData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualChassis", nil, &r.Options, &resp) @@ -3073,30 +1398,6 @@ func (r Hardware) GetVirtualChassisSiblings() (resp []datatypes.Hardware, err er return } -func (r Hardware) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualChassisSiblings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualChassisSiblings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's virtual host record. func (r Hardware) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualHost", nil, &r.Options, &resp) @@ -3109,30 +1410,6 @@ func (r Hardware) GetVirtualLicenses() (resp []datatypes.Software_VirtualLicense return } -func (r Hardware) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_VirtualLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getVirtualRack", nil, &r.Options, &resp) @@ -3445,33 +1722,6 @@ func (r Hardware_Component_Locator) GetGenericComponentModelAvailability(generic return } -func (r Hardware_Component_Locator) GetGenericComponentModelAvailabilityIter(genericComponentModelIds []int) (resp []datatypes.Hardware_Component_Locator_Result, err error) { - params := []interface{}{ - genericComponentModelIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getGenericComponentModelAvailability", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Locator_Result{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getGenericComponentModelAvailability", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_Component_Locator) GetPackageItemsAvailability(packageId *int) (resp []datatypes.Hardware_Component_Locator_Result, err error) { params := []interface{}{ @@ -3481,63 +1731,12 @@ func (r Hardware_Component_Locator) GetPackageItemsAvailability(packageId *int) return } -func (r Hardware_Component_Locator) GetPackageItemsAvailabilityIter(packageId *int) (resp []datatypes.Hardware_Component_Locator_Result, err error) { - params := []interface{}{ - packageId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getPackageItemsAvailability", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Locator_Result{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getPackageItemsAvailability", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_Component_Locator) GetServerPackageAvailability() (resp []datatypes.Hardware_Component_Locator_Result, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getServerPackageAvailability", nil, &r.Options, &resp) return } -func (r Hardware_Component_Locator) GetServerPackageAvailabilityIter() (resp []datatypes.Hardware_Component_Locator_Result, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getServerPackageAvailability", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Locator_Result{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Locator", "getServerPackageAvailability", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Hardware_Component_Model data type contains general information relating to a single SoftLayer component model. A component model represents a vendor specific representation of a hardware component. Every piece of hardware on a server will have a specific hardware component model. type Hardware_Component_Model struct { Session session.SLSession @@ -3590,120 +1789,24 @@ func (r Hardware_Component_Model) GetAttributes() (resp []datatypes.Hardware_Com return } -func (r Hardware_Component_Model) GetAttributesIter() (resp []datatypes.Hardware_Component_Model_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Component_Model) GetCompatibleArrayTypes() (resp []datatypes.Configuration_Storage_Group_Array_Type, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleArrayTypes", nil, &r.Options, &resp) return } -func (r Hardware_Component_Model) GetCompatibleArrayTypesIter() (resp []datatypes.Configuration_Storage_Group_Array_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleArrayTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group_Array_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleArrayTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All the component models that are compatible with a hardware component model. func (r Hardware_Component_Model) GetCompatibleChildComponentModels() (resp []datatypes.Hardware_Component_Model, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleChildComponentModels", nil, &r.Options, &resp) return } -func (r Hardware_Component_Model) GetCompatibleChildComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleChildComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleChildComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All the component models that a hardware component model is compatible with. func (r Hardware_Component_Model) GetCompatibleParentComponentModels() (resp []datatypes.Hardware_Component_Model, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleParentComponentModels", nil, &r.Options, &resp) return } -func (r Hardware_Component_Model) GetCompatibleParentComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleParentComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getCompatibleParentComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Component_Model) GetFirmwareQuantity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getFirmwareQuantity", nil, &r.Options, &resp) @@ -3716,60 +1819,12 @@ func (r Hardware_Component_Model) GetFirmwares() (resp []datatypes.Hardware_Comp return } -func (r Hardware_Component_Model) GetFirmwaresIter() (resp []datatypes.Hardware_Component_Firmware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getFirmwares", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Firmware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getFirmwares", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware component model's physical components in inventory. func (r Hardware_Component_Model) GetHardwareComponents() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getHardwareComponents", nil, &r.Options, &resp) return } -func (r Hardware_Component_Model) GetHardwareComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getHardwareComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getHardwareComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The non-vendor specific generic component model for a hardware component model. func (r Hardware_Component_Model) GetHardwareGenericComponentModel() (resp datatypes.Hardware_Component_Model_Generic, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getHardwareGenericComponentModel", nil, &r.Options, &resp) @@ -3806,30 +1861,6 @@ func (r Hardware_Component_Model) GetQualifiedFirmwares() (resp []datatypes.Hard return } -func (r Hardware_Component_Model) GetQualifiedFirmwaresIter() (resp []datatypes.Hardware_Component_Firmware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getQualifiedFirmwares", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Firmware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getQualifiedFirmwares", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A motherboard's average reboot time. func (r Hardware_Component_Model) GetRebootTime() (resp datatypes.Hardware_Component_Motherboard_Reboot_Time, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getRebootTime", nil, &r.Options, &resp) @@ -3848,30 +1879,6 @@ func (r Hardware_Component_Model) GetValidAttributeTypes() (resp []datatypes.Har return } -func (r Hardware_Component_Model) GetValidAttributeTypesIter() (resp []datatypes.Hardware_Component_Model_Attribute_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getValidAttributeTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model_Attribute_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Model", "getValidAttributeTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Hardware_Component_Partition_OperatingSystem data type contains general information relating to a single SoftLayer Operating System Partition Template. type Hardware_Component_Partition_OperatingSystem struct { Session session.SLSession @@ -3918,30 +1925,6 @@ func (r Hardware_Component_Partition_OperatingSystem) GetAllObjects() (resp []da return } -func (r Hardware_Component_Partition_OperatingSystem) GetAllObjectsIter() (resp []datatypes.Hardware_Component_Partition_OperatingSystem, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_OperatingSystem", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Partition_OperatingSystem{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_OperatingSystem", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getByDescription”' method retrieves all possible partition templates based on the description (required parameter) entered when calling the method. The description is typically the operating system's name. Current recognized values include 'linux', 'windows', 'freebsd', and 'Debian'. func (r Hardware_Component_Partition_OperatingSystem) GetByDescription(description *string) (resp datatypes.Hardware_Component_Partition_OperatingSystem, err error) { params := []interface{}{ @@ -3963,30 +1946,6 @@ func (r Hardware_Component_Partition_OperatingSystem) GetPartitionTemplates() (r return } -func (r Hardware_Component_Partition_OperatingSystem) GetPartitionTemplatesIter() (resp []datatypes.Hardware_Component_Partition_Template, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_OperatingSystem", "getPartitionTemplates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Partition_Template{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_OperatingSystem", "getPartitionTemplates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Hardware_Component_Partition_Template data type contains general information relating to a single SoftLayer partition template. Partition templates group 1 or more partition configurations that can be used to predefine how a hard drive's partitions will be configured. type Hardware_Component_Partition_Template struct { Session session.SLSession @@ -4039,30 +1998,6 @@ func (r Hardware_Component_Partition_Template) GetData() (resp []datatypes.Hardw return } -func (r Hardware_Component_Partition_Template) GetDataIter() (resp []datatypes.Hardware_Component_Partition_Template_Partition, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Partition_Template_Partition{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Component_Partition_Template) GetExpireDate() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getExpireDate", nil, &r.Options, &resp) @@ -4087,30 +2022,6 @@ func (r Hardware_Component_Partition_Template) GetPartitionTemplatePartition() ( return } -func (r Hardware_Component_Partition_Template) GetPartitionTemplatePartitionIter() (resp []datatypes.Hardware_Component_Partition_Template_Partition, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getPartitionTemplatePartition", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Partition_Template_Partition{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Component_Partition_Template", "getPartitionTemplatePartition", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Hardware_Router data type contains general information relating to a single SoftLayer router. type Hardware_Router struct { Session session.SLSession @@ -4535,90 +2446,18 @@ func (r Hardware_Router) GetActiveComponents() (resp []datatypes.Hardware_Compon return } -func (r Hardware_Router) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's active network monitoring incidents. func (r Hardware_Router) GetActiveNetworkMonitorIncident() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Router) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllPowerComponents", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware_Router) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedHost", nil, &r.Options, &resp) @@ -4631,60 +2470,12 @@ func (r Hardware_Router) GetAllowedNetworkStorage() (resp []datatypes.Network_St return } -func (r Hardware_Router) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware_Router) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware_Router) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -4700,93 +2491,18 @@ func (r Hardware_Router) GetAttachedNetworkStorages(nasType *string) (resp []dat return } -func (r Hardware_Router) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttachedNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttachedNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware_Router) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttributes", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware_Router) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware_Router) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -4796,33 +2512,6 @@ func (r Hardware_Router) GetAvailableNetworkStorages(nasType *string) (resp []da return } -func (r Hardware_Router) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAvailableNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The average daily public bandwidth usage for the current billing cycle. func (r Hardware_Router) GetAverageDailyPublicBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getAverageDailyPublicBandwidthUsage", nil, &r.Options, &resp) @@ -4845,30 +2534,6 @@ func (r Hardware_Router) GetBackendNetworkComponents() (resp []datatypes.Network return } -func (r Hardware_Router) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Router) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -4885,30 +2550,6 @@ func (r Hardware_Router) GetBackendRouters() (resp []datatypes.Hardware, err err return } -func (r Hardware_Router) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBackendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBackendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware_Router) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -4927,30 +2568,6 @@ func (r Hardware_Router) GetBenchmarkCertifications() (resp []datatypes.Hardware return } -func (r Hardware_Router) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBenchmarkCertifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Benchmark_Certification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBenchmarkCertifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the billing item for a server. func (r Hardware_Router) GetBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBillingItem", nil, &r.Options, &resp) @@ -4975,30 +2592,6 @@ func (r Hardware_Router) GetBoundSubnets() (resp []datatypes.Network_Subnet, err return } -func (r Hardware_Router) GetBoundSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBoundSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBoundSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Status indicating whether or not a piece of hardware has business continuance insurance. func (r Hardware_Router) GetBusinessContinuanceInsuranceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getBusinessContinuanceInsuranceFlag", nil, &r.Options, &resp) @@ -5011,30 +2604,6 @@ func (r Hardware_Router) GetChildrenHardware() (resp []datatypes.Hardware, err e return } -func (r Hardware_Router) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getChildrenHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getChildrenHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_Router) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -5047,30 +2616,6 @@ func (r Hardware_Router) GetComponents() (resp []datatypes.Hardware_Component, e return } -func (r Hardware_Router) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A continuous data protection/server backup software component object. func (r Hardware_Router) GetContinuousDataProtectionSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getContinuousDataProtectionSoftwareComponent", nil, &r.Options, &resp) @@ -5097,30 +2642,6 @@ func (r Hardware_Router) GetCurrentBillingDetail() (resp []datatypes.Billing_Ite return } -func (r Hardware_Router) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getCurrentBillingDetail", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getCurrentBillingDetail", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware_Router) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -5161,330 +2682,66 @@ func (r Hardware_Router) GetDownlinkHardware() (resp []datatypes.Hardware, err e return } -func (r Hardware_Router) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware_Router) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware_Router) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkServers", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_Router) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownlinkVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware downstream from a network device. func (r Hardware_Router) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamHardwareBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Uplink_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamHardwareBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware_Router) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware_Router) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware_Router) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamServers", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_Router) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDownstreamVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware_Router) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDriveControllers", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDriveControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getDriveControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware_Router) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getEvaultNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getEvaultNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware_Router) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -5513,30 +2770,6 @@ func (r Hardware_Router) GetFrontendNetworkComponents() (resp []datatypes.Networ return } -func (r Hardware_Router) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFrontendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFrontendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Router) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -5553,30 +2786,6 @@ func (r Hardware_Router) GetFrontendRouters() (resp []datatypes.Hardware, err er return } -func (r Hardware_Router) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFrontendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFrontendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the future billing item for a server. func (r Hardware_Router) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getFutureBillingItem", nil, &r.Options, &resp) @@ -5595,30 +2804,6 @@ func (r Hardware_Router) GetHardDrives() (resp []datatypes.Hardware_Component, e return } -func (r Hardware_Router) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHardDrives", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHardDrives", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The chassis that a piece of hardware is housed in. func (r Hardware_Router) GetHardwareChassis() (resp datatypes.Hardware_Chassis, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHardwareChassis", nil, &r.Options, &resp) @@ -5677,34 +2862,6 @@ func (r Hardware_Router) GetHourlyBandwidth(mode *string, day *datatypes.Time) ( return } -func (r Hardware_Router) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - mode, - day, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHourlyBandwidth", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHourlyBandwidth", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A server's hourly billing status. func (r Hardware_Router) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -5777,30 +2934,6 @@ func (r Hardware_Router) GetMemory() (resp []datatypes.Hardware_Component, err e return } -func (r Hardware_Router) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getMemory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getMemory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware_Router) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getMemoryCapacity", nil, &r.Options, &resp) @@ -5819,30 +2952,6 @@ func (r Hardware_Router) GetModules() (resp []datatypes.Hardware_Component, err return } -func (r Hardware_Router) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getModules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getModules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Router) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getMonitoringRobot", nil, &r.Options, &resp) @@ -5873,60 +2982,12 @@ func (r Hardware_Router) GetNetworkCards() (resp []datatypes.Hardware_Component, return } -func (r Hardware_Router) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkCards", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkCards", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Returns a hardware's network components. func (r Hardware_Router) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware_Router) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -5951,120 +3012,24 @@ func (r Hardware_Router) GetNetworkMonitorAttachedDownHardware() (resp []datatyp return } -func (r Hardware_Router) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware_Router) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware_Router) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitorIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware_Router) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitors", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkMonitors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware_Router) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkStatus", nil, &r.Options, &resp) @@ -6083,60 +3048,12 @@ func (r Hardware_Router) GetNetworkStorage() (resp []datatypes.Network_Storage, return } -func (r Hardware_Router) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware_Router) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkVlans", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware_Router) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -6149,30 +3066,6 @@ func (r Hardware_Router) GetNotesHistory() (resp []datatypes.Hardware_Note, err return } -func (r Hardware_Router) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNotesHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Note{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNotesHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware_Router) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNvRamCapacity", nil, &r.Options, &resp) @@ -6185,30 +3078,6 @@ func (r Hardware_Router) GetNvRamComponentModels() (resp []datatypes.Hardware_Co return } -func (r Hardware_Router) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNvRamComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getNvRamComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_Router) GetObject() (resp datatypes.Hardware_Router, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getObject", nil, &r.Options, &resp) @@ -6263,60 +3132,12 @@ func (r Hardware_Router) GetPowerComponents() (resp []datatypes.Hardware_Power_C return } -func (r Hardware_Router) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware_Router) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerSupply", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerSupply", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPowerSupply", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware's primary private IP address. func (r Hardware_Router) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -6351,34 +3172,6 @@ func (r Hardware_Router) GetPrivateBandwidthData(startTime *int, endTime *int) ( return } -func (r Hardware_Router) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPrivateBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPrivateBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether the hardware only has access to the private network. func (r Hardware_Router) GetPrivateNetworkOnlyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPrivateNetworkOnlyFlag", nil, &r.Options, &resp) @@ -6403,30 +3196,6 @@ func (r Hardware_Router) GetProcessors() (resp []datatypes.Hardware_Component, e return } -func (r Hardware_Router) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getProcessors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getProcessors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a graph of a server's public network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPublicBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware_Router) GetPublicBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -6437,34 +3206,6 @@ func (r Hardware_Router) GetPublicBandwidthData(startTime *int, endTime *int) (r return } -func (r Hardware_Router) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPublicBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getPublicBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Router) GetRack() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRack", nil, &r.Options, &resp) @@ -6477,90 +3218,18 @@ func (r Hardware_Router) GetRaidControllers() (resp []datatypes.Hardware_Compone return } -func (r Hardware_Router) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRaidControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRaidControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Recent events that impact this hardware. func (r Hardware_Router) GetRecentEvents() (resp []datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRecentEvents", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRecentEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRecentEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve User credentials to issue commands and/or interact with the server's remote management card. func (r Hardware_Router) GetRemoteManagementAccounts() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRemoteManagementAccounts", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRemoteManagementAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRemoteManagementAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware_Router) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -6573,150 +3242,30 @@ func (r Hardware_Router) GetResourceConfigurations() (resp []datatypes.Hardware_ return } -func (r Hardware_Router) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceConfigurations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Resource_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceConfigurations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Router) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupMemberReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupMemberReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Router) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupRoles", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroupRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The resource groups in which this hardware is a member. func (r Hardware_Router) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroups", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getResourceGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's routers. func (r Hardware_Router) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRouters", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating that a VLAN on the router can be assigned to a host that has SAN disk functionality. func (r Hardware_Router) GetSanStorageCapabilityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSanStorageCapabilityFlag", nil, &r.Options, &resp) @@ -6729,60 +3278,12 @@ func (r Hardware_Router) GetSecurityScanRequests() (resp []datatypes.Network_Sec return } -func (r Hardware_Router) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSecurityScanRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Security_Scanner_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSecurityScanRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getSensorData”' method retrieves a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures various information, including system temperatures, voltages and other local server settings. Sensor data is cached for 30 second; calls made to this method for the same server within 30 seconds of each other will result in the same data being returned. To ensure that the data retrieved retrieves snapshot of varied data, make calls greater than 30 seconds apart. func (r Hardware_Router) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorData", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_SensorReading{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getSensorDataWithGraphs”' method retrieves the raw data returned from the server's remote management card. Along with raw data, graphs for the CPU and system temperatures and fan speeds are also returned. For more details on what information is returned, refer to the ”getSensorData” method. func (r Hardware_Router) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -6795,30 +3296,6 @@ func (r Hardware_Router) GetServerFanSpeedGraphs() (resp []datatypes.Container_R return } -func (r Hardware_Router) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerFanSpeedGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerFanSpeedGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getPowerState”' method retrieves the power state for the selected server. The server's power status is retrieved from its remote management card. This method returns "on", for a server that has been powered on, or "off" for servers powered off. func (r Hardware_Router) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerPowerState", nil, &r.Options, &resp) @@ -6837,30 +3314,6 @@ func (r Hardware_Router) GetServerTemperatureGraphs() (resp []datatypes.Containe return } -func (r Hardware_Router) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerTemperatureGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerTemperatureGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware_Router) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServiceProvider", nil, &r.Options, &resp) @@ -6873,30 +3326,6 @@ func (r Hardware_Router) GetSoftwareComponents() (resp []datatypes.Software_Comp return } -func (r Hardware_Router) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSoftwareComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSoftwareComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the billing item for a spare pool server. func (r Hardware_Router) GetSparePoolBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSparePoolBillingItem", nil, &r.Options, &resp) @@ -6909,120 +3338,24 @@ func (r Hardware_Router) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err er return } -func (r Hardware_Router) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Router) GetStorageGroups() (resp []datatypes.Configuration_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageGroups", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware_Router) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getStorageNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Router) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTagReferences", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Router) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTopLevelLocation", nil, &r.Options, &resp) @@ -7035,60 +3368,12 @@ func (r Hardware_Router) GetTransactionHistory() (resp []datatypes.Provisioning_ return } -func (r Hardware_Router) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTransactionHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTransactionHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a list of upgradeable items available to this piece of hardware. Currently, getUpgradeItemPrices retrieves upgrades available for a server's memory, hard drives, network port speed, bandwidth allocation and GPUs. func (r Hardware_Router) GetUpgradeItemPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeItemPrices", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated upgrade request object, if any. func (r Hardware_Router) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeRequest", nil, &r.Options, &resp) @@ -7101,30 +3386,6 @@ func (r Hardware_Router) GetUpgradeableActiveComponents() (resp []datatypes.Hard return } -func (r Hardware_Router) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeableActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUpgradeableActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network device connected to a piece of hardware. func (r Hardware_Router) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUplinkHardware", nil, &r.Options, &resp) @@ -7137,60 +3398,12 @@ func (r Hardware_Router) GetUplinkNetworkComponents() (resp []datatypes.Network_ return } -func (r Hardware_Router) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUplinkNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUplinkNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware_Router) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUserData", nil, &r.Options, &resp) return } -func (r Hardware_Router) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUserData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getUserData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware_Router) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualChassis", nil, &r.Options, &resp) @@ -7203,30 +3416,6 @@ func (r Hardware_Router) GetVirtualChassisSiblings() (resp []datatypes.Hardware, return } -func (r Hardware_Router) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualChassisSiblings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualChassisSiblings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's virtual host record. func (r Hardware_Router) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualHost", nil, &r.Options, &resp) @@ -7239,30 +3428,6 @@ func (r Hardware_Router) GetVirtualLicenses() (resp []datatypes.Software_Virtual return } -func (r Hardware_Router) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_VirtualLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware_Router) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualRack", nil, &r.Options, &resp) @@ -7915,30 +4080,6 @@ func (r Hardware_SecurityModule) GetActiveComponents() (resp []datatypes.Hardwar return } -func (r Hardware_SecurityModule) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item for a server's attached network firewall. func (r Hardware_SecurityModule) GetActiveNetworkFirewallBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveNetworkFirewallBillingItem", nil, &r.Options, &resp) @@ -7951,60 +4092,12 @@ func (r Hardware_SecurityModule) GetActiveNetworkMonitorIncident() (resp []datat return } -func (r Hardware_SecurityModule) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetActiveTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTickets", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Transaction currently running for server. func (r Hardware_SecurityModule) GetActiveTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTransaction", nil, &r.Options, &resp) @@ -8017,60 +4110,12 @@ func (r Hardware_SecurityModule) GetActiveTransactions() (resp []datatypes.Provi return } -func (r Hardware_SecurityModule) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getActiveTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllPowerComponents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware_SecurityModule) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedHost", nil, &r.Options, &resp) @@ -8083,60 +4128,12 @@ func (r Hardware_SecurityModule) GetAllowedNetworkStorage() (resp []datatypes.Ne return } -func (r Hardware_SecurityModule) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware_SecurityModule) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware_SecurityModule) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -8152,123 +4149,24 @@ func (r Hardware_SecurityModule) GetAttachedNetworkStorages(nasType *string) (re return } -func (r Hardware_SecurityModule) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttachedNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttachedNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware_SecurityModule) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttributes", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware_SecurityModule) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An object that stores the maximum level for the monitoring query types and response types. func (r Hardware_SecurityModule) GetAvailableMonitoring() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableMonitoring", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetAvailableMonitoringIter() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableMonitoring", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host_Stratum{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableMonitoring", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware_SecurityModule) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -8278,33 +4176,6 @@ func (r Hardware_SecurityModule) GetAvailableNetworkStorages(nasType *string) (r return } -func (r Hardware_SecurityModule) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAvailableNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The average daily total bandwidth usage for the current billing cycle. func (r Hardware_SecurityModule) GetAverageDailyBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getAverageDailyBandwidthUsage", nil, &r.Options, &resp) @@ -8335,34 +4206,6 @@ func (r Hardware_SecurityModule) GetBackendBandwidthUsage(startDate *datatypes.T return } -func (r Hardware_SecurityModule) GetBackendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendBandwidthUsage", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendBandwidthUsage", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -8379,30 +4222,6 @@ func (r Hardware_SecurityModule) GetBackendNetworkComponents() (resp []datatypes return } -func (r Hardware_SecurityModule) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -8419,30 +4238,6 @@ func (r Hardware_SecurityModule) GetBackendRouters() (resp []datatypes.Hardware, return } -func (r Hardware_SecurityModule) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBackendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware_SecurityModule) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -8465,34 +4260,6 @@ func (r Hardware_SecurityModule) GetBandwidthForDateRange(startDate *datatypes.T return } -func (r Hardware_SecurityModule) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBandwidthForDateRange", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBandwidthForDateRange", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method when needing a bandwidth image for a single server. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. Use the $draw flag to suppress the generation of the actual binary PNG image. func (r Hardware_SecurityModule) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -8512,60 +4279,12 @@ func (r Hardware_SecurityModule) GetBenchmarkCertifications() (resp []datatypes. return } -func (r Hardware_SecurityModule) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBenchmarkCertifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Benchmark_Certification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBenchmarkCertifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The raw bandwidth usage data for the current billing cycle. One object will be returned for each network this server is attached to. func (r Hardware_SecurityModule) GetBillingCycleBandwidthUsage() (resp []datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Usage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Hardware_SecurityModule) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -8608,30 +4327,6 @@ func (r Hardware_SecurityModule) GetBootModeOptions() (resp []string, err error) return } -func (r Hardware_SecurityModule) GetBootModeOptionsIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBootModeOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBootModeOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Status indicating whether or not a piece of hardware has business continuance insurance. func (r Hardware_SecurityModule) GetBusinessContinuanceInsuranceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getBusinessContinuanceInsuranceFlag", nil, &r.Options, &resp) @@ -8650,30 +4345,6 @@ func (r Hardware_SecurityModule) GetChildrenHardware() (resp []datatypes.Hardwar return } -func (r Hardware_SecurityModule) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getChildrenHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getChildrenHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_SecurityModule) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -8686,30 +4357,6 @@ func (r Hardware_SecurityModule) GetComponents() (resp []datatypes.Hardware_Comp return } -func (r Hardware_SecurityModule) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetContainsSolidStateDrivesFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getContainsSolidStateDrivesFlag", nil, &r.Options, &resp) @@ -8766,30 +4413,6 @@ func (r Hardware_SecurityModule) GetCurrentBillingDetail() (resp []datatypes.Bil return } -func (r Hardware_SecurityModule) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getCurrentBillingDetail", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getCurrentBillingDetail", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware_SecurityModule) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -8842,360 +4465,72 @@ func (r Hardware_SecurityModule) GetDownlinkHardware() (resp []datatypes.Hardwar return } -func (r Hardware_SecurityModule) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware_SecurityModule) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware_SecurityModule) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkServers", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_SecurityModule) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownlinkVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware downstream from a network device. func (r Hardware_SecurityModule) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamHardwareBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Uplink_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamHardwareBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware_SecurityModule) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware_SecurityModule) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware_SecurityModule) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamServers", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_SecurityModule) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDownstreamVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware_SecurityModule) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDriveControllers", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDriveControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getDriveControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware_SecurityModule) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getEvaultNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getEvaultNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the subnets associated with this server that are protectable by a network component firewall. func (r Hardware_SecurityModule) GetFirewallProtectableSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFirewallProtectableSubnets", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFirewallProtectableSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFirewallProtectableSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware_SecurityModule) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -9220,34 +4555,6 @@ func (r Hardware_SecurityModule) GetFrontendBandwidthUsage(startDate *datatypes. return } -func (r Hardware_SecurityModule) GetFrontendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendBandwidthUsage", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendBandwidthUsage", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -9264,30 +4571,6 @@ func (r Hardware_SecurityModule) GetFrontendNetworkComponents() (resp []datatype return } -func (r Hardware_SecurityModule) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -9304,30 +4587,6 @@ func (r Hardware_SecurityModule) GetFrontendRouters() (resp []datatypes.Hardware return } -func (r Hardware_SecurityModule) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFrontendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the future billing item for a server. func (r Hardware_SecurityModule) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getFutureBillingItem", nil, &r.Options, &resp) @@ -9346,30 +4605,6 @@ func (r Hardware_SecurityModule) GetHardDrives() (resp []datatypes.Hardware_Comp return } -func (r Hardware_SecurityModule) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHardDrives", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHardDrives", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a server by searching for the primary IP address. func (r Hardware_SecurityModule) GetHardwareByIpAddress(ipAddress *string) (resp datatypes.Hardware_Server, err error) { params := []interface{}{ @@ -9443,34 +4678,6 @@ func (r Hardware_SecurityModule) GetHourlyBandwidth(mode *string, day *datatypes return } -func (r Hardware_SecurityModule) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - mode, - day, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHourlyBandwidth", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHourlyBandwidth", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A server's hourly billing status. func (r Hardware_SecurityModule) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -9536,35 +4743,6 @@ func (r Hardware_SecurityModule) GetItemPricesFromSoftwareDescriptions(softwareD return } -func (r Hardware_SecurityModule) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item, err error) { - params := []interface{}{ - softwareDescriptions, - includeTranslationsFlag, - returnAllPricesFlag, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The last transaction that a server's operating system was loaded. func (r Hardware_SecurityModule) GetLastOperatingSystemReload() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getLastOperatingSystemReload", nil, &r.Options, &resp) @@ -9607,30 +4785,6 @@ func (r Hardware_SecurityModule) GetLogicalVolumeStorageGroups() (resp []datatyp return } -func (r Hardware_SecurityModule) GetLogicalVolumeStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getLogicalVolumeStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getLogicalVolumeStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating that the hardware is a managed resource. func (r Hardware_SecurityModule) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -9649,30 +4803,6 @@ func (r Hardware_SecurityModule) GetMemory() (resp []datatypes.Hardware_Componen return } -func (r Hardware_SecurityModule) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMemory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMemory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware_SecurityModule) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMemoryCapacity", nil, &r.Options, &resp) @@ -9697,30 +4827,6 @@ func (r Hardware_SecurityModule) GetModules() (resp []datatypes.Hardware_Compone return } -func (r Hardware_SecurityModule) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getModules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getModules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMonitoringRobot", nil, &r.Options, &resp) @@ -9745,30 +4851,6 @@ func (r Hardware_SecurityModule) GetMonitoringUserNotification() (resp []datatyp return } -func (r Hardware_SecurityModule) GetMonitoringUserNotificationIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMonitoringUserNotification", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMonitoringUserNotification", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's motherboard. func (r Hardware_SecurityModule) GetMotherboard() (resp datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getMotherboard", nil, &r.Options, &resp) @@ -9781,90 +4863,18 @@ func (r Hardware_SecurityModule) GetNetworkCards() (resp []datatypes.Hardware_Co return } -func (r Hardware_SecurityModule) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkCards", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkCards", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the IP addresses associated with this server that are protectable by a network component firewall. Note, this may not return all values for IPv6 subnets for this server. Please use getFirewallProtectableSubnets to get all protectable subnets. func (r Hardware_SecurityModule) GetNetworkComponentFirewallProtectableIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetNetworkComponentFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponentFirewallProtectableIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Returns a hardware's network components. func (r Hardware_SecurityModule) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware_SecurityModule) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -9889,120 +4899,24 @@ func (r Hardware_SecurityModule) GetNetworkMonitorAttachedDownHardware() (resp [ return } -func (r Hardware_SecurityModule) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware_SecurityModule) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware_SecurityModule) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitorIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware_SecurityModule) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitors", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkMonitors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware_SecurityModule) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkStatus", nil, &r.Options, &resp) @@ -10021,60 +4935,12 @@ func (r Hardware_SecurityModule) GetNetworkStorage() (resp []datatypes.Network_S return } -func (r Hardware_SecurityModule) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware_SecurityModule) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkVlans", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware_SecurityModule) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -10087,30 +4953,6 @@ func (r Hardware_SecurityModule) GetNotesHistory() (resp []datatypes.Hardware_No return } -func (r Hardware_SecurityModule) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNotesHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Note{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNotesHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware_SecurityModule) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNvRamCapacity", nil, &r.Options, &resp) @@ -10123,30 +4965,6 @@ func (r Hardware_SecurityModule) GetNvRamComponentModels() (resp []datatypes.Har return } -func (r Hardware_SecurityModule) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNvRamComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getNvRamComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_SecurityModule) GetObject() (resp datatypes.Hardware_SecurityModule, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getObject", nil, &r.Options, &resp) @@ -10201,30 +5019,6 @@ func (r Hardware_SecurityModule) GetPMInfo() (resp []datatypes.Container_RemoteM return } -func (r Hardware_SecurityModule) GetPMInfoIter() (resp []datatypes.Container_RemoteManagement_PmInfo, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPMInfo", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_PmInfo{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPMInfo", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Blade Bay func (r Hardware_SecurityModule) GetParentBay() (resp datatypes.Hardware_Blade, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getParentBay", nil, &r.Options, &resp) @@ -10243,30 +5037,6 @@ func (r Hardware_SecurityModule) GetPartitions() (resp []datatypes.Hardware_Serv return } -func (r Hardware_SecurityModule) GetPartitionsIter() (resp []datatypes.Hardware_Server_Partition, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPartitions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Server_Partition{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPartitions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the Point of Presence (PoP) location in which a piece of hardware resides. func (r Hardware_SecurityModule) GetPointOfPresenceLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPointOfPresenceLocation", nil, &r.Options, &resp) @@ -10279,60 +5049,12 @@ func (r Hardware_SecurityModule) GetPowerComponents() (resp []datatypes.Hardware return } -func (r Hardware_SecurityModule) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware_SecurityModule) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerSupply", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerSupply", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPowerSupply", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware's primary private IP address. func (r Hardware_SecurityModule) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -10369,30 +5091,6 @@ func (r Hardware_SecurityModule) GetPrivateBackendNetworkComponents() (resp []da return } -func (r Hardware_SecurityModule) GetPrivateBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a graph of a server's private network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPrivateBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware_SecurityModule) GetPrivateBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -10403,34 +5101,6 @@ func (r Hardware_SecurityModule) GetPrivateBandwidthData(startTime *int, endTime return } -func (r Hardware_SecurityModule) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a brief summary of a server's private network bandwidth usage. getPrivateBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_SecurityModule) GetPrivateBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPrivateBandwidthDataSummary", nil, &r.Options, &resp) @@ -10500,30 +5170,6 @@ func (r Hardware_SecurityModule) GetProcessors() (resp []datatypes.Hardware_Comp return } -func (r Hardware_SecurityModule) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getProcessors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getProcessors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether the bandwidth usage for this hardware for the current billing cycle is projected to exceed the allocation. func (r Hardware_SecurityModule) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) @@ -10552,34 +5198,6 @@ func (r Hardware_SecurityModule) GetPublicBandwidthData(startTime *int, endTime return } -func (r Hardware_SecurityModule) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPublicBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPublicBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a brief summary of a server's public network bandwidth usage. getPublicBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_SecurityModule) GetPublicBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getPublicBandwidthDataSummary", nil, &r.Options, &resp) @@ -10639,30 +5257,6 @@ func (r Hardware_SecurityModule) GetRaidControllers() (resp []datatypes.Hardware return } -func (r Hardware_SecurityModule) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRaidControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRaidControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determine if hardware object is vSan Ready Node. func (r Hardware_SecurityModule) GetReadyNodeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getReadyNodeFlag", nil, &r.Options, &resp) @@ -10675,60 +5269,12 @@ func (r Hardware_SecurityModule) GetRecentEvents() (resp []datatypes.Notificatio return } -func (r Hardware_SecurityModule) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The last five commands issued to the server's remote management card. func (r Hardware_SecurityModule) GetRecentRemoteManagementCommands() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetRecentRemoteManagementCommandsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRecentRemoteManagementCommands", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRegionalInternetRegistry", nil, &r.Options, &resp) @@ -10747,30 +5293,6 @@ func (r Hardware_SecurityModule) GetRemoteManagementAccounts() (resp []datatypes return } -func (r Hardware_SecurityModule) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware_SecurityModule) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -10783,270 +5305,54 @@ func (r Hardware_SecurityModule) GetRemoteManagementUsers() (resp []datatypes.Ha return } -func (r Hardware_SecurityModule) GetRemoteManagementUsersIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRemoteManagementUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetResourceConfigurations() (resp []datatypes.Hardware_Resource_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceConfigurations", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceConfigurations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Resource_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceConfigurations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupMemberReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupMemberReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupRoles", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroupRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The resource groups in which this hardware is a member. func (r Hardware_SecurityModule) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroups", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getResourceGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the reverse domain records associated with this server. func (r Hardware_SecurityModule) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getReverseDomainRecords", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getReverseDomainRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getReverseDomainRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's routers. func (r Hardware_SecurityModule) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRouters", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's vulnerability scan requests. func (r Hardware_SecurityModule) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSecurityScanRequests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSecurityScanRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Security_Scanner_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSecurityScanRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures system temperatures, voltages, and other local server settings. Sensor data is cached for 30 seconds. Calls made to getSensorData for the same server within 30 seconds of each other will return the same data. Subsequent calls will return new data once the cache expires. func (r Hardware_SecurityModule) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSensorData", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSensorData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_SensorReading{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSensorData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the raw data returned from the server's remote management card. For more details of what is returned please refer to the getSensorData method. Along with the raw data, graphs for the cpu and system temperatures and fan speeds are also returned. func (r Hardware_SecurityModule) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -11065,30 +5371,6 @@ func (r Hardware_SecurityModule) GetServerFanSpeedGraphs() (resp []datatypes.Con return } -func (r Hardware_SecurityModule) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerFanSpeedGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerFanSpeedGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the power state for the server. The server's power status is retrieved from its remote management card. This will return 'on' or 'off'. func (r Hardware_SecurityModule) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerPowerState", nil, &r.Options, &resp) @@ -11107,30 +5389,6 @@ func (r Hardware_SecurityModule) GetServerTemperatureGraphs() (resp []datatypes. return } -func (r Hardware_SecurityModule) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerTemperatureGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServerTemperatureGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware_SecurityModule) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getServiceProvider", nil, &r.Options, &resp) @@ -11143,30 +5401,6 @@ func (r Hardware_SecurityModule) GetSoftwareComponents() (resp []datatypes.Softw return } -func (r Hardware_SecurityModule) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSoftwareComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSoftwareComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determine if hardware object has Software Guard Extension (SGX) enabled. func (r Hardware_SecurityModule) GetSoftwareGuardExtensionEnabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSoftwareGuardExtensionEnabled", nil, &r.Options, &resp) @@ -11185,30 +5419,6 @@ func (r Hardware_SecurityModule) GetSshKeys() (resp []datatypes.Security_Ssh_Key return } -func (r Hardware_SecurityModule) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A server's remote management card used for statistics. func (r Hardware_SecurityModule) GetStatisticsRemoteManagement() (resp datatypes.Hardware_Component_RemoteManagement, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStatisticsRemoteManagement", nil, &r.Options, &resp) @@ -11221,90 +5431,18 @@ func (r Hardware_SecurityModule) GetStorageGroups() (resp []datatypes.Configurat return } -func (r Hardware_SecurityModule) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware_SecurityModule) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getStorageNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTagReferences", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTopLevelLocation", nil, &r.Options, &resp) @@ -11317,30 +5455,6 @@ func (r Hardware_SecurityModule) GetTransactionHistory() (resp []datatypes.Provi return } -func (r Hardware_SecurityModule) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTransactionHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTransactionHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether to use UEFI boot instead of BIOS. func (r Hardware_SecurityModule) GetUefiBootFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUefiBootFlag", nil, &r.Options, &resp) @@ -11353,30 +5467,6 @@ func (r Hardware_SecurityModule) GetUpgradeItemPrices() (resp []datatypes.Produc return } -func (r Hardware_SecurityModule) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated upgrade request object, if any. func (r Hardware_SecurityModule) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeRequest", nil, &r.Options, &resp) @@ -11389,30 +5479,6 @@ func (r Hardware_SecurityModule) GetUpgradeableActiveComponents() (resp []dataty return } -func (r Hardware_SecurityModule) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeableActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUpgradeableActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network device connected to a piece of hardware. func (r Hardware_SecurityModule) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUplinkHardware", nil, &r.Options, &resp) @@ -11425,90 +5491,18 @@ func (r Hardware_SecurityModule) GetUplinkNetworkComponents() (resp []datatypes. return } -func (r Hardware_SecurityModule) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUplinkNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUplinkNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware_SecurityModule) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUserData", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUserData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUserData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A list of users that have access to this computing instance. func (r Hardware_SecurityModule) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUsers", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return the list of block device template groups that are valid to the host. For instance, it will only retrieve FLEX images. func (r Hardware_SecurityModule) GetValidBlockDeviceTemplateGroups(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { params := []interface{}{ @@ -11518,33 +5512,6 @@ func (r Hardware_SecurityModule) GetValidBlockDeviceTemplateGroups(visibility *s return } -func (r Hardware_SecurityModule) GetValidBlockDeviceTemplateGroupsIter(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - params := []interface{}{ - visibility, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getValidBlockDeviceTemplateGroups", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware_SecurityModule) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualChassis", nil, &r.Options, &resp) @@ -11557,60 +5524,12 @@ func (r Hardware_SecurityModule) GetVirtualChassisSiblings() (resp []datatypes.H return } -func (r Hardware_SecurityModule) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualChassisSiblings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualChassisSiblings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [DEPRECATED] A hardware server's virtual servers. func (r Hardware_SecurityModule) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's virtual host record. func (r Hardware_SecurityModule) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualHost", nil, &r.Options, &resp) @@ -11623,30 +5542,6 @@ func (r Hardware_SecurityModule) GetVirtualLicenses() (resp []datatypes.Software return } -func (r Hardware_SecurityModule) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_VirtualLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware_SecurityModule) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getVirtualRack", nil, &r.Options, &resp) @@ -11677,60 +5572,12 @@ func (r Hardware_SecurityModule) GetWindowsUpdateAvailableUpdates() (resp []data return } -func (r Hardware_SecurityModule) GetWindowsUpdateAvailableUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateAvailableUpdates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateAvailableUpdates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a list of Windows updates installed on a server as reported by the local SoftLayer Windows Server Update Services (WSUS) server. Windows servers provisioned by SoftLayer are configured to use the local WSUS server via the private network by default. func (r Hardware_SecurityModule) GetWindowsUpdateInstalledUpdates() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule) GetWindowsUpdateInstalledUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateInstalledUpdates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns an update status record for this server. That record will specify if the server is missing updates, or has updates that must be reinstalled or require a reboot to go into affect. func (r Hardware_SecurityModule) GetWindowsUpdateStatus() (resp datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getWindowsUpdateStatus", nil, &r.Options, &resp) @@ -11787,36 +5634,6 @@ func (r Hardware_SecurityModule) MassFirmwareReflash(hardwareIds []int, ipmi *bo return } -func (r Hardware_SecurityModule) MassFirmwareReflashIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - ipmi, - raidController, - bios, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massFirmwareReflash", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massFirmwareReflash", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // You can launch firmware updates by selecting from your server list. It will bring your server offline for approximately 20 minutes while the updates are in progress. // // In the event of a hardware failure during this test our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online, and will be contacting you to ensure that impact on your server is minimal. @@ -11833,38 +5650,6 @@ func (r Hardware_SecurityModule) MassFirmwareUpdate(hardwareIds []int, ipmi *boo return } -func (r Hardware_SecurityModule) MassFirmwareUpdateIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool, harddrive *bool, networkCard *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - ipmi, - raidController, - bios, - harddrive, - networkCard, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massFirmwareUpdate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massFirmwareUpdate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // You can launch hyper-threading update by selecting from your server list. It will bring your server offline for approximately 60 minutes while the updates are in progress. // // In the event of a hardware failure during this update our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online. They will be in contact with you to ensure that impact on your server is minimal. @@ -11877,34 +5662,6 @@ func (r Hardware_SecurityModule) MassHyperThreadingUpdate(hardwareIds []int, dis return } -func (r Hardware_SecurityModule) MassHyperThreadingUpdateIter(hardwareIds []int, disableHyperthreading *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - disableHyperthreading, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massHyperThreadingUpdate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massHyperThreadingUpdate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Reloads current or customer specified operating system configuration. // // This service has a confirmation protocol for proceeding with the reload. To proceed with the reload without confirmation, simply pass in 'FORCE' as the token parameter. To proceed with the reload with confirmation, simply call the service with no parameter. A token string will be returned by this service. The token will remain active for 10 minutes. Use this token as the parameter to confirm that a reload is to be performed for the server. @@ -11933,35 +5690,6 @@ func (r Hardware_SecurityModule) MassSparePool(hardwareIds []string, action *str return } -func (r Hardware_SecurityModule) MassSparePoolIter(hardwareIds []string, action *string, newOrder *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - action, - newOrder, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massSparePool", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "massSparePool", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Issues a ping command to the server and returns the ping response. func (r Hardware_SecurityModule) Ping() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "ping", nil, &r.Options, &resp) @@ -12161,33 +5889,6 @@ func (r Hardware_SecurityModule) SetUserMetadata(metadata []string) (resp []data return } -func (r Hardware_SecurityModule) SetUserMetadataIter(metadata []string) (resp []datatypes.Hardware_Attribute, err error) { - params := []interface{}{ - metadata, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "setUserMetadata", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "setUserMetadata", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Disconnect a server's private network interface. This operation is an alias for calling [[SoftLayer_Hardware_Server/setPrivateNetworkInterfaceSpeed]] with a $newSpeed of 0 and unspecified $redundancy. // // Receipt of a response does not indicate completion of the configuration change. Any subsequent attempts to request the interface change speed or state, while changes are pending, will result in a busy error. @@ -12763,30 +6464,6 @@ func (r Hardware_SecurityModule750) GetActiveComponents() (resp []datatypes.Hard return } -func (r Hardware_SecurityModule750) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item for a server's attached network firewall. func (r Hardware_SecurityModule750) GetActiveNetworkFirewallBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveNetworkFirewallBillingItem", nil, &r.Options, &resp) @@ -12799,60 +6476,12 @@ func (r Hardware_SecurityModule750) GetActiveNetworkMonitorIncident() (resp []da return } -func (r Hardware_SecurityModule750) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetActiveTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTickets", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Transaction currently running for server. func (r Hardware_SecurityModule750) GetActiveTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTransaction", nil, &r.Options, &resp) @@ -12865,60 +6494,12 @@ func (r Hardware_SecurityModule750) GetActiveTransactions() (resp []datatypes.Pr return } -func (r Hardware_SecurityModule750) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getActiveTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllPowerComponents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware_SecurityModule750) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedHost", nil, &r.Options, &resp) @@ -12931,60 +6512,12 @@ func (r Hardware_SecurityModule750) GetAllowedNetworkStorage() (resp []datatypes return } -func (r Hardware_SecurityModule750) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware_SecurityModule750) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware_SecurityModule750) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -13000,123 +6533,24 @@ func (r Hardware_SecurityModule750) GetAttachedNetworkStorages(nasType *string) return } -func (r Hardware_SecurityModule750) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttachedNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttachedNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware_SecurityModule750) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttributes", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware_SecurityModule750) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An object that stores the maximum level for the monitoring query types and response types. func (r Hardware_SecurityModule750) GetAvailableMonitoring() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableMonitoring", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetAvailableMonitoringIter() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableMonitoring", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host_Stratum{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableMonitoring", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware_SecurityModule750) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -13126,33 +6560,6 @@ func (r Hardware_SecurityModule750) GetAvailableNetworkStorages(nasType *string) return } -func (r Hardware_SecurityModule750) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAvailableNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The average daily total bandwidth usage for the current billing cycle. func (r Hardware_SecurityModule750) GetAverageDailyBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getAverageDailyBandwidthUsage", nil, &r.Options, &resp) @@ -13183,34 +6590,6 @@ func (r Hardware_SecurityModule750) GetBackendBandwidthUsage(startDate *datatype return } -func (r Hardware_SecurityModule750) GetBackendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendBandwidthUsage", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendBandwidthUsage", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule750) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -13227,30 +6606,6 @@ func (r Hardware_SecurityModule750) GetBackendNetworkComponents() (resp []dataty return } -func (r Hardware_SecurityModule750) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule750) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -13267,30 +6622,6 @@ func (r Hardware_SecurityModule750) GetBackendRouters() (resp []datatypes.Hardwa return } -func (r Hardware_SecurityModule750) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBackendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware_SecurityModule750) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -13313,34 +6644,6 @@ func (r Hardware_SecurityModule750) GetBandwidthForDateRange(startDate *datatype return } -func (r Hardware_SecurityModule750) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBandwidthForDateRange", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBandwidthForDateRange", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method when needing a bandwidth image for a single server. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. Use the $draw flag to suppress the generation of the actual binary PNG image. func (r Hardware_SecurityModule750) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -13360,60 +6663,12 @@ func (r Hardware_SecurityModule750) GetBenchmarkCertifications() (resp []datatyp return } -func (r Hardware_SecurityModule750) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBenchmarkCertifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Benchmark_Certification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBenchmarkCertifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The raw bandwidth usage data for the current billing cycle. One object will be returned for each network this server is attached to. func (r Hardware_SecurityModule750) GetBillingCycleBandwidthUsage() (resp []datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Usage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Hardware_SecurityModule750) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -13456,30 +6711,6 @@ func (r Hardware_SecurityModule750) GetBootModeOptions() (resp []string, err err return } -func (r Hardware_SecurityModule750) GetBootModeOptionsIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBootModeOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBootModeOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Status indicating whether or not a piece of hardware has business continuance insurance. func (r Hardware_SecurityModule750) GetBusinessContinuanceInsuranceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getBusinessContinuanceInsuranceFlag", nil, &r.Options, &resp) @@ -13498,30 +6729,6 @@ func (r Hardware_SecurityModule750) GetChildrenHardware() (resp []datatypes.Hard return } -func (r Hardware_SecurityModule750) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getChildrenHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getChildrenHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_SecurityModule750) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -13534,30 +6741,6 @@ func (r Hardware_SecurityModule750) GetComponents() (resp []datatypes.Hardware_C return } -func (r Hardware_SecurityModule750) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetContainsSolidStateDrivesFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getContainsSolidStateDrivesFlag", nil, &r.Options, &resp) @@ -13614,30 +6797,6 @@ func (r Hardware_SecurityModule750) GetCurrentBillingDetail() (resp []datatypes. return } -func (r Hardware_SecurityModule750) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getCurrentBillingDetail", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getCurrentBillingDetail", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware_SecurityModule750) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -13690,360 +6849,72 @@ func (r Hardware_SecurityModule750) GetDownlinkHardware() (resp []datatypes.Hard return } -func (r Hardware_SecurityModule750) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware_SecurityModule750) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware_SecurityModule750) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkServers", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_SecurityModule750) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownlinkVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware downstream from a network device. func (r Hardware_SecurityModule750) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamHardwareBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Uplink_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamHardwareBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware_SecurityModule750) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware_SecurityModule750) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware_SecurityModule750) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamServers", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_SecurityModule750) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDownstreamVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware_SecurityModule750) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDriveControllers", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDriveControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getDriveControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware_SecurityModule750) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getEvaultNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getEvaultNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the subnets associated with this server that are protectable by a network component firewall. func (r Hardware_SecurityModule750) GetFirewallProtectableSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFirewallProtectableSubnets", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFirewallProtectableSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFirewallProtectableSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware_SecurityModule750) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -14068,34 +6939,6 @@ func (r Hardware_SecurityModule750) GetFrontendBandwidthUsage(startDate *datatyp return } -func (r Hardware_SecurityModule750) GetFrontendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendBandwidthUsage", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendBandwidthUsage", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule750) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -14112,30 +6955,6 @@ func (r Hardware_SecurityModule750) GetFrontendNetworkComponents() (resp []datat return } -func (r Hardware_SecurityModule750) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule750) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -14152,30 +6971,6 @@ func (r Hardware_SecurityModule750) GetFrontendRouters() (resp []datatypes.Hardw return } -func (r Hardware_SecurityModule750) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFrontendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the future billing item for a server. func (r Hardware_SecurityModule750) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getFutureBillingItem", nil, &r.Options, &resp) @@ -14194,30 +6989,6 @@ func (r Hardware_SecurityModule750) GetHardDrives() (resp []datatypes.Hardware_C return } -func (r Hardware_SecurityModule750) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHardDrives", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHardDrives", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a server by searching for the primary IP address. func (r Hardware_SecurityModule750) GetHardwareByIpAddress(ipAddress *string) (resp datatypes.Hardware_Server, err error) { params := []interface{}{ @@ -14291,34 +7062,6 @@ func (r Hardware_SecurityModule750) GetHourlyBandwidth(mode *string, day *dataty return } -func (r Hardware_SecurityModule750) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - mode, - day, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHourlyBandwidth", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHourlyBandwidth", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A server's hourly billing status. func (r Hardware_SecurityModule750) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -14384,35 +7127,6 @@ func (r Hardware_SecurityModule750) GetItemPricesFromSoftwareDescriptions(softwa return } -func (r Hardware_SecurityModule750) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item, err error) { - params := []interface{}{ - softwareDescriptions, - includeTranslationsFlag, - returnAllPricesFlag, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The last transaction that a server's operating system was loaded. func (r Hardware_SecurityModule750) GetLastOperatingSystemReload() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getLastOperatingSystemReload", nil, &r.Options, &resp) @@ -14455,30 +7169,6 @@ func (r Hardware_SecurityModule750) GetLogicalVolumeStorageGroups() (resp []data return } -func (r Hardware_SecurityModule750) GetLogicalVolumeStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getLogicalVolumeStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getLogicalVolumeStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating that the hardware is a managed resource. func (r Hardware_SecurityModule750) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -14497,30 +7187,6 @@ func (r Hardware_SecurityModule750) GetMemory() (resp []datatypes.Hardware_Compo return } -func (r Hardware_SecurityModule750) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMemory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMemory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware_SecurityModule750) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMemoryCapacity", nil, &r.Options, &resp) @@ -14545,30 +7211,6 @@ func (r Hardware_SecurityModule750) GetModules() (resp []datatypes.Hardware_Comp return } -func (r Hardware_SecurityModule750) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getModules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getModules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMonitoringRobot", nil, &r.Options, &resp) @@ -14593,30 +7235,6 @@ func (r Hardware_SecurityModule750) GetMonitoringUserNotification() (resp []data return } -func (r Hardware_SecurityModule750) GetMonitoringUserNotificationIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMonitoringUserNotification", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMonitoringUserNotification", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's motherboard. func (r Hardware_SecurityModule750) GetMotherboard() (resp datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getMotherboard", nil, &r.Options, &resp) @@ -14629,90 +7247,18 @@ func (r Hardware_SecurityModule750) GetNetworkCards() (resp []datatypes.Hardware return } -func (r Hardware_SecurityModule750) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkCards", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkCards", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the IP addresses associated with this server that are protectable by a network component firewall. Note, this may not return all values for IPv6 subnets for this server. Please use getFirewallProtectableSubnets to get all protectable subnets. func (r Hardware_SecurityModule750) GetNetworkComponentFirewallProtectableIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetNetworkComponentFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponentFirewallProtectableIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Returns a hardware's network components. func (r Hardware_SecurityModule750) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware_SecurityModule750) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -14737,120 +7283,24 @@ func (r Hardware_SecurityModule750) GetNetworkMonitorAttachedDownHardware() (res return } -func (r Hardware_SecurityModule750) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware_SecurityModule750) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware_SecurityModule750) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitorIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware_SecurityModule750) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitors", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkMonitors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware_SecurityModule750) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkStatus", nil, &r.Options, &resp) @@ -14869,60 +7319,12 @@ func (r Hardware_SecurityModule750) GetNetworkStorage() (resp []datatypes.Networ return } -func (r Hardware_SecurityModule750) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware_SecurityModule750) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkVlans", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware_SecurityModule750) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -14935,30 +7337,6 @@ func (r Hardware_SecurityModule750) GetNotesHistory() (resp []datatypes.Hardware return } -func (r Hardware_SecurityModule750) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNotesHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Note{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNotesHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware_SecurityModule750) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNvRamCapacity", nil, &r.Options, &resp) @@ -14971,30 +7349,6 @@ func (r Hardware_SecurityModule750) GetNvRamComponentModels() (resp []datatypes. return } -func (r Hardware_SecurityModule750) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNvRamComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getNvRamComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_SecurityModule750) GetObject() (resp datatypes.Hardware_SecurityModule750, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getObject", nil, &r.Options, &resp) @@ -15049,30 +7403,6 @@ func (r Hardware_SecurityModule750) GetPMInfo() (resp []datatypes.Container_Remo return } -func (r Hardware_SecurityModule750) GetPMInfoIter() (resp []datatypes.Container_RemoteManagement_PmInfo, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPMInfo", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_PmInfo{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPMInfo", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Blade Bay func (r Hardware_SecurityModule750) GetParentBay() (resp datatypes.Hardware_Blade, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getParentBay", nil, &r.Options, &resp) @@ -15091,30 +7421,6 @@ func (r Hardware_SecurityModule750) GetPartitions() (resp []datatypes.Hardware_S return } -func (r Hardware_SecurityModule750) GetPartitionsIter() (resp []datatypes.Hardware_Server_Partition, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPartitions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Server_Partition{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPartitions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the Point of Presence (PoP) location in which a piece of hardware resides. func (r Hardware_SecurityModule750) GetPointOfPresenceLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPointOfPresenceLocation", nil, &r.Options, &resp) @@ -15127,60 +7433,12 @@ func (r Hardware_SecurityModule750) GetPowerComponents() (resp []datatypes.Hardw return } -func (r Hardware_SecurityModule750) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware_SecurityModule750) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerSupply", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerSupply", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPowerSupply", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware's primary private IP address. func (r Hardware_SecurityModule750) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -15217,30 +7475,6 @@ func (r Hardware_SecurityModule750) GetPrivateBackendNetworkComponents() (resp [ return } -func (r Hardware_SecurityModule750) GetPrivateBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a graph of a server's private network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPrivateBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware_SecurityModule750) GetPrivateBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -15251,34 +7485,6 @@ func (r Hardware_SecurityModule750) GetPrivateBandwidthData(startTime *int, endT return } -func (r Hardware_SecurityModule750) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a brief summary of a server's private network bandwidth usage. getPrivateBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_SecurityModule750) GetPrivateBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPrivateBandwidthDataSummary", nil, &r.Options, &resp) @@ -15348,30 +7554,6 @@ func (r Hardware_SecurityModule750) GetProcessors() (resp []datatypes.Hardware_C return } -func (r Hardware_SecurityModule750) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getProcessors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getProcessors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether the bandwidth usage for this hardware for the current billing cycle is projected to exceed the allocation. func (r Hardware_SecurityModule750) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) @@ -15400,34 +7582,6 @@ func (r Hardware_SecurityModule750) GetPublicBandwidthData(startTime *int, endTi return } -func (r Hardware_SecurityModule750) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPublicBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPublicBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a brief summary of a server's public network bandwidth usage. getPublicBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_SecurityModule750) GetPublicBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getPublicBandwidthDataSummary", nil, &r.Options, &resp) @@ -15487,30 +7641,6 @@ func (r Hardware_SecurityModule750) GetRaidControllers() (resp []datatypes.Hardw return } -func (r Hardware_SecurityModule750) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRaidControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRaidControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determine if hardware object is vSan Ready Node. func (r Hardware_SecurityModule750) GetReadyNodeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getReadyNodeFlag", nil, &r.Options, &resp) @@ -15523,60 +7653,12 @@ func (r Hardware_SecurityModule750) GetRecentEvents() (resp []datatypes.Notifica return } -func (r Hardware_SecurityModule750) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The last five commands issued to the server's remote management card. func (r Hardware_SecurityModule750) GetRecentRemoteManagementCommands() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetRecentRemoteManagementCommandsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRecentRemoteManagementCommands", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRegionalInternetRegistry", nil, &r.Options, &resp) @@ -15595,30 +7677,6 @@ func (r Hardware_SecurityModule750) GetRemoteManagementAccounts() (resp []dataty return } -func (r Hardware_SecurityModule750) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware_SecurityModule750) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -15631,270 +7689,54 @@ func (r Hardware_SecurityModule750) GetRemoteManagementUsers() (resp []datatypes return } -func (r Hardware_SecurityModule750) GetRemoteManagementUsersIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRemoteManagementUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetResourceConfigurations() (resp []datatypes.Hardware_Resource_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceConfigurations", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceConfigurations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Resource_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceConfigurations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupMemberReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupMemberReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupRoles", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroupRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The resource groups in which this hardware is a member. func (r Hardware_SecurityModule750) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroups", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getResourceGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the reverse domain records associated with this server. func (r Hardware_SecurityModule750) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getReverseDomainRecords", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getReverseDomainRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getReverseDomainRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's routers. func (r Hardware_SecurityModule750) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRouters", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's vulnerability scan requests. func (r Hardware_SecurityModule750) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSecurityScanRequests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSecurityScanRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Security_Scanner_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSecurityScanRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures system temperatures, voltages, and other local server settings. Sensor data is cached for 30 seconds. Calls made to getSensorData for the same server within 30 seconds of each other will return the same data. Subsequent calls will return new data once the cache expires. func (r Hardware_SecurityModule750) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSensorData", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSensorData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_SensorReading{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSensorData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the raw data returned from the server's remote management card. For more details of what is returned please refer to the getSensorData method. Along with the raw data, graphs for the cpu and system temperatures and fan speeds are also returned. func (r Hardware_SecurityModule750) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -15913,30 +7755,6 @@ func (r Hardware_SecurityModule750) GetServerFanSpeedGraphs() (resp []datatypes. return } -func (r Hardware_SecurityModule750) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerFanSpeedGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerFanSpeedGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the power state for the server. The server's power status is retrieved from its remote management card. This will return 'on' or 'off'. func (r Hardware_SecurityModule750) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerPowerState", nil, &r.Options, &resp) @@ -15955,30 +7773,6 @@ func (r Hardware_SecurityModule750) GetServerTemperatureGraphs() (resp []datatyp return } -func (r Hardware_SecurityModule750) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerTemperatureGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServerTemperatureGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware_SecurityModule750) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getServiceProvider", nil, &r.Options, &resp) @@ -15991,30 +7785,6 @@ func (r Hardware_SecurityModule750) GetSoftwareComponents() (resp []datatypes.So return } -func (r Hardware_SecurityModule750) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSoftwareComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSoftwareComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determine if hardware object has Software Guard Extension (SGX) enabled. func (r Hardware_SecurityModule750) GetSoftwareGuardExtensionEnabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSoftwareGuardExtensionEnabled", nil, &r.Options, &resp) @@ -16033,30 +7803,6 @@ func (r Hardware_SecurityModule750) GetSshKeys() (resp []datatypes.Security_Ssh_ return } -func (r Hardware_SecurityModule750) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A server's remote management card used for statistics. func (r Hardware_SecurityModule750) GetStatisticsRemoteManagement() (resp datatypes.Hardware_Component_RemoteManagement, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStatisticsRemoteManagement", nil, &r.Options, &resp) @@ -16069,90 +7815,18 @@ func (r Hardware_SecurityModule750) GetStorageGroups() (resp []datatypes.Configu return } -func (r Hardware_SecurityModule750) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware_SecurityModule750) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getStorageNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTagReferences", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_SecurityModule750) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTopLevelLocation", nil, &r.Options, &resp) @@ -16165,30 +7839,6 @@ func (r Hardware_SecurityModule750) GetTransactionHistory() (resp []datatypes.Pr return } -func (r Hardware_SecurityModule750) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTransactionHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTransactionHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether to use UEFI boot instead of BIOS. func (r Hardware_SecurityModule750) GetUefiBootFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUefiBootFlag", nil, &r.Options, &resp) @@ -16201,30 +7851,6 @@ func (r Hardware_SecurityModule750) GetUpgradeItemPrices() (resp []datatypes.Pro return } -func (r Hardware_SecurityModule750) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated upgrade request object, if any. func (r Hardware_SecurityModule750) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeRequest", nil, &r.Options, &resp) @@ -16237,30 +7863,6 @@ func (r Hardware_SecurityModule750) GetUpgradeableActiveComponents() (resp []dat return } -func (r Hardware_SecurityModule750) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeableActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUpgradeableActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network device connected to a piece of hardware. func (r Hardware_SecurityModule750) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUplinkHardware", nil, &r.Options, &resp) @@ -16273,87 +7875,15 @@ func (r Hardware_SecurityModule750) GetUplinkNetworkComponents() (resp []datatyp return } -func (r Hardware_SecurityModule750) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUplinkNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUplinkNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware_SecurityModule750) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUserData", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUserData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUserData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A list of users that have access to this computing instance. -func (r Hardware_SecurityModule750) GetUsers() (resp []datatypes.User_Customer, err error) { - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUsers", nil, &r.Options, &resp) - return -} - -func (r Hardware_SecurityModule750) GetUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() +func (r Hardware_SecurityModule750) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -16366,33 +7896,6 @@ func (r Hardware_SecurityModule750) GetValidBlockDeviceTemplateGroups(visibility return } -func (r Hardware_SecurityModule750) GetValidBlockDeviceTemplateGroupsIter(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - params := []interface{}{ - visibility, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getValidBlockDeviceTemplateGroups", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware_SecurityModule750) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualChassis", nil, &r.Options, &resp) @@ -16405,60 +7908,12 @@ func (r Hardware_SecurityModule750) GetVirtualChassisSiblings() (resp []datatype return } -func (r Hardware_SecurityModule750) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualChassisSiblings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualChassisSiblings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [DEPRECATED] A hardware server's virtual servers. func (r Hardware_SecurityModule750) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's virtual host record. func (r Hardware_SecurityModule750) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualHost", nil, &r.Options, &resp) @@ -16471,30 +7926,6 @@ func (r Hardware_SecurityModule750) GetVirtualLicenses() (resp []datatypes.Softw return } -func (r Hardware_SecurityModule750) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_VirtualLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware_SecurityModule750) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getVirtualRack", nil, &r.Options, &resp) @@ -16525,60 +7956,12 @@ func (r Hardware_SecurityModule750) GetWindowsUpdateAvailableUpdates() (resp []d return } -func (r Hardware_SecurityModule750) GetWindowsUpdateAvailableUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateAvailableUpdates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateAvailableUpdates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a list of Windows updates installed on a server as reported by the local SoftLayer Windows Server Update Services (WSUS) server. Windows servers provisioned by SoftLayer are configured to use the local WSUS server via the private network by default. func (r Hardware_SecurityModule750) GetWindowsUpdateInstalledUpdates() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) return } -func (r Hardware_SecurityModule750) GetWindowsUpdateInstalledUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateInstalledUpdates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns an update status record for this server. That record will specify if the server is missing updates, or has updates that must be reinstalled or require a reboot to go into affect. func (r Hardware_SecurityModule750) GetWindowsUpdateStatus() (resp datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getWindowsUpdateStatus", nil, &r.Options, &resp) @@ -16635,36 +8018,6 @@ func (r Hardware_SecurityModule750) MassFirmwareReflash(hardwareIds []int, ipmi return } -func (r Hardware_SecurityModule750) MassFirmwareReflashIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - ipmi, - raidController, - bios, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massFirmwareReflash", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massFirmwareReflash", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // You can launch firmware updates by selecting from your server list. It will bring your server offline for approximately 20 minutes while the updates are in progress. // // In the event of a hardware failure during this test our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online, and will be contacting you to ensure that impact on your server is minimal. @@ -16681,38 +8034,6 @@ func (r Hardware_SecurityModule750) MassFirmwareUpdate(hardwareIds []int, ipmi * return } -func (r Hardware_SecurityModule750) MassFirmwareUpdateIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool, harddrive *bool, networkCard *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - ipmi, - raidController, - bios, - harddrive, - networkCard, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massFirmwareUpdate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massFirmwareUpdate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // You can launch hyper-threading update by selecting from your server list. It will bring your server offline for approximately 60 minutes while the updates are in progress. // // In the event of a hardware failure during this update our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online. They will be in contact with you to ensure that impact on your server is minimal. @@ -16725,34 +8046,6 @@ func (r Hardware_SecurityModule750) MassHyperThreadingUpdate(hardwareIds []int, return } -func (r Hardware_SecurityModule750) MassHyperThreadingUpdateIter(hardwareIds []int, disableHyperthreading *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - disableHyperthreading, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massHyperThreadingUpdate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massHyperThreadingUpdate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Reloads current or customer specified operating system configuration. // // This service has a confirmation protocol for proceeding with the reload. To proceed with the reload without confirmation, simply pass in 'FORCE' as the token parameter. To proceed with the reload with confirmation, simply call the service with no parameter. A token string will be returned by this service. The token will remain active for 10 minutes. Use this token as the parameter to confirm that a reload is to be performed for the server. @@ -16781,35 +8074,6 @@ func (r Hardware_SecurityModule750) MassSparePool(hardwareIds []string, action * return } -func (r Hardware_SecurityModule750) MassSparePoolIter(hardwareIds []string, action *string, newOrder *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - action, - newOrder, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massSparePool", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "massSparePool", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Issues a ping command to the server and returns the ping response. func (r Hardware_SecurityModule750) Ping() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "ping", nil, &r.Options, &resp) @@ -17009,33 +8273,6 @@ func (r Hardware_SecurityModule750) SetUserMetadata(metadata []string) (resp []d return } -func (r Hardware_SecurityModule750) SetUserMetadataIter(metadata []string) (resp []datatypes.Hardware_Attribute, err error) { - params := []interface{}{ - metadata, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "setUserMetadata", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "setUserMetadata", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Disconnect a server's private network interface. This operation is an alias for calling [[SoftLayer_Hardware_Server/setPrivateNetworkInterfaceSpeed]] with a $newSpeed of 0 and unspecified $redundancy. // // Receipt of a response does not indicate completion of the configuration change. Any subsequent attempts to request the interface change speed or state, while changes are pending, will result in a busy error. @@ -17611,30 +8848,6 @@ func (r Hardware_Server) GetActiveComponents() (resp []datatypes.Hardware_Compon return } -func (r Hardware_Server) GetActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item for a server's attached network firewall. func (r Hardware_Server) GetActiveNetworkFirewallBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveNetworkFirewallBillingItem", nil, &r.Options, &resp) @@ -17647,60 +8860,12 @@ func (r Hardware_Server) GetActiveNetworkMonitorIncident() (resp []datatypes.Net return } -func (r Hardware_Server) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetActiveTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTickets", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Transaction currently running for server. func (r Hardware_Server) GetActiveTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTransaction", nil, &r.Options, &resp) @@ -17713,60 +8878,12 @@ func (r Hardware_Server) GetActiveTransactions() (resp []datatypes.Provisioning_ return } -func (r Hardware_Server) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getActiveTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetAllPowerComponents() (resp []datatypes.Hardware_Power_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllPowerComponents", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetAllPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this server to Network Storage volumes that require access control lists. func (r Hardware_Server) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedHost", nil, &r.Options, &resp) @@ -17779,60 +8896,12 @@ func (r Hardware_Server) GetAllowedNetworkStorage() (resp []datatypes.Network_St return } -func (r Hardware_Server) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Hardware_Server) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding an antivirus/spyware software component object. func (r Hardware_Server) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -17848,123 +8917,24 @@ func (r Hardware_Server) GetAttachedNetworkStorages(nasType *string) (resp []dat return } -func (r Hardware_Server) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttachedNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttachedNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's specific attributes. func (r Hardware_Server) GetAttributes() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttributes", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetAttributesIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of available term prices to this hardware. Currently, price terms are only available for increasing term length to monthly billed servers. func (r Hardware_Server) GetAvailableBillingTermChangePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetAvailableBillingTermChangePricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableBillingTermChangePrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableBillingTermChangePrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An object that stores the maximum level for the monitoring query types and response types. func (r Hardware_Server) GetAvailableMonitoring() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableMonitoring", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetAvailableMonitoringIter() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableMonitoring", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host_Stratum{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableMonitoring", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Hardware. func (r Hardware_Server) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -17974,33 +8944,6 @@ func (r Hardware_Server) GetAvailableNetworkStorages(nasType *string) (resp []da return } -func (r Hardware_Server) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAvailableNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The average daily total bandwidth usage for the current billing cycle. func (r Hardware_Server) GetAverageDailyBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getAverageDailyBandwidthUsage", nil, &r.Options, &resp) @@ -18031,34 +8974,6 @@ func (r Hardware_Server) GetBackendBandwidthUsage(startDate *datatypes.Time, end return } -func (r Hardware_Server) GetBackendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendBandwidthUsage", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendBandwidthUsage", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Server) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -18075,30 +8990,6 @@ func (r Hardware_Server) GetBackendNetworkComponents() (resp []datatypes.Network return } -func (r Hardware_Server) GetBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Server) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -18115,30 +9006,6 @@ func (r Hardware_Server) GetBackendRouters() (resp []datatypes.Hardware, err err return } -func (r Hardware_Server) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBackendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth (measured in GB). func (r Hardware_Server) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -18161,34 +9028,6 @@ func (r Hardware_Server) GetBandwidthForDateRange(startDate *datatypes.Time, end return } -func (r Hardware_Server) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBandwidthForDateRange", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBandwidthForDateRange", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method when needing a bandwidth image for a single server. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. Use the $draw flag to suppress the generation of the actual binary PNG image. func (r Hardware_Server) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -18208,60 +9047,12 @@ func (r Hardware_Server) GetBenchmarkCertifications() (resp []datatypes.Hardware return } -func (r Hardware_Server) GetBenchmarkCertificationsIter() (resp []datatypes.Hardware_Benchmark_Certification, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBenchmarkCertifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Benchmark_Certification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBenchmarkCertifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The raw bandwidth usage data for the current billing cycle. One object will be returned for each network this server is attached to. func (r Hardware_Server) GetBillingCycleBandwidthUsage() (resp []datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Usage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Hardware_Server) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -18304,30 +9095,6 @@ func (r Hardware_Server) GetBootModeOptions() (resp []string, err error) { return } -func (r Hardware_Server) GetBootModeOptionsIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBootModeOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBootModeOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Status indicating whether or not a piece of hardware has business continuance insurance. func (r Hardware_Server) GetBusinessContinuanceInsuranceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getBusinessContinuanceInsuranceFlag", nil, &r.Options, &resp) @@ -18346,30 +9113,6 @@ func (r Hardware_Server) GetChildrenHardware() (resp []datatypes.Hardware, err e return } -func (r Hardware_Server) GetChildrenHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getChildrenHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getChildrenHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Hardware_Server) GetComponentDetailsXML() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getComponentDetailsXML", nil, &r.Options, &resp) @@ -18382,30 +9125,6 @@ func (r Hardware_Server) GetComponents() (resp []datatypes.Hardware_Component, e return } -func (r Hardware_Server) GetComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetContainsSolidStateDrivesFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getContainsSolidStateDrivesFlag", nil, &r.Options, &resp) @@ -18462,30 +9181,6 @@ func (r Hardware_Server) GetCurrentBillingDetail() (resp []datatypes.Billing_Ite return } -func (r Hardware_Server) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getCurrentBillingDetail", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getCurrentBillingDetail", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the total bill amount in US Dollars ($) for this hardware in the current billing period. This includes all bandwidth used up to the point the method is called on the hardware. func (r Hardware_Server) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -18538,360 +9233,72 @@ func (r Hardware_Server) GetDownlinkHardware() (resp []datatypes.Hardware, err e return } -func (r Hardware_Server) GetDownlinkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware that has uplink network connections to a piece of hardware. func (r Hardware_Server) GetDownlinkNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDownlinkNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached to a piece of network hardware. func (r Hardware_Server) GetDownlinkServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkServers", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDownlinkServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_Server) GetDownlinkVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDownlinkVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownlinkVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All hardware downstream from a network device. func (r Hardware_Server) GetDownstreamHardwareBindings() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamHardwareBindings", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDownstreamHardwareBindingsIter() (resp []datatypes.Network_Component_Uplink_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamHardwareBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Uplink_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamHardwareBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware downstream from the selected piece of hardware. func (r Hardware_Server) GetDownstreamNetworkHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardware", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDownstreamNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All network hardware with monitoring warnings or errors that are downstream from the selected piece of hardware. [DEPRECATED] func (r Hardware_Server) GetDownstreamNetworkHardwareWithIncidents() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDownstreamNetworkHardwareWithIncidentsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardwareWithIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamNetworkHardwareWithIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all servers attached downstream to a piece of network hardware. func (r Hardware_Server) GetDownstreamServers() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamServers", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDownstreamServersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding all virtual guests attached to a piece of network hardware. func (r Hardware_Server) GetDownstreamVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDownstreamVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDownstreamVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The drive controllers contained within a piece of hardware. func (r Hardware_Server) GetDriveControllers() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDriveControllers", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetDriveControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDriveControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getDriveControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's associated EVault network storage service account. func (r Hardware_Server) GetEvaultNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getEvaultNetworkStorage", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getEvaultNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getEvaultNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the subnets associated with this server that are protectable by a network component firewall. func (r Hardware_Server) GetFirewallProtectableSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFirewallProtectableSubnets", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFirewallProtectableSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFirewallProtectableSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's firewall services. func (r Hardware_Server) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -18916,34 +9323,6 @@ func (r Hardware_Server) GetFrontendBandwidthUsage(startDate *datatypes.Time, en return } -func (r Hardware_Server) GetFrontendBandwidthUsageIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendBandwidthUsage", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendBandwidthUsage", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Server) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -18960,30 +9339,6 @@ func (r Hardware_Server) GetFrontendNetworkComponents() (resp []datatypes.Networ return } -func (r Hardware_Server) GetFrontendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Server) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ @@ -19000,30 +9355,6 @@ func (r Hardware_Server) GetFrontendRouters() (resp []datatypes.Hardware, err er return } -func (r Hardware_Server) GetFrontendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFrontendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the future billing item for a server. func (r Hardware_Server) GetFutureBillingItem() (resp datatypes.Billing_Item_Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getFutureBillingItem", nil, &r.Options, &resp) @@ -19042,30 +9373,6 @@ func (r Hardware_Server) GetHardDrives() (resp []datatypes.Hardware_Component, e return } -func (r Hardware_Server) GetHardDrivesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHardDrives", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHardDrives", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a server by searching for the primary IP address. func (r Hardware_Server) GetHardwareByIpAddress(ipAddress *string) (resp datatypes.Hardware_Server, err error) { params := []interface{}{ @@ -19139,34 +9446,6 @@ func (r Hardware_Server) GetHourlyBandwidth(mode *string, day *datatypes.Time) ( return } -func (r Hardware_Server) GetHourlyBandwidthIter(mode *string, day *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - mode, - day, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHourlyBandwidth", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHourlyBandwidth", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A server's hourly billing status. func (r Hardware_Server) GetHourlyBillingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getHourlyBillingFlag", nil, &r.Options, &resp) @@ -19232,35 +9511,6 @@ func (r Hardware_Server) GetItemPricesFromSoftwareDescriptions(softwareDescripti return } -func (r Hardware_Server) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item, err error) { - params := []interface{}{ - softwareDescriptions, - includeTranslationsFlag, - returnAllPricesFlag, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The last transaction that a server's operating system was loaded. func (r Hardware_Server) GetLastOperatingSystemReload() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getLastOperatingSystemReload", nil, &r.Options, &resp) @@ -19303,30 +9553,6 @@ func (r Hardware_Server) GetLogicalVolumeStorageGroups() (resp []datatypes.Confi return } -func (r Hardware_Server) GetLogicalVolumeStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getLogicalVolumeStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getLogicalVolumeStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating that the hardware is a managed resource. func (r Hardware_Server) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -19345,30 +9571,6 @@ func (r Hardware_Server) GetMemory() (resp []datatypes.Hardware_Component, err e return } -func (r Hardware_Server) GetMemoryIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMemory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMemory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of memory a piece of hardware has, measured in gigabytes. func (r Hardware_Server) GetMemoryCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMemoryCapacity", nil, &r.Options, &resp) @@ -19393,30 +9595,6 @@ func (r Hardware_Server) GetModules() (resp []datatypes.Hardware_Component, err return } -func (r Hardware_Server) GetModulesIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getModules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getModules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetMonitoringRobot() (resp datatypes.Monitoring_Robot, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMonitoringRobot", nil, &r.Options, &resp) @@ -19441,30 +9619,6 @@ func (r Hardware_Server) GetMonitoringUserNotification() (resp []datatypes.User_ return } -func (r Hardware_Server) GetMonitoringUserNotificationIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMonitoringUserNotification", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMonitoringUserNotification", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's motherboard. func (r Hardware_Server) GetMotherboard() (resp datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getMotherboard", nil, &r.Options, &resp) @@ -19477,90 +9631,18 @@ func (r Hardware_Server) GetNetworkCards() (resp []datatypes.Hardware_Component, return } -func (r Hardware_Server) GetNetworkCardsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkCards", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkCards", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the IP addresses associated with this server that are protectable by a network component firewall. Note, this may not return all values for IPv6 subnets for this server. Please use getFirewallProtectableSubnets to get all protectable subnets. func (r Hardware_Server) GetNetworkComponentFirewallProtectableIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetNetworkComponentFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponentFirewallProtectableIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Returns a hardware's network components. func (r Hardware_Server) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway member if this device is part of a network gateway. func (r Hardware_Server) GetNetworkGatewayMember() (resp datatypes.Network_Gateway_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkGatewayMember", nil, &r.Options, &resp) @@ -19585,120 +9667,24 @@ func (r Hardware_Server) GetNetworkMonitorAttachedDownHardware() (resp []datatyp return } -func (r Hardware_Server) GetNetworkMonitorAttachedDownHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Virtual guests that are attached downstream to a hardware that have failed monitoring func (r Hardware_Server) GetNetworkMonitorAttachedDownVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetNetworkMonitorAttachedDownVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorAttachedDownVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of all of a piece of hardware's network monitoring incidents. func (r Hardware_Server) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitorIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's network monitors. func (r Hardware_Server) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitors", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkMonitors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The value of a hardware's network status attribute. [DEPRECATED] func (r Hardware_Server) GetNetworkStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkStatus", nil, &r.Options, &resp) @@ -19717,60 +9703,12 @@ func (r Hardware_Server) GetNetworkStorage() (resp []datatypes.Network_Storage, return } -func (r Hardware_Server) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network virtual LANs (VLANs) associated with a piece of hardware's network components. func (r Hardware_Server) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkVlans", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's allotted bandwidth for the next billing cycle (measured in GB). func (r Hardware_Server) GetNextBillingCycleBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNextBillingCycleBandwidthAllocation", nil, &r.Options, &resp) @@ -19783,30 +9721,6 @@ func (r Hardware_Server) GetNotesHistory() (resp []datatypes.Hardware_Note, err return } -func (r Hardware_Server) GetNotesHistoryIter() (resp []datatypes.Hardware_Note, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNotesHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Note{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNotesHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of non-volatile memory a piece of hardware has, measured in gigabytes. func (r Hardware_Server) GetNvRamCapacity() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNvRamCapacity", nil, &r.Options, &resp) @@ -19819,30 +9733,6 @@ func (r Hardware_Server) GetNvRamComponentModels() (resp []datatypes.Hardware_Co return } -func (r Hardware_Server) GetNvRamComponentModelsIter() (resp []datatypes.Hardware_Component_Model, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNvRamComponentModels", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_Model{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getNvRamComponentModels", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Hardware_Server object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Hardware service. You can only retrieve servers from the account that your portal user is assigned to. func (r Hardware_Server) GetObject() (resp datatypes.Hardware_Server, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getObject", nil, &r.Options, &resp) @@ -19897,30 +9787,6 @@ func (r Hardware_Server) GetPMInfo() (resp []datatypes.Container_RemoteManagemen return } -func (r Hardware_Server) GetPMInfoIter() (resp []datatypes.Container_RemoteManagement_PmInfo, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPMInfo", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_PmInfo{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPMInfo", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Blade Bay func (r Hardware_Server) GetParentBay() (resp datatypes.Hardware_Blade, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getParentBay", nil, &r.Options, &resp) @@ -19939,30 +9805,6 @@ func (r Hardware_Server) GetPartitions() (resp []datatypes.Hardware_Server_Parti return } -func (r Hardware_Server) GetPartitionsIter() (resp []datatypes.Hardware_Server_Partition, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPartitions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Server_Partition{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPartitions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the Point of Presence (PoP) location in which a piece of hardware resides. func (r Hardware_Server) GetPointOfPresenceLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPointOfPresenceLocation", nil, &r.Options, &resp) @@ -19975,60 +9817,12 @@ func (r Hardware_Server) GetPowerComponents() (resp []datatypes.Hardware_Power_C return } -func (r Hardware_Server) GetPowerComponentsIter() (resp []datatypes.Hardware_Power_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Power_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's power supply. func (r Hardware_Server) GetPowerSupply() (resp []datatypes.Hardware_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerSupply", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetPowerSupplyIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerSupply", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPowerSupply", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware's primary private IP address. func (r Hardware_Server) GetPrimaryBackendIpAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrimaryBackendIpAddress", nil, &r.Options, &resp) @@ -20065,30 +9859,6 @@ func (r Hardware_Server) GetPrivateBackendNetworkComponents() (resp []datatypes. return } -func (r Hardware_Server) GetPrivateBackendNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a graph of a server's private network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPrivateBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. func (r Hardware_Server) GetPrivateBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -20099,34 +9869,6 @@ func (r Hardware_Server) GetPrivateBandwidthData(startTime *int, endTime *int) ( return } -func (r Hardware_Server) GetPrivateBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a brief summary of a server's private network bandwidth usage. getPrivateBandwidthDataSummary retrieves a server's bandwidth allocation for its billing period, its estimated usage during its billing period, and an estimation of how much bandwidth it will use during its billing period based on its current usage. A server's projected bandwidth usage increases in accuracy as it progresses through its billing period. func (r Hardware_Server) GetPrivateBandwidthDataSummary() (resp datatypes.Container_Network_Bandwidth_Data_Summary, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPrivateBandwidthDataSummary", nil, &r.Options, &resp) @@ -20196,30 +9938,6 @@ func (r Hardware_Server) GetProcessors() (resp []datatypes.Hardware_Component, e return } -func (r Hardware_Server) GetProcessorsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getProcessors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getProcessors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether the bandwidth usage for this hardware for the current billing cycle is projected to exceed the allocation. func (r Hardware_Server) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) @@ -20234,45 +9952,17 @@ func (r Hardware_Server) GetProjectedPublicBandwidthUsage() (resp datatypes.Floa // no documentation yet func (r Hardware_Server) GetProvisionDate() (resp datatypes.Time, err error) { - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getProvisionDate", nil, &r.Options, &resp) - return -} - -// Retrieve a graph of a server's public network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPublicBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. -func (r Hardware_Server) GetPublicBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startTime, - endTime, - } - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPublicBandwidthData", params, &r.Options, &resp) + err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getProvisionDate", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetPublicBandwidthDataIter(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { +// Retrieve a graph of a server's public network bandwidth usage over the specified timeframe. If no timeframe is specified then getPublicBandwidthGraphImage retrieves the last 24 hours of public bandwidth usage. getPublicBandwidthGraphImage returns a PNG image measuring 827 pixels by 293 pixels. +func (r Hardware_Server) GetPublicBandwidthData(startTime *int, endTime *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ startTime, endTime, } - limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPublicBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getPublicBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -20335,30 +10025,6 @@ func (r Hardware_Server) GetRaidControllers() (resp []datatypes.Hardware_Compone return } -func (r Hardware_Server) GetRaidControllersIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRaidControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRaidControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determine if hardware object is vSan Ready Node. func (r Hardware_Server) GetReadyNodeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getReadyNodeFlag", nil, &r.Options, &resp) @@ -20371,60 +10037,12 @@ func (r Hardware_Server) GetRecentEvents() (resp []datatypes.Notification_Occurr return } -func (r Hardware_Server) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The last five commands issued to the server's remote management card. func (r Hardware_Server) GetRecentRemoteManagementCommands() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetRecentRemoteManagementCommandsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentRemoteManagementCommands", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRecentRemoteManagementCommands", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRegionalInternetRegistry", nil, &r.Options, &resp) @@ -20443,30 +10061,6 @@ func (r Hardware_Server) GetRemoteManagementAccounts() (resp []datatypes.Hardwar return } -func (r Hardware_Server) GetRemoteManagementAccountsIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's associated remote management component. This is normally IPMI. func (r Hardware_Server) GetRemoteManagementComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementComponent", nil, &r.Options, &resp) @@ -20479,270 +10073,54 @@ func (r Hardware_Server) GetRemoteManagementUsers() (resp []datatypes.Hardware_C return } -func (r Hardware_Server) GetRemoteManagementUsersIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRemoteManagementUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetResourceConfigurations() (resp []datatypes.Hardware_Resource_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceConfigurations", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetResourceConfigurationsIter() (resp []datatypes.Hardware_Resource_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceConfigurations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Resource_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceConfigurations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetResourceGroupMemberReferences() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupMemberReferences", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetResourceGroupMemberReferencesIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupMemberReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupMemberReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetResourceGroupRoles() (resp []datatypes.Resource_Group_Role, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupRoles", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetResourceGroupRolesIter() (resp []datatypes.Resource_Group_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroupRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The resource groups in which this hardware is a member. func (r Hardware_Server) GetResourceGroups() (resp []datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroups", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetResourceGroupsIter() (resp []datatypes.Resource_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getResourceGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the reverse domain records associated with this server. func (r Hardware_Server) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getReverseDomainRecords", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getReverseDomainRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getReverseDomainRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A hardware's routers. func (r Hardware_Server) GetRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRouters", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding a piece of hardware's vulnerability scan requests. func (r Hardware_Server) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSecurityScanRequests", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSecurityScanRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Security_Scanner_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSecurityScanRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures system temperatures, voltages, and other local server settings. Sensor data is cached for 30 seconds. Calls made to getSensorData for the same server within 30 seconds of each other will return the same data. Subsequent calls will return new data once the cache expires. func (r Hardware_Server) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSensorData", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetSensorDataIter() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSensorData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_SensorReading{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSensorData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the raw data returned from the server's remote management card. For more details of what is returned please refer to the getSensorData method. Along with the raw data, graphs for the cpu and system temperatures and fan speeds are also returned. func (r Hardware_Server) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSensorDataWithGraphs", nil, &r.Options, &resp) @@ -20761,30 +10139,6 @@ func (r Hardware_Server) GetServerFanSpeedGraphs() (resp []datatypes.Container_R return } -func (r Hardware_Server) GetServerFanSpeedGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerFanSpeedGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorSpeed{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerFanSpeedGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the power state for the server. The server's power status is retrieved from its remote management card. This will return 'on' or 'off'. func (r Hardware_Server) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerPowerState", nil, &r.Options, &resp) @@ -20803,30 +10157,6 @@ func (r Hardware_Server) GetServerTemperatureGraphs() (resp []datatypes.Containe return } -func (r Hardware_Server) GetServerTemperatureGraphsIter() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerTemperatureGraphs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_RemoteManagement_Graphs_SensorTemperature{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServerTemperatureGraphs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the piece of hardware's service provider. func (r Hardware_Server) GetServiceProvider() (resp datatypes.Service_Provider, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getServiceProvider", nil, &r.Options, &resp) @@ -20839,30 +10169,6 @@ func (r Hardware_Server) GetSoftwareComponents() (resp []datatypes.Software_Comp return } -func (r Hardware_Server) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSoftwareComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSoftwareComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determine if hardware object has Software Guard Extension (SGX) enabled. func (r Hardware_Server) GetSoftwareGuardExtensionEnabled() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSoftwareGuardExtensionEnabled", nil, &r.Options, &resp) @@ -20881,30 +10187,6 @@ func (r Hardware_Server) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err er return } -func (r Hardware_Server) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A server's remote management card used for statistics. func (r Hardware_Server) GetStatisticsRemoteManagement() (resp datatypes.Hardware_Component_RemoteManagement, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStatisticsRemoteManagement", nil, &r.Options, &resp) @@ -20917,90 +10199,18 @@ func (r Hardware_Server) GetStorageGroups() (resp []datatypes.Configuration_Stor return } -func (r Hardware_Server) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's private storage network components. [Deprecated] func (r Hardware_Server) GetStorageNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageNetworkComponents", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetStorageNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getStorageNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTagReferences", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Hardware_Server) GetTopLevelLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTopLevelLocation", nil, &r.Options, &resp) @@ -21013,30 +10223,6 @@ func (r Hardware_Server) GetTransactionHistory() (resp []datatypes.Provisioning_ return } -func (r Hardware_Server) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTransactionHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTransactionHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether to use UEFI boot instead of BIOS. func (r Hardware_Server) GetUefiBootFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUefiBootFlag", nil, &r.Options, &resp) @@ -21049,30 +10235,6 @@ func (r Hardware_Server) GetUpgradeItemPrices() (resp []datatypes.Product_Item_P return } -func (r Hardware_Server) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An account's associated upgrade request object, if any. func (r Hardware_Server) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeRequest", nil, &r.Options, &resp) @@ -21085,30 +10247,6 @@ func (r Hardware_Server) GetUpgradeableActiveComponents() (resp []datatypes.Hard return } -func (r Hardware_Server) GetUpgradeableActiveComponentsIter() (resp []datatypes.Hardware_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeableActiveComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUpgradeableActiveComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network device connected to a piece of hardware. func (r Hardware_Server) GetUplinkHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUplinkHardware", nil, &r.Options, &resp) @@ -21121,90 +10259,18 @@ func (r Hardware_Server) GetUplinkNetworkComponents() (resp []datatypes.Network_ return } -func (r Hardware_Server) GetUplinkNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUplinkNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUplinkNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An array containing a single string of custom user data for a hardware order. Max size is 16 kb. func (r Hardware_Server) GetUserData() (resp []datatypes.Hardware_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUserData", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetUserDataIter() (resp []datatypes.Hardware_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUserData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUserData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A list of users that have access to this computing instance. func (r Hardware_Server) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUsers", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return the list of block device template groups that are valid to the host. For instance, it will only retrieve FLEX images. func (r Hardware_Server) GetValidBlockDeviceTemplateGroups(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { params := []interface{}{ @@ -21214,33 +10280,6 @@ func (r Hardware_Server) GetValidBlockDeviceTemplateGroups(visibility *string) ( return } -func (r Hardware_Server) GetValidBlockDeviceTemplateGroupsIter(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - params := []interface{}{ - visibility, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getValidBlockDeviceTemplateGroups", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the virtual chassis for a piece of hardware. func (r Hardware_Server) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualChassis", nil, &r.Options, &resp) @@ -21253,60 +10292,12 @@ func (r Hardware_Server) GetVirtualChassisSiblings() (resp []datatypes.Hardware, return } -func (r Hardware_Server) GetVirtualChassisSiblingsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualChassisSiblings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualChassisSiblings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [DEPRECATED] A hardware server's virtual servers. func (r Hardware_Server) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualGuests", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A piece of hardware's virtual host record. func (r Hardware_Server) GetVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualHost", nil, &r.Options, &resp) @@ -21319,30 +10310,6 @@ func (r Hardware_Server) GetVirtualLicenses() (resp []datatypes.Software_Virtual return } -func (r Hardware_Server) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_VirtualLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the bandwidth allotment to which a piece of hardware belongs. func (r Hardware_Server) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getVirtualRack", nil, &r.Options, &resp) @@ -21373,60 +10340,12 @@ func (r Hardware_Server) GetWindowsUpdateAvailableUpdates() (resp []datatypes.Co return } -func (r Hardware_Server) GetWindowsUpdateAvailableUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateAvailableUpdates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateAvailableUpdates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a list of Windows updates installed on a server as reported by the local SoftLayer Windows Server Update Services (WSUS) server. Windows servers provisioned by SoftLayer are configured to use the local WSUS server via the private network by default. func (r Hardware_Server) GetWindowsUpdateInstalledUpdates() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) return } -func (r Hardware_Server) GetWindowsUpdateInstalledUpdatesIter() (resp []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateInstalledUpdates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_Microsoft_Windows_UpdateServices_UpdateItem{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateInstalledUpdates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns an update status record for this server. That record will specify if the server is missing updates, or has updates that must be reinstalled or require a reboot to go into affect. func (r Hardware_Server) GetWindowsUpdateStatus() (resp datatypes.Container_Utility_Microsoft_Windows_UpdateServices_Status, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getWindowsUpdateStatus", nil, &r.Options, &resp) @@ -21483,36 +10402,6 @@ func (r Hardware_Server) MassFirmwareReflash(hardwareIds []int, ipmi *bool, raid return } -func (r Hardware_Server) MassFirmwareReflashIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - ipmi, - raidController, - bios, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massFirmwareReflash", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massFirmwareReflash", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // You can launch firmware updates by selecting from your server list. It will bring your server offline for approximately 20 minutes while the updates are in progress. // // In the event of a hardware failure during this test our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online, and will be contacting you to ensure that impact on your server is minimal. @@ -21529,38 +10418,6 @@ func (r Hardware_Server) MassFirmwareUpdate(hardwareIds []int, ipmi *bool, raidC return } -func (r Hardware_Server) MassFirmwareUpdateIter(hardwareIds []int, ipmi *bool, raidController *bool, bios *bool, harddrive *bool, networkCard *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - ipmi, - raidController, - bios, - harddrive, - networkCard, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massFirmwareUpdate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massFirmwareUpdate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // You can launch hyper-threading update by selecting from your server list. It will bring your server offline for approximately 60 minutes while the updates are in progress. // // In the event of a hardware failure during this update our datacenter engineers will be notified of the problem automatically. They will then replace any failed components to bring your server back online. They will be in contact with you to ensure that impact on your server is minimal. @@ -21573,34 +10430,6 @@ func (r Hardware_Server) MassHyperThreadingUpdate(hardwareIds []int, disableHype return } -func (r Hardware_Server) MassHyperThreadingUpdateIter(hardwareIds []int, disableHyperthreading *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - disableHyperthreading, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massHyperThreadingUpdate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massHyperThreadingUpdate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Reloads current or customer specified operating system configuration. // // This service has a confirmation protocol for proceeding with the reload. To proceed with the reload without confirmation, simply pass in 'FORCE' as the token parameter. To proceed with the reload with confirmation, simply call the service with no parameter. A token string will be returned by this service. The token will remain active for 10 minutes. Use this token as the parameter to confirm that a reload is to be performed for the server. @@ -21629,35 +10458,6 @@ func (r Hardware_Server) MassSparePool(hardwareIds []string, action *string, new return } -func (r Hardware_Server) MassSparePoolIter(hardwareIds []string, action *string, newOrder *bool) (resp []datatypes.Container_Hardware_Server_Request, err error) { - params := []interface{}{ - hardwareIds, - action, - newOrder, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massSparePool", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Hardware_Server_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "massSparePool", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Issues a ping command to the server and returns the ping response. func (r Hardware_Server) Ping() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "ping", nil, &r.Options, &resp) @@ -21857,33 +10657,6 @@ func (r Hardware_Server) SetUserMetadata(metadata []string) (resp []datatypes.Ha return } -func (r Hardware_Server) SetUserMetadataIter(metadata []string) (resp []datatypes.Hardware_Attribute, err error) { - params := []interface{}{ - metadata, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "setUserMetadata", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Hardware_Server", "setUserMetadata", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Disconnect a server's private network interface. This operation is an alias for calling [[SoftLayer_Hardware_Server/setPrivateNetworkInterfaceSpeed]] with a $newSpeed of 0 and unspecified $redundancy. // // Receipt of a response does not indicate completion of the configuration change. Any subsequent attempts to request the interface change speed or state, while changes are pending, will result in a busy error. diff --git a/services/layout.go b/services/layout.go index 70d78e9..14373c6 100644 --- a/services/layout.go +++ b/services/layout.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,30 +68,6 @@ func (r Layout_Container) GetAllObjects() (resp []datatypes.Layout_Container, er return } -func (r Layout_Container) GetAllObjectsIter() (resp []datatypes.Layout_Container, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Container", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Container{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Container", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type of the layout container object func (r Layout_Container) GetLayoutContainerType() (resp datatypes.Layout_Container_Type, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Container", "getLayoutContainerType", nil, &r.Options, &resp) @@ -105,30 +80,6 @@ func (r Layout_Container) GetLayoutItems() (resp []datatypes.Layout_Item, err er return } -func (r Layout_Container) GetLayoutItemsIter() (resp []datatypes.Layout_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Container", "getLayoutItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Container", "getLayoutItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Layout_Container) GetObject() (resp datatypes.Layout_Container, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Container", "getObject", nil, &r.Options, &resp) @@ -181,30 +132,6 @@ func (r Layout_Item) GetLayoutItemPreferences() (resp []datatypes.Layout_Prefere return } -func (r Layout_Item) GetLayoutItemPreferencesIter() (resp []datatypes.Layout_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Item", "getLayoutItemPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Item", "getLayoutItemPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type of the layout item object func (r Layout_Item) GetLayoutItemType() (resp datatypes.Layout_Item_Type, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Item", "getLayoutItemType", nil, &r.Options, &resp) @@ -287,60 +214,12 @@ func (r Layout_Profile) GetLayoutContainers() (resp []datatypes.Layout_Container return } -func (r Layout_Profile) GetLayoutContainersIter() (resp []datatypes.Layout_Container, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutContainers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Container{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutContainers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Layout_Profile) GetLayoutPreferences() (resp []datatypes.Layout_Profile_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutPreferences", nil, &r.Options, &resp) return } -func (r Layout_Profile) GetLayoutPreferencesIter() (resp []datatypes.Layout_Profile_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Layout_Profile) GetObject() (resp datatypes.Layout_Profile, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getObject", nil, &r.Options, &resp) @@ -369,33 +248,6 @@ func (r Layout_Profile) ModifyPreferences(layoutPreferenceObjects []datatypes.La return } -func (r Layout_Profile) ModifyPreferencesIter(layoutPreferenceObjects []datatypes.Layout_Profile_Preference) (resp []datatypes.Layout_Profile_Preference, err error) { - params := []interface{}{ - layoutPreferenceObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Profile", "modifyPreferences", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Profile", "modifyPreferences", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Layout_Profile_Containers struct { Session session.SLSession @@ -542,60 +394,12 @@ func (r Layout_Profile_Customer) GetLayoutContainers() (resp []datatypes.Layout_ return } -func (r Layout_Profile_Customer) GetLayoutContainersIter() (resp []datatypes.Layout_Container, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutContainers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Container{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutContainers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Layout_Profile_Customer) GetLayoutPreferences() (resp []datatypes.Layout_Profile_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutPreferences", nil, &r.Options, &resp) return } -func (r Layout_Profile_Customer) GetLayoutPreferencesIter() (resp []datatypes.Layout_Profile_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Layout_Profile_Customer) GetObject() (resp datatypes.Layout_Profile_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getObject", nil, &r.Options, &resp) @@ -630,33 +434,6 @@ func (r Layout_Profile_Customer) ModifyPreferences(layoutPreferenceObjects []dat return } -func (r Layout_Profile_Customer) ModifyPreferencesIter(layoutPreferenceObjects []datatypes.Layout_Profile_Preference) (resp []datatypes.Layout_Profile_Preference, err error) { - params := []interface{}{ - layoutPreferenceObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "modifyPreferences", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "modifyPreferences", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Layout_Profile_Preference contains definitions for layout preferences type Layout_Profile_Preference struct { Session session.SLSession diff --git a/services/locale.go b/services/locale.go index f9bf5b8..48dfe38 100644 --- a/services/locale.go +++ b/services/locale.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -124,90 +123,18 @@ func (r Locale_Country) GetAllVatCountryCodesAndVatIdRegexes() (resp []datatypes return } -func (r Locale_Country) GetAllVatCountryCodesAndVatIdRegexesIter() (resp []datatypes.Container_Collection_Locale_VatCountryCodeAndFormat, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAllVatCountryCodesAndVatIdRegexes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Collection_Locale_VatCountryCodeAndFormat{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAllVatCountryCodesAndVatIdRegexes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method to retrieve a list of countries and locale information available to the current user. func (r Locale_Country) GetAvailableCountries() (resp []datatypes.Locale_Country, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAvailableCountries", nil, &r.Options, &resp) return } -func (r Locale_Country) GetAvailableCountriesIter() (resp []datatypes.Locale_Country, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAvailableCountries", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Locale_Country{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAvailableCountries", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method to retrieve a list of countries and locale information such as country code and state/provinces. func (r Locale_Country) GetCountries() (resp []datatypes.Locale_Country, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountries", nil, &r.Options, &resp) return } -func (r Locale_Country) GetCountriesIter() (resp []datatypes.Locale_Country, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountries", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Locale_Country{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountries", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return a collection of [[SoftLayer_Container_Collection_Locale_CountryCode]] objects. If the country has states, a [[SoftLayer_Container_Collection_Locale_StateCode]] collection will be provided with the country. func (r Locale_Country) GetCountriesAndStates(usFirstFlag *bool) (resp []datatypes.Container_Collection_Locale_CountryCode, err error) { params := []interface{}{ @@ -217,33 +144,6 @@ func (r Locale_Country) GetCountriesAndStates(usFirstFlag *bool) (resp []datatyp return } -func (r Locale_Country) GetCountriesAndStatesIter(usFirstFlag *bool) (resp []datatypes.Container_Collection_Locale_CountryCode, err error) { - params := []interface{}{ - usFirstFlag, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountriesAndStates", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Collection_Locale_CountryCode{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountriesAndStates", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Locale_Country) GetObject() (resp datatypes.Locale_Country, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getObject", nil, &r.Options, &resp) @@ -256,120 +156,24 @@ func (r Locale_Country) GetPostalCodeRequiredCountryCodes() (resp []string, err return } -func (r Locale_Country) GetPostalCodeRequiredCountryCodesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getPostalCodeRequiredCountryCodes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getPostalCodeRequiredCountryCodes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve States that belong to this country. func (r Locale_Country) GetStates() (resp []datatypes.Locale_StateProvince, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getStates", nil, &r.Options, &resp) return } -func (r Locale_Country) GetStatesIter() (resp []datatypes.Locale_StateProvince, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getStates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Locale_StateProvince{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getStates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return an array of ISO 3166 Alpha-2 country codes that use a Value-Added Tax (VAT) ID. Note the difference between [[SoftLayer_Locale_Country/getVatRequiredCountryCodes]] - this method will provide all country codes that use VAT ID, including those which are required. func (r Locale_Country) GetVatCountries() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatCountries", nil, &r.Options, &resp) return } -func (r Locale_Country) GetVatCountriesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatCountries", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatCountries", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return an array of ISO 3166 Alpha-2 country codes that use a Value-Added Tax (VAT) ID. Note the difference between [[SoftLayer_Locale_Country/getVatCountries]] - this method will provide country codes where a VAT ID is required for onboarding to IBM Cloud. func (r Locale_Country) GetVatRequiredCountryCodes() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatRequiredCountryCodes", nil, &r.Options, &resp) return } -func (r Locale_Country) GetVatRequiredCountryCodesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatRequiredCountryCodes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Country", "getVatRequiredCountryCodes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns true if the country code is in the European Union (EU), false otherwise. func (r Locale_Country) IsEuropeanUnionCountry(iso2CountryCode *string) (resp bool, err error) { params := []interface{}{ @@ -425,30 +229,6 @@ func (r Locale_Timezone) GetAllObjects() (resp []datatypes.Locale_Timezone, err return } -func (r Locale_Timezone) GetAllObjectsIter() (resp []datatypes.Locale_Timezone, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Locale_Timezone", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Locale_Timezone{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Locale_Timezone", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Locale_Timezone object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Locale_Timezone service. func (r Locale_Timezone) GetObject() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_Locale_Timezone", "getObject", nil, &r.Options, &resp) diff --git a/services/location.go b/services/location.go index 30d42ba..0b48ee7 100644 --- a/services/location.go +++ b/services/location.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,90 +68,18 @@ func (r Location) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_Event return } -func (r Location) GetActivePresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getActivePresaleEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Sales_Presale_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getActivePresaleEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Object Storage is only available in select datacenters. This method will return all the datacenters where object storage is available. func (r Location) GetAvailableObjectStorageDatacenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp) return } -func (r Location) GetAvailableObjectStorageDatacentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getAvailableObjectStorageDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location) GetBackboneDependents() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getBackboneDependents", nil, &r.Options, &resp) return } -func (r Location) GetBackboneDependentsIter() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getBackboneDependents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Backbone_Location_Dependent{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getBackboneDependents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating whether or not the datacenter/location is BNPP compliant. func (r Location) GetBnppCompliantFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getBnppCompliantFlag", nil, &r.Options, &resp) @@ -165,60 +92,12 @@ func (r Location) GetDatacenters() (resp []datatypes.Location, err error) { return } -func (r Location) GetDatacentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Location) GetDatacentersWithVirtualImageStoreServiceResourceRecord() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp) return } -func (r Location) GetDatacentersWithVirtualImageStoreServiceResourceRecordIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating whether or not the datacenter/location is EU compliant. func (r Location) GetEuCompliantFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getEuCompliantFlag", nil, &r.Options, &resp) @@ -231,60 +110,12 @@ func (r Location) GetGroups() (resp []datatypes.Location_Group, err error) { return } -func (r Location) GetGroupsIter() (resp []datatypes.Location_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location) GetHardwareFirewalls() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getHardwareFirewalls", nil, &r.Options, &resp) return } -func (r Location) GetHardwareFirewallsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getHardwareFirewalls", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getHardwareFirewalls", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A location's physical address. func (r Location) GetLocationAddress() (resp datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddress", nil, &r.Options, &resp) @@ -297,30 +128,6 @@ func (r Location) GetLocationAddresses() (resp []datatypes.Account_Address, err return } -func (r Location) GetLocationAddressesIter() (resp []datatypes.Account_Address, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Address{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A location's Dedicated Rack member func (r Location) GetLocationReservationMember() (resp datatypes.Location_Reservation_Rack_Member, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getLocationReservationMember", nil, &r.Options, &resp) @@ -363,60 +170,12 @@ func (r Location) GetPriceGroups() (resp []datatypes.Location_Group, err error) return } -func (r Location) GetPriceGroupsIter() (resp []datatypes.Location_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getPriceGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getPriceGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A location can be a member of 1 or more regions. This will show which regions to which a location belongs. func (r Location) GetRegions() (resp []datatypes.Location_Region, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getRegions", nil, &r.Options, &resp) return } -func (r Location) GetRegionsIter() (resp []datatypes.Location_Region, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getRegions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Region{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getRegions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location) GetTimezone() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getTimezone", nil, &r.Options, &resp) @@ -435,120 +194,24 @@ func (r Location) GetViewableDatacenters() (resp []datatypes.Location, err error return } -func (r Location) GetViewableDatacentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getViewableDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getViewableDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve all viewable pop and datacenter locations. func (r Location) GetViewablePopsAndDataCenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getViewablePopsAndDataCenters", nil, &r.Options, &resp) return } -func (r Location) GetViewablePopsAndDataCentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getViewablePopsAndDataCenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getViewablePopsAndDataCenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve all viewable network locations. func (r Location) GetViewablepointOfPresence() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getViewablepointOfPresence", nil, &r.Options, &resp) return } -func (r Location) GetViewablepointOfPresenceIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getViewablepointOfPresence", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getViewablepointOfPresence", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve all point of presence locations. func (r Location) GetpointOfPresence() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location", "getpointOfPresence", nil, &r.Options, &resp) return } -func (r Location) GetpointOfPresenceIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location", "getpointOfPresence", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location", "getpointOfPresence", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // SoftLayer_Location_Datacenter extends the [[SoftLayer_Location]] data type to include datacenter-specific properties. type Location_Datacenter struct { Session session.SLSession @@ -595,150 +258,30 @@ func (r Location_Datacenter) GetActiveItemPresaleEvents() (resp []datatypes.Sale return } -func (r Location_Datacenter) GetActiveItemPresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActiveItemPresaleEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Sales_Presale_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActiveItemPresaleEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location_Datacenter) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActivePresaleEvents", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetActivePresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActivePresaleEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Sales_Presale_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActivePresaleEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Object Storage is only available in select datacenters. This method will return all the datacenters where object storage is available. func (r Location_Datacenter) GetAvailableObjectStorageDatacenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetAvailableObjectStorageDatacentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getAvailableObjectStorageDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location_Datacenter) GetBackboneDependents() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackboneDependents", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetBackboneDependentsIter() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackboneDependents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Backbone_Location_Dependent{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackboneDependents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location_Datacenter) GetBackendHardwareRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackendHardwareRouters", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetBackendHardwareRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackendHardwareRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackendHardwareRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating whether or not the datacenter/location is BNPP compliant. func (r Location_Datacenter) GetBnppCompliantFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBnppCompliantFlag", nil, &r.Options, &resp) @@ -751,120 +294,24 @@ func (r Location_Datacenter) GetBoundSubnets() (resp []datatypes.Network_Subnet, return } -func (r Location_Datacenter) GetBoundSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBoundSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBoundSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain. func (r Location_Datacenter) GetBrandCountryRestrictions() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBrandCountryRestrictions", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetBrandCountryRestrictionsIter() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBrandCountryRestrictions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Brand_Restriction_Location_CustomerCountry{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBrandCountryRestrictions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure. func (r Location_Datacenter) GetDatacenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacenters", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetDatacentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Location_Datacenter) GetDatacentersWithVirtualImageStoreServiceResourceRecord() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetDatacentersWithVirtualImageStoreServiceResourceRecordIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating whether or not the datacenter/location is EU compliant. func (r Location_Datacenter) GetEuCompliantFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getEuCompliantFlag", nil, &r.Options, &resp) @@ -877,120 +324,24 @@ func (r Location_Datacenter) GetFrontendHardwareRouters() (resp []datatypes.Hard return } -func (r Location_Datacenter) GetFrontendHardwareRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getFrontendHardwareRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getFrontendHardwareRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A location can be a member of 1 or more groups. This will show which groups to which a location belongs. func (r Location_Datacenter) GetGroups() (resp []datatypes.Location_Group, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getGroups", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetGroupsIter() (resp []datatypes.Location_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location_Datacenter) GetHardwareFirewalls() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareFirewalls", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetHardwareFirewallsIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareFirewalls", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareFirewalls", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location_Datacenter) GetHardwareRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareRouters", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetHardwareRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A location's physical address. func (r Location_Datacenter) GetLocationAddress() (resp datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddress", nil, &r.Options, &resp) @@ -1003,30 +354,6 @@ func (r Location_Datacenter) GetLocationAddresses() (resp []datatypes.Account_Ad return } -func (r Location_Datacenter) GetLocationAddressesIter() (resp []datatypes.Account_Address, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Address{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A location's Dedicated Rack member func (r Location_Datacenter) GetLocationReservationMember() (resp datatypes.Location_Reservation_Rack_Member, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationReservationMember", nil, &r.Options, &resp) @@ -1069,60 +396,12 @@ func (r Location_Datacenter) GetPresaleEvents() (resp []datatypes.Sales_Presale_ return } -func (r Location_Datacenter) GetPresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPresaleEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Sales_Presale_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPresaleEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A location can be a member of 1 or more Price Groups. This will show which groups to which a location belongs. func (r Location_Datacenter) GetPriceGroups() (resp []datatypes.Location_Group, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPriceGroups", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetPriceGroupsIter() (resp []datatypes.Location_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPriceGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPriceGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The regional group this datacenter belongs to. func (r Location_Datacenter) GetRegionalGroup() (resp datatypes.Location_Group_Regional, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegionalGroup", nil, &r.Options, &resp) @@ -1141,60 +420,12 @@ func (r Location_Datacenter) GetRegions() (resp []datatypes.Location_Region, err return } -func (r Location_Datacenter) GetRegionsIter() (resp []datatypes.Location_Region, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Region{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Retrieve all subnets that are eligible to be routed; those which the account has permission to associate with a vlan. func (r Location_Datacenter) GetRoutableBoundSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRoutableBoundSubnets", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetRoutableBoundSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRoutableBoundSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRoutableBoundSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a graph of a SoftLayer datacenter's last 48 hours of network activity. Statistics graphs show traffic outbound from a datacenter on top and inbound traffic on the bottom followed by a legend of the network services tracked in the graph. getStatisticsGraphImage returns a PNG image of variable width and height depending on the number of services reported in the image. func (r Location_Datacenter) GetStatisticsGraphImage() (resp []byte, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getStatisticsGraphImage", nil, &r.Options, &resp) @@ -1219,120 +450,24 @@ func (r Location_Datacenter) GetViewableDatacenters() (resp []datatypes.Location return } -func (r Location_Datacenter) GetViewableDatacentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewableDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewableDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve all viewable pop and datacenter locations. func (r Location_Datacenter) GetViewablePopsAndDataCenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablePopsAndDataCenters", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetViewablePopsAndDataCentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablePopsAndDataCenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablePopsAndDataCenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve all viewable network locations. func (r Location_Datacenter) GetViewablepointOfPresence() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablepointOfPresence", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetViewablepointOfPresenceIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablepointOfPresence", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablepointOfPresence", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve all point of presence locations. func (r Location_Datacenter) GetpointOfPresence() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getpointOfPresence", nil, &r.Options, &resp) return } -func (r Location_Datacenter) GetpointOfPresenceIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getpointOfPresence", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getpointOfPresence", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Location_Group struct { Session session.SLSession @@ -1379,30 +514,6 @@ func (r Location_Group) GetAllObjects() (resp []datatypes.Location_Group, err er return } -func (r Location_Group) GetAllObjectsIter() (resp []datatypes.Location_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Group", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Group", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type for this location group. func (r Location_Group) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocationGroupType", nil, &r.Options, &resp) @@ -1415,30 +526,6 @@ func (r Location_Group) GetLocations() (resp []datatypes.Location, err error) { return } -func (r Location_Group) GetLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Location_Group) GetObject() (resp datatypes.Location_Group, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group", "getObject", nil, &r.Options, &resp) @@ -1491,30 +578,6 @@ func (r Location_Group_Pricing) GetAllObjects() (resp []datatypes.Location_Group return } -func (r Location_Group_Pricing) GetAllObjectsIter() (resp []datatypes.Location_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type for this location group. func (r Location_Group_Pricing) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocationGroupType", nil, &r.Options, &resp) @@ -1527,30 +590,6 @@ func (r Location_Group_Pricing) GetLocations() (resp []datatypes.Location, err e return } -func (r Location_Group_Pricing) GetLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Location_Group_Pricing) GetObject() (resp datatypes.Location_Group_Pricing, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getObject", nil, &r.Options, &resp) @@ -1563,30 +602,6 @@ func (r Location_Group_Pricing) GetPrices() (resp []datatypes.Product_Item_Price return } -func (r Location_Group_Pricing) GetPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Location_Group_Regional struct { Session session.SLSession @@ -1633,60 +648,12 @@ func (r Location_Group_Regional) GetAllObjects() (resp []datatypes.Location_Grou return } -func (r Location_Group_Regional) GetAllObjectsIter() (resp []datatypes.Location_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The datacenters in a group. func (r Location_Group_Regional) GetDatacenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getDatacenters", nil, &r.Options, &resp) return } -func (r Location_Group_Regional) GetDatacentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type for this location group. func (r Location_Group_Regional) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocationGroupType", nil, &r.Options, &resp) @@ -1699,30 +666,6 @@ func (r Location_Group_Regional) GetLocations() (resp []datatypes.Location, err return } -func (r Location_Group_Regional) GetLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Location_Group_Regional) GetObject() (resp datatypes.Location_Group_Regional, err error) { err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getObject", nil, &r.Options, &resp) @@ -1787,30 +730,6 @@ func (r Location_Reservation) GetAccountReservations() (resp []datatypes.Locatio return } -func (r Location_Reservation) GetAccountReservationsIter() (resp []datatypes.Location_Reservation, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAccountReservations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Reservation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAccountReservations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The bandwidth allotment that the reservation belongs to. func (r Location_Reservation) GetAllotment() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAllotment", nil, &r.Options, &resp) @@ -1893,30 +812,6 @@ func (r Location_Reservation_Rack) GetChildren() (resp []datatypes.Location_Rese return } -func (r Location_Reservation_Rack) GetChildrenIter() (resp []datatypes.Location_Reservation_Rack_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Reservation_Rack_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Location_Reservation_Rack) GetLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getLocation", nil, &r.Options, &resp) diff --git a/services/marketplace.go b/services/marketplace.go index 60f9e63..75d98b3 100644 --- a/services/marketplace.go +++ b/services/marketplace.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,30 +68,6 @@ func (r Marketplace_Partner) GetAllObjects() (resp []datatypes.Marketplace_Partn return } -func (r Marketplace_Partner) GetAllObjectsIter() (resp []datatypes.Marketplace_Partner, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Marketplace_Partner{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Marketplace_Partner) GetAllPublishedPartners(searchTerm *string) (resp []datatypes.Marketplace_Partner, err error) { params := []interface{}{ @@ -102,63 +77,12 @@ func (r Marketplace_Partner) GetAllPublishedPartners(searchTerm *string) (resp [ return } -func (r Marketplace_Partner) GetAllPublishedPartnersIter(searchTerm *string) (resp []datatypes.Marketplace_Partner, err error) { - params := []interface{}{ - searchTerm, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllPublishedPartners", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Marketplace_Partner{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllPublishedPartners", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Marketplace_Partner) GetAttachments() (resp []datatypes.Marketplace_Partner_Attachment, err error) { err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAttachments", nil, &r.Options, &resp) return } -func (r Marketplace_Partner) GetAttachmentsIter() (resp []datatypes.Marketplace_Partner_Attachment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAttachments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Marketplace_Partner_Attachment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAttachments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Marketplace_Partner) GetFeaturedPartners(non *bool) (resp []datatypes.Marketplace_Partner, err error) { params := []interface{}{ @@ -168,33 +92,6 @@ func (r Marketplace_Partner) GetFeaturedPartners(non *bool) (resp []datatypes.Ma return } -func (r Marketplace_Partner) GetFeaturedPartnersIter(non *bool) (resp []datatypes.Marketplace_Partner, err error) { - params := []interface{}{ - non, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getFeaturedPartners", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Marketplace_Partner{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getFeaturedPartners", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Marketplace_Partner) GetFile(name *string) (resp datatypes.Marketplace_Partner_File, err error) { params := []interface{}{ diff --git a/services/metric.go b/services/metric.go index 7cf842c..ea5097d 100644 --- a/services/metric.go +++ b/services/metric.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -75,36 +74,6 @@ func (r Metric_Tracking_Object) GetBandwidthData(startDateTime *datatypes.Time, return } -func (r Metric_Tracking_Object) GetBandwidthDataIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, typ *string, rollupSeconds *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - typ, - rollupSeconds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getBandwidthData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getBandwidthData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a PNG image of a bandwidth graph representing the bandwidth usage over time recorded by SofTLayer's bandwidth pollers. func (r Metric_Tracking_Object) GetBandwidthGraph(startDateTime *datatypes.Time, endDateTime *datatypes.Time, graphType *string, fontSize *int, graphWidth *int, graphHeight *int, doNotShowTimeZone *bool) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -143,35 +112,6 @@ func (r Metric_Tracking_Object) GetDetailsForDateRange(startDate *datatypes.Time return } -func (r Metric_Tracking_Object) GetDetailsForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time, graphType []string) (resp []datatypes.Container_Metric_Tracking_Object_Details, err error) { - params := []interface{}{ - startDate, - endDate, - graphType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getDetailsForDateRange", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Metric_Tracking_Object_Details{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getDetailsForDateRange", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a PNG image of a metric in graph form. func (r Metric_Tracking_Object) GetGraph(startDateTime *datatypes.Time, endDateTime *datatypes.Time, graphType []string) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -189,30 +129,6 @@ func (r Metric_Tracking_Object) GetMetricDataTypes() (resp []datatypes.Container return } -func (r Metric_Tracking_Object) GetMetricDataTypesIter() (resp []datatypes.Container_Metric_Data_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getMetricDataTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Metric_Data_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getMetricDataTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Metric_Tracking_Object object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Metric_Tracking_Object service. You can only tracking objects that are associated with your SoftLayer account or services. func (r Metric_Tracking_Object) GetObject() (resp datatypes.Metric_Tracking_Object, err error) { err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getObject", nil, &r.Options, &resp) @@ -240,36 +156,6 @@ func (r Metric_Tracking_Object) GetSummaryData(startDateTime *datatypes.Time, en return } -func (r Metric_Tracking_Object) GetSummaryDataIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, validTypes []datatypes.Container_Metric_Data_Type, summaryPeriod *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - validTypes, - summaryPeriod, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getSummaryData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getSummaryData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type of data that a tracking object polls. func (r Metric_Tracking_Object) GetType() (resp datatypes.Metric_Tracking_Object_Type, err error) { err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getType", nil, &r.Options, &resp) diff --git a/services/network.go b/services/network.go index 51704f3..bfe239d 100644 --- a/services/network.go +++ b/services/network.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -211,35 +210,6 @@ func (r Network_Application_Delivery_Controller) GetBandwidthDataByDate(startDat return } -func (r Network_Application_Delivery_Controller) GetBandwidthDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, networkType *string) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - networkType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getBandwidthDataByDate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getBandwidthDataByDate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method when needing a bandwidth image for a single application delivery controller. It will gather the correct input parameters for the generic graphing utility based on the date ranges func (r Network_Application_Delivery_Controller) GetBandwidthImageByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time, networkType *string) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -263,30 +233,6 @@ func (r Network_Application_Delivery_Controller) GetConfigurationHistory() (resp return } -func (r Network_Application_Delivery_Controller) GetConfigurationHistoryIter() (resp []datatypes.Network_Application_Delivery_Controller_Configuration_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getConfigurationHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_Configuration_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getConfigurationHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The datacenter that the application delivery controller resides in. func (r Network_Application_Delivery_Controller) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getDatacenter", nil, &r.Options, &resp) @@ -330,30 +276,6 @@ func (r Network_Application_Delivery_Controller) GetLoadBalancers() (resp []data return } -func (r Network_Application_Delivery_Controller) GetLoadBalancersIter() (resp []datatypes.Network_LoadBalancer_VirtualIpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getLoadBalancers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LoadBalancer_VirtualIpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getLoadBalancers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating that this Application Delivery Controller is a managed resource. func (r Network_Application_Delivery_Controller) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -378,30 +300,6 @@ func (r Network_Application_Delivery_Controller) GetNetworkVlans() (resp []datat return } -func (r Network_Application_Delivery_Controller) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Network_Application_Delivery_Controller object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Application_Delivery_Controller service. You can only retrieve application delivery controllers that are associated with your SoftLayer customer account. func (r Network_Application_Delivery_Controller) GetObject() (resp datatypes.Network_Application_Delivery_Controller, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getObject", nil, &r.Options, &resp) @@ -438,60 +336,12 @@ func (r Network_Application_Delivery_Controller) GetSubnets() (resp []datatypes. return } -func (r Network_Application_Delivery_Controller) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getTagReferences", nil, &r.Options, &resp) return } -func (r Network_Application_Delivery_Controller) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller) GetType() (resp datatypes.Network_Application_Delivery_Controller_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getType", nil, &r.Options, &resp) @@ -504,30 +354,6 @@ func (r Network_Application_Delivery_Controller) GetVirtualIpAddresses() (resp [ return } -func (r Network_Application_Delivery_Controller) GetVirtualIpAddressesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getVirtualIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "getVirtualIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Restore an application delivery controller's base configuration state. The configuration will be set to what it was when initially provisioned. func (r Network_Application_Delivery_Controller) RestoreBaseConfiguration() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller", "restoreBaseConfiguration", nil, &r.Options, &resp) @@ -733,30 +559,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Ty return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type) GetAllObjectsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute_Type", "getObject", nil, &r.Options, &resp) @@ -809,30 +611,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetAt return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetAttributesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getObject", nil, &r.Options, &resp) @@ -845,30 +623,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetSe return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetServicesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getServices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getServices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check) GetType() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check", "getType", nil, &r.Options, &resp) @@ -921,30 +675,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type) return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type) GetAllObjectsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type", "getObject", nil, &r.Options, &resp) @@ -997,30 +727,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Method) Get return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Method) GetAllObjectsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Method, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Method", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Method{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Method", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Method) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Method, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Method", "getObject", nil, &r.Options, &resp) @@ -1073,30 +779,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Type) GetAl return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Type) GetAllObjectsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Routing_Type) GetObject() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Routing_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Routing_Type", "getObject", nil, &r.Options, &resp) @@ -1168,60 +850,12 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetGroupRe return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetGroupReferencesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group_CrossReference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroupReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group_CrossReference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroupReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetGroups() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroups", nil, &r.Options, &resp) return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetGroupsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetHealthCheck() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getHealthCheck", nil, &r.Options, &resp) @@ -1234,30 +868,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetHealthC return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetHealthChecksIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getHealthChecks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Health_Check{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getHealthChecks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service) GetIpAddress() (resp datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service", "getIpAddress", nil, &r.Options, &resp) @@ -1358,60 +968,12 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetS return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetServiceReferencesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group_CrossReference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServiceReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group_CrossReference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServiceReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetServices() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServices", nil, &r.Options, &resp) return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetServicesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getServices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetVirtualServer() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getVirtualServer", nil, &r.Options, &resp) @@ -1424,30 +986,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetV return } -func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) GetVirtualServersIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getVirtualServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "getVirtualServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Application_Delivery_Controller_LoadBalancer_Service_Group) KickAllConnections() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_Service_Group", "kickAllConnections", nil, &r.Options, &resp) @@ -1521,90 +1059,18 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) G return } -func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetApplicationDeliveryControllersIter() (resp []datatypes.Network_Application_Delivery_Controller, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getApplicationDeliveryControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getApplicationDeliveryControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Yields a list of the SSL/TLS encryption ciphers that are currently supported on this virtual IP address instance. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetAvailableSecureTransportCiphers() (resp []datatypes.Security_SecureTransportCipher, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportCiphers", nil, &r.Options, &resp) return } -func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetAvailableSecureTransportCiphersIter() (resp []datatypes.Security_SecureTransportCipher, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportCiphers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_SecureTransportCipher{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportCiphers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Yields a list of the secure communication protocols that are currently supported on this virtual IP address instance. The list of supported ciphers for each protocol is culled to match availability. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetAvailableSecureTransportProtocols() (resp []datatypes.Security_SecureTransportProtocol, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportProtocols", nil, &r.Options, &resp) return } -func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetAvailableSecureTransportProtocolsIter() (resp []datatypes.Security_SecureTransportProtocol, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportProtocols", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_SecureTransportProtocol{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getAvailableSecureTransportProtocols", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current billing item for the load balancer virtual IP. This is only valid when dedicatedFlag is false. This is an independent virtual IP, and if canceled, will only affect the associated virtual IP. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getBillingItem", nil, &r.Options, &resp) @@ -1635,30 +1101,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) G return } -func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetLoadBalancerHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getLoadBalancerHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getLoadBalancerHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag indicating that the load balancer is a managed resource. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetManagedResourceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getManagedResourceFlag", nil, &r.Options, &resp) @@ -1677,60 +1119,12 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) G return } -func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetSecureTransportCiphersIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportCipher, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportCiphers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportCipher{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportCiphers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The list of secure transport protocols enabled for this virtual IP address func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetSecureTransportProtocols() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportProtocol, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportProtocols", nil, &r.Options, &resp) return } -func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetSecureTransportProtocolsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportProtocol, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportProtocols", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress_SecureTransportProtocol{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecureTransportProtocols", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SSL certificate currently associated with the VIP. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetSecurityCertificate() (resp datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getSecurityCertificate", nil, &r.Options, &resp) @@ -1749,30 +1143,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) G return } -func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) GetVirtualServersIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getVirtualServers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualServer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "getVirtualServers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Start SSL acceleration on all SSL virtual services (those with a type of HTTPS). This action should be taken only after configuring an SSL certificate for the virtual IP. func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress) StartSsl() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress", "startSsl", nil, &r.Options, &resp) @@ -1856,30 +1226,6 @@ func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualServer) GetS return } -func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualServer) GetServiceGroupsIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualServer", "getServiceGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_Service_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualServer", "getServiceGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Application_Delivery_Controller_LoadBalancer_VirtualServer) GetVirtualIpAddress() (resp datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualServer", "getVirtualIpAddress", nil, &r.Options, &resp) @@ -1946,30 +1292,6 @@ func (r Network_Backbone) GetAllBackbones() (resp []datatypes.Network_Backbone, return } -func (r Network_Backbone) GetAllBackbonesIter() (resp []datatypes.Network_Backbone, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getAllBackbones", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Backbone{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getAllBackbones", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a list of all SoftLayer backbone connections for a location name. func (r Network_Backbone) GetBackbonesForLocationName(locationName *string) (resp []datatypes.Network_Backbone, err error) { params := []interface{}{ @@ -1979,33 +1301,6 @@ func (r Network_Backbone) GetBackbonesForLocationName(locationName *string) (res return } -func (r Network_Backbone) GetBackbonesForLocationNameIter(locationName *string) (resp []datatypes.Network_Backbone, err error) { - params := []interface{}{ - locationName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getBackbonesForLocationName", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Backbone{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getBackbonesForLocationName", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A backbone's status. func (r Network_Backbone) GetHealth() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Backbone", "getHealth", nil, &r.Options, &resp) @@ -2076,30 +1371,6 @@ func (r Network_Backbone_Location_Dependent) GetAllObjects() (resp []datatypes.N return } -func (r Network_Backbone_Location_Dependent) GetAllObjectsIter() (resp []datatypes.Network_Backbone_Location_Dependent, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Backbone_Location_Dependent", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Backbone_Location_Dependent{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Backbone_Location_Dependent", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Backbone_Location_Dependent) GetDependentLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Backbone_Location_Dependent", "getDependentLocation", nil, &r.Options, &resp) @@ -2197,60 +1468,12 @@ func (r Network_Bandwidth_Version1_Allotment) GetActiveDetails() (resp []datatyp return } -func (r Network_Bandwidth_Version1_Allotment) GetActiveDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment_Detail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getActiveDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment_Detail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getActiveDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Application Delivery Controller contained within a virtual rack. func (r Network_Bandwidth_Version1_Allotment) GetApplicationDeliveryControllers() (resp []datatypes.Network_Application_Delivery_Controller, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getApplicationDeliveryControllers", nil, &r.Options, &resp) return } -func (r Network_Bandwidth_Version1_Allotment) GetApplicationDeliveryControllersIter() (resp []datatypes.Network_Application_Delivery_Controller, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getApplicationDeliveryControllers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getApplicationDeliveryControllers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The average daily public bandwidth usage for the current billing cycle. func (r Network_Bandwidth_Version1_Allotment) GetAverageDailyPublicBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getAverageDailyPublicBandwidthUsage", nil, &r.Options, &resp) @@ -2273,34 +1496,6 @@ func (r Network_Bandwidth_Version1_Allotment) GetBandwidthForDateRange(startDate return } -func (r Network_Bandwidth_Version1_Allotment) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBandwidthForDateRange", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBandwidthForDateRange", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method recurses through all servers on a Bandwidth Pool for a given snapshot range, gathers the necessary parameters, and then calls the bandwidth graphing server. The return result is a container that includes the min and max dates for all servers to be used in the query, as well as an image in PNG format. This method uses the new and improved drawing routines which should return in a reasonable time frame now that the new backend data warehouse is used. func (r Network_Bandwidth_Version1_Allotment) GetBandwidthImage(networkType *string, snapshotRange *string, draw *bool, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -2320,60 +1515,12 @@ func (r Network_Bandwidth_Version1_Allotment) GetBareMetalInstances() (resp []da return } -func (r Network_Bandwidth_Version1_Allotment) GetBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBareMetalInstances", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBareMetalInstances", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A virtual rack's raw bandwidth usage data for an account's current billing cycle. One object is returned for each network this server is attached to. func (r Network_Bandwidth_Version1_Allotment) GetBillingCycleBandwidthUsage() (resp []datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) return } -func (r Network_Bandwidth_Version1_Allotment) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Usage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A virtual rack's raw private network bandwidth usage data for an account's current billing cycle. func (r Network_Bandwidth_Version1_Allotment) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -2410,60 +1557,12 @@ func (r Network_Bandwidth_Version1_Allotment) GetDetails() (resp []datatypes.Net return } -func (r Network_Bandwidth_Version1_Allotment) GetDetailsIter() (resp []datatypes.Network_Bandwidth_Version1_Allotment_Detail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Version1_Allotment_Detail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware contained within a virtual rack. func (r Network_Bandwidth_Version1_Allotment) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getHardware", nil, &r.Options, &resp) return } -func (r Network_Bandwidth_Version1_Allotment) GetHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The total public inbound bandwidth used in this virtual rack for an account's current billing cycle. func (r Network_Bandwidth_Version1_Allotment) GetInboundPublicBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getInboundPublicBandwidthUsage", nil, &r.Options, &resp) @@ -2482,90 +1581,18 @@ func (r Network_Bandwidth_Version1_Allotment) GetManagedBareMetalInstances() (re return } -func (r Network_Bandwidth_Version1_Allotment) GetManagedBareMetalInstancesIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedBareMetalInstances", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedBareMetalInstances", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The managed hardware contained within a virtual rack. func (r Network_Bandwidth_Version1_Allotment) GetManagedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedHardware", nil, &r.Options, &resp) return } -func (r Network_Bandwidth_Version1_Allotment) GetManagedHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The managed Virtual Server contained within a virtual rack. func (r Network_Bandwidth_Version1_Allotment) GetManagedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedVirtualGuests", nil, &r.Options, &resp) return } -func (r Network_Bandwidth_Version1_Allotment) GetManagedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getManagedVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A virtual rack's metric tracking object. This object records all periodic polled data available to this rack. func (r Network_Bandwidth_Version1_Allotment) GetMetricTrackingObject() (resp datatypes.Metric_Tracking_Object, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getMetricTrackingObject", nil, &r.Options, &resp) @@ -2602,30 +1629,6 @@ func (r Network_Bandwidth_Version1_Allotment) GetPrivateNetworkOnlyHardware() (r return } -func (r Network_Bandwidth_Version1_Allotment) GetPrivateNetworkOnlyHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getPrivateNetworkOnlyHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getPrivateNetworkOnlyHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether the bandwidth usage for this bandwidth pool for the current billing cycle is projected to exceed the allocation. func (r Network_Bandwidth_Version1_Allotment) GetProjectedOverBandwidthAllocationFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getProjectedOverBandwidthAllocationFlag", nil, &r.Options, &resp) @@ -2662,30 +1665,6 @@ func (r Network_Bandwidth_Version1_Allotment) GetVirtualGuests() (resp []datatyp return } -func (r Network_Bandwidth_Version1_Allotment) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Bandwidth_Version1_Allotment", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will reassign a collection of SoftLayer hardware to a bandwidth allotment Bandwidth Pool. func (r Network_Bandwidth_Version1_Allotment) ReassignServers(templateObjects []datatypes.Hardware, newAllotmentId *int) (resp bool, err error) { params := []interface{}{ @@ -3069,33 +2048,6 @@ func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) List return } -func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) ListModifyResponseHeaderIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "listModifyResponseHeader", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "listModifyResponseHeader", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) UpdateModifyResponseHeader(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) { params := []interface{}{ @@ -3105,33 +2057,6 @@ func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) Upda return } -func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) UpdateModifyResponseHeaderIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) { - params := []interface{}{ - input, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "updateModifyResponseHeader", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "updateModifyResponseHeader", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Network_CdnMarketplace_Configuration_Behavior_TokenAuth struct { Session session.SLSession @@ -3181,33 +2106,6 @@ func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) CreateTokenAuth return } -func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) CreateTokenAuthPathIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth, err error) { - params := []interface{}{ - input, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "createTokenAuthPath", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "createTokenAuthPath", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) DeleteTokenAuthPath(uniqueId *string, path *string) (resp string, err error) { params := []interface{}{ @@ -3233,33 +2131,6 @@ func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) ListTokenAuthPa return } -func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) ListTokenAuthPathIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "listTokenAuthPath", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "listTokenAuthPath", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) UpdateTokenAuthPath(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth, err error) { params := []interface{}{ @@ -3269,33 +2140,6 @@ func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) UpdateTokenAuth return } -func (r Network_CdnMarketplace_Configuration_Behavior_TokenAuth) UpdateTokenAuthPathIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth, err error) { - params := []interface{}{ - input, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "updateTokenAuthPath", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_TokenAuth", "updateTokenAuthPath", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This data type models a purge event that occurs in caching server. It contains a reference to a mapping configuration, the path to execute the purge on, the status of the purge, and flag that enables saving the purge information for future use. type Network_CdnMarketplace_Configuration_Cache_Purge struct { Session session.SLSession @@ -3346,34 +2190,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_Purge) CreatePurge(uniqueId * return } -func (r Network_CdnMarketplace_Configuration_Cache_Purge) CreatePurgeIter(uniqueId *string, path *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { - params := []interface{}{ - uniqueId, - path, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "createPurge", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "createPurge", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetObject() (resp datatypes.Network_CdnMarketplace_Configuration_Cache_Purge, err error) { err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getObject", nil, &r.Options, &resp) @@ -3390,34 +2206,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeHistoryPerMapp return } -func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeHistoryPerMappingIter(uniqueId *string, saved *int) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { - params := []interface{}{ - uniqueId, - saved, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getPurgeHistoryPerMapping", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getPurgeHistoryPerMapping", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeStatus(uniqueId *string, path *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { params := []interface{}{ @@ -3428,34 +2216,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeStatus(uniqueI return } -func (r Network_CdnMarketplace_Configuration_Cache_Purge) GetPurgeStatusIter(uniqueId *string, path *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { - params := []interface{}{ - uniqueId, - path, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getPurgeStatus", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "getPurgeStatus", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_Purge) SaveOrUnsavePurgePath(uniqueId *string, path *string, saveOrUnsave *int) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { params := []interface{}{ @@ -3467,35 +2227,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_Purge) SaveOrUnsavePurgePath( return } -func (r Network_CdnMarketplace_Configuration_Cache_Purge) SaveOrUnsavePurgePathIter(uniqueId *string, path *string, saveOrUnsave *int) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge, err error) { - params := []interface{}{ - uniqueId, - path, - saveOrUnsave, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "saveOrUnsavePurgePath", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_Purge{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_Purge", "saveOrUnsavePurgePath", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This data type models a purge group event that occurs in caching server. It contains a reference to a mapping configuration and the path to execute the purge on. type Network_CdnMarketplace_Configuration_Cache_PurgeGroup struct { Session session.SLSession @@ -3579,33 +2310,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListFavoriteGroup return } -func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListFavoriteGroupIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "listFavoriteGroup", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "listFavoriteGroup", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListUnfavoriteGroup(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup, err error) { params := []interface{}{ @@ -3615,33 +2319,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListUnfavoriteGro return } -func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) ListUnfavoriteGroupIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "listUnfavoriteGroup", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "listUnfavoriteGroup", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) PurgeByGroupIds(uniqueId *string, groupUniqueIds []string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory, err error) { params := []interface{}{ @@ -3652,34 +2329,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) PurgeByGroupIds(u return } -func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) PurgeByGroupIdsIter(uniqueId *string, groupUniqueIds []string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory, err error) { - params := []interface{}{ - uniqueId, - groupUniqueIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "purgeByGroupIds", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeGroup", "purgeByGroupIds", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_PurgeGroup) RemovePurgeGroupFromFavorite(uniqueId *string, groupUniqueId *string) (resp datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroup, err error) { params := []interface{}{ @@ -3755,33 +2404,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_PurgeHistory) ListPurgeGroupH return } -func (r Network_CdnMarketplace_Configuration_Cache_PurgeHistory) ListPurgeGroupHistoryIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeHistory", "listPurgeGroupHistory", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Cache_PurgeGroupHistory{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_PurgeHistory", "listPurgeGroupHistory", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This data type models a purge event that occurs repetitively and automatically in caching server after a set interval of time. A time to live instance contains a reference to a mapping configuration, the path to execute the purge on, the result of the purge, and the time interval after which the purge will be executed. type Network_CdnMarketplace_Configuration_Cache_TimeToLive struct { Session session.SLSession @@ -3858,33 +2480,6 @@ func (r Network_CdnMarketplace_Configuration_Cache_TimeToLive) ListTimeToLive(un return } -func (r Network_CdnMarketplace_Configuration_Cache_TimeToLive) ListTimeToLiveIter(uniqueId *string) (resp []datatypes.Network_CdnMarketplace_Configuration_Cache_TimeToLive, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_TimeToLive", "listTimeToLive", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_CdnMarketplace_Configuration_Cache_TimeToLive{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Cache_TimeToLive", "listTimeToLive", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Cache_TimeToLive) UpdateTimeToLive(uniqueId *string, oldPath *string, newPath *string, oldTtl *string, newTtl *string) (resp string, err error) { params := []interface{}{ @@ -3947,33 +2542,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping) CreateDomainMapping(input return } -func (r Network_CdnMarketplace_Configuration_Mapping) CreateDomainMappingIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - params := []interface{}{ - input, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "createDomainMapping", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "createDomainMapping", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) DeleteDomainMapping(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -3983,33 +2551,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping) DeleteDomainMapping(unique return } -func (r Network_CdnMarketplace_Configuration_Mapping) DeleteDomainMappingIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "deleteDomainMapping", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "deleteDomainMapping", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) GetObject() (resp datatypes.Network_CdnMarketplace_Configuration_Mapping, err error) { err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "getObject", nil, &r.Options, &resp) @@ -4025,63 +2566,12 @@ func (r Network_CdnMarketplace_Configuration_Mapping) ListDomainMappingByUniqueI return } -func (r Network_CdnMarketplace_Configuration_Mapping) ListDomainMappingByUniqueIdIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappingByUniqueId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappingByUniqueId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) ListDomainMappings() (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappings", nil, &r.Options, &resp) return } -func (r Network_CdnMarketplace_Configuration_Mapping) ListDomainMappingsIter() (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "listDomainMappings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) RetryHttpsActionRequest(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -4091,33 +2581,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping) RetryHttpsActionRequest(un return } -func (r Network_CdnMarketplace_Configuration_Mapping) RetryHttpsActionRequestIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "retryHttpsActionRequest", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "retryHttpsActionRequest", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) StartDomainMapping(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -4127,33 +2590,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping) StartDomainMapping(uniqueI return } -func (r Network_CdnMarketplace_Configuration_Mapping) StartDomainMappingIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "startDomainMapping", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "startDomainMapping", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) StopDomainMapping(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -4163,33 +2599,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping) StopDomainMapping(uniqueId return } -func (r Network_CdnMarketplace_Configuration_Mapping) StopDomainMappingIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "stopDomainMapping", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "stopDomainMapping", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping) UpdateDomainMapping(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { params := []interface{}{ @@ -4199,33 +2608,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping) UpdateDomainMapping(input return } -func (r Network_CdnMarketplace_Configuration_Mapping) UpdateDomainMappingIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - params := []interface{}{ - input, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "updateDomainMapping", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "updateDomainMapping", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Verifies the CNAME is Unique in the domain. The method will return true if CNAME is unique else returns false func (r Network_CdnMarketplace_Configuration_Mapping) VerifyCname(cname *string) (resp bool, err error) { params := []interface{}{ @@ -4244,33 +2626,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping) VerifyDomainMapping(unique return } -func (r Network_CdnMarketplace_Configuration_Mapping) VerifyDomainMappingIter(uniqueId *int) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "verifyDomainMapping", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping", "verifyDomainMapping", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Network_CdnMarketplace_Configuration_Mapping_Path struct { Session session.SLSession @@ -4320,33 +2675,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping_Path) CreateOriginPath(inpu return } -func (r Network_CdnMarketplace_Configuration_Mapping_Path) CreateOriginPathIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path, err error) { - params := []interface{}{ - input, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "createOriginPath", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "createOriginPath", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping_Path) DeleteOriginPath(uniqueId *string, path *string) (resp string, err error) { params := []interface{}{ @@ -4372,33 +2700,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping_Path) ListOriginPath(unique return } -func (r Network_CdnMarketplace_Configuration_Mapping_Path) ListOriginPathIter(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path, err error) { - params := []interface{}{ - uniqueId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "listOriginPath", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "listOriginPath", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Configuration_Mapping_Path) UpdateOriginPath(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path, err error) { params := []interface{}{ @@ -4408,33 +2709,6 @@ func (r Network_CdnMarketplace_Configuration_Mapping_Path) UpdateOriginPath(inpu return } -func (r Network_CdnMarketplace_Configuration_Mapping_Path) UpdateOriginPathIter(input *datatypes.Container_Network_CdnMarketplace_Configuration_Input) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path, err error) { - params := []interface{}{ - input, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "updateOriginPath", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Configuration_Mapping_Path{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Mapping_Path", "updateOriginPath", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This Metrics class provides methods to get CDN metrics based on account or mapping unique id. type Network_CdnMarketplace_Metrics struct { Session session.SLSession @@ -4487,75 +2761,15 @@ func (r Network_CdnMarketplace_Metrics) GetCustomerInvoicingMetrics(vendorName * return } -func (r Network_CdnMarketplace_Metrics) GetCustomerInvoicingMetricsIter(vendorName *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { +// no documentation yet +func (r Network_CdnMarketplace_Metrics) GetCustomerRealTimeMetrics(vendorName *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ vendorName, - startDate, - endDate, - frequency, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerInvoicingMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerInvoicingMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) + startTime, + endTime, + timeInterval, } - wg.Wait() - return -} - -// no documentation yet -func (r Network_CdnMarketplace_Metrics) GetCustomerRealTimeMetrics(vendorName *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - vendorName, - startTime, - endTime, - timeInterval, - } - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerRealTimeMetrics", params, &r.Options, &resp) - return -} - -func (r Network_CdnMarketplace_Metrics) GetCustomerRealTimeMetricsIter(vendorName *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - vendorName, - startTime, - endTime, - timeInterval, - } - limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerRealTimeMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerRealTimeMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -4571,36 +2785,6 @@ func (r Network_CdnMarketplace_Metrics) GetCustomerUsageMetrics(vendorName *stri return } -func (r Network_CdnMarketplace_Metrics) GetCustomerUsageMetricsIter(vendorName *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - vendorName, - startDate, - endDate, - frequency, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerUsageMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getCustomerUsageMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthByRegionMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -4613,36 +2797,6 @@ func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthByRegionMetrics(mappi return } -func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthByRegionMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - mappingUniqueId, - startDate, - endDate, - frequency, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingBandwidthByRegionMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingBandwidthByRegionMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -4655,36 +2809,6 @@ func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthMetrics(mappingUnique return } -func (r Network_CdnMarketplace_Metrics) GetMappingBandwidthMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - mappingUniqueId, - startDate, - endDate, - frequency, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingBandwidthMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingBandwidthMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingHitsByTypeMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -4697,36 +2821,6 @@ func (r Network_CdnMarketplace_Metrics) GetMappingHitsByTypeMetrics(mappingUniqu return } -func (r Network_CdnMarketplace_Metrics) GetMappingHitsByTypeMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - mappingUniqueId, - startDate, - endDate, - frequency, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingHitsByTypeMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingHitsByTypeMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingHitsMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -4739,36 +2833,6 @@ func (r Network_CdnMarketplace_Metrics) GetMappingHitsMetrics(mappingUniqueId *s return } -func (r Network_CdnMarketplace_Metrics) GetMappingHitsMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - mappingUniqueId, - startDate, - endDate, - frequency, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingHitsMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingHitsMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingIntegratedMetrics(mappingUniqueId *string, startTime *int, endTime *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -4781,36 +2845,6 @@ func (r Network_CdnMarketplace_Metrics) GetMappingIntegratedMetrics(mappingUniqu return } -func (r Network_CdnMarketplace_Metrics) GetMappingIntegratedMetricsIter(mappingUniqueId *string, startTime *int, endTime *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - mappingUniqueId, - startTime, - endTime, - frequency, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingIntegratedMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingIntegratedMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingRealTimeMetrics(mappingUniqueId *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -4823,36 +2857,6 @@ func (r Network_CdnMarketplace_Metrics) GetMappingRealTimeMetrics(mappingUniqueI return } -func (r Network_CdnMarketplace_Metrics) GetMappingRealTimeMetricsIter(mappingUniqueId *string, startTime *int, endTime *int, timeInterval *int) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - mappingUniqueId, - startTime, - endTime, - timeInterval, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingRealTimeMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingRealTimeMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_CdnMarketplace_Metrics) GetMappingUsageMetrics(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { params := []interface{}{ @@ -4865,36 +2869,6 @@ func (r Network_CdnMarketplace_Metrics) GetMappingUsageMetrics(mappingUniqueId * return } -func (r Network_CdnMarketplace_Metrics) GetMappingUsageMetricsIter(mappingUniqueId *string, startDate *int, endDate *int, frequency *string) (resp []datatypes.Container_Network_CdnMarketplace_Metrics, err error) { - params := []interface{}{ - mappingUniqueId, - startDate, - endDate, - frequency, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingUsageMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Metrics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Metrics", "getMappingUsageMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Network_CdnMarketplace_Vendor contains information regarding a CDN Vendor. This class is associated with SoftLayer_Network_CdnMarketplace_Vendor_Attribute class. type Network_CdnMarketplace_Vendor struct { Session session.SLSession @@ -4947,30 +2921,6 @@ func (r Network_CdnMarketplace_Vendor) ListVendors() (resp []datatypes.Container return } -func (r Network_CdnMarketplace_Vendor) ListVendorsIter() (resp []datatypes.Container_Network_CdnMarketplace_Vendor, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Vendor", "listVendors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_CdnMarketplace_Vendor{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Vendor", "listVendors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Every piece of hardware running in SoftLayer's datacenters connected to the public, private, or management networks (where applicable) have a corresponding network component. These network components are modeled by the SoftLayer_Network_Component data type. These data types reflect the servers' local ethernet and remote management interfaces. type Network_Component struct { Session session.SLSession @@ -5028,33 +2978,6 @@ func (r Network_Component) AddNetworkVlanTrunks(networkVlans []datatypes.Network return } -func (r Network_Component) AddNetworkVlanTrunksIter(networkVlans []datatypes.Network_Vlan) (resp []datatypes.Network_Vlan, err error) { - params := []interface{}{ - networkVlans, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "addNetworkVlanTrunks", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "addNetworkVlanTrunks", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Remove all VLANs currently attached as trunks to this network component. // // This method should be called on a network component of assigned hardware. A current list of VLAN trunks for a network component on a customer server can be found at 'uplinkComponent->networkVlanTrunks'. @@ -5069,30 +2992,6 @@ func (r Network_Component) ClearNetworkVlanTrunks() (resp []datatypes.Network_Vl return } -func (r Network_Component) ClearNetworkVlanTrunksIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "clearNetworkVlanTrunks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "clearNetworkVlanTrunks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Reboot/power (rebootDefault, rebootSoft, rebootHard, powerOn, powerOff and powerCycle) command currently executing by the server's remote management card. func (r Network_Component) GetActiveCommand() (resp datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getActiveCommand", nil, &r.Options, &resp) @@ -5129,60 +3028,12 @@ func (r Network_Component) GetIpAddressBindings() (resp []datatypes.Network_Comp return } -func (r Network_Component) GetIpAddressBindingsIter() (resp []datatypes.Network_Component_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddressBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddressBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Component) GetIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddresses", nil, &r.Options, &resp) return } -func (r Network_Component) GetIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "getIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Last reboot/power (rebootDefault, rebootSoft, rebootHard, powerOn, powerOff and powerCycle) command issued to the server's remote management card. func (r Network_Component) GetLastCommand() (resp datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getLastCommand", nil, &r.Options, &resp) @@ -5213,30 +3064,6 @@ func (r Network_Component) GetNetworkHardware() (resp []datatypes.Hardware, err return } -func (r Network_Component) GetNetworkHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The VLAN that a network component's subnet is associated with. func (r Network_Component) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlan", nil, &r.Options, &resp) @@ -5249,60 +3076,12 @@ func (r Network_Component) GetNetworkVlanTrunks() (resp []datatypes.Network_Comp return } -func (r Network_Component) GetNetworkVlanTrunksIter() (resp []datatypes.Network_Component_Network_Vlan_Trunk, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlanTrunks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Network_Vlan_Trunk{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlanTrunks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The viable trunking targets of this component. Viable targets include accessible VLANs in the same pod and network as this component, which are not already natively attached nor trunked to this component. func (r Network_Component) GetNetworkVlansTrunkable() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlansTrunkable", nil, &r.Options, &resp) return } -func (r Network_Component) GetNetworkVlansTrunkableIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlansTrunkable", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "getNetworkVlansTrunkable", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Component) GetObject() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getObject", nil, &r.Options, &resp) @@ -5350,30 +3129,6 @@ func (r Network_Component) GetRecentCommands() (resp []datatypes.Hardware_Compon return } -func (r Network_Component) GetRecentCommandsIter() (resp []datatypes.Hardware_Component_RemoteManagement_Command_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "getRecentCommands", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_Command_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "getRecentCommands", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Indicates whether the network component is participating in a group of two or more components capable of being operationally redundant, if enabled. func (r Network_Component) GetRedundancyCapableFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getRedundancyCapableFlag", nil, &r.Options, &resp) @@ -5392,30 +3147,6 @@ func (r Network_Component) GetRemoteManagementUsers() (resp []datatypes.Hardware return } -func (r Network_Component) GetRemoteManagementUsersIter() (resp []datatypes.Hardware_Component_RemoteManagement_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "getRemoteManagementUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware_Component_RemoteManagement_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "getRemoteManagementUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A network component's routers. func (r Network_Component) GetRouter() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getRouter", nil, &r.Options, &resp) @@ -5434,30 +3165,6 @@ func (r Network_Component) GetSubnets() (resp []datatypes.Network_Subnet, err er return } -func (r Network_Component) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "getSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "getSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network component linking this object to parent func (r Network_Component) GetUplinkComponent() (resp datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component", "getUplinkComponent", nil, &r.Options, &resp) @@ -5489,33 +3196,6 @@ func (r Network_Component) RemoveNetworkVlanTrunks(networkVlans []datatypes.Netw return } -func (r Network_Component) RemoveNetworkVlanTrunksIter(networkVlans []datatypes.Network_Vlan) (resp []datatypes.Network_Vlan, err error) { - params := []interface{}{ - networkVlans, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component", "removeNetworkVlanTrunks", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component", "removeNetworkVlanTrunks", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Network_Component_Firewall data type contains general information relating to a single SoftLayer network component firewall. This is the object which ties the running rules to a specific downstream server. Use the [[SoftLayer Network Firewall Template]] service to pull SoftLayer recommended rule set templates. Use the [[SoftLayer Network Firewall Update Request]] service to submit a firewall update request. type Network_Component_Firewall struct { Session session.SLSession @@ -5562,30 +3242,6 @@ func (r Network_Component_Firewall) GetApplyServerRuleSubnets() (resp []datatype return } -func (r Network_Component_Firewall) GetApplyServerRuleSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getApplyServerRuleSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getApplyServerRuleSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item for a Hardware Firewall (Dedicated). func (r Network_Component_Firewall) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getBillingItem", nil, &r.Options, &resp) @@ -5610,30 +3266,6 @@ func (r Network_Component_Firewall) GetNetworkFirewallUpdateRequest() (resp []da return } -func (r Network_Component_Firewall) GetNetworkFirewallUpdateRequestIter() (resp []datatypes.Network_Firewall_Update_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getNetworkFirewallUpdateRequest", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_Update_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getNetworkFirewallUpdateRequest", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject returns a SoftLayer_Network_Firewall_Module_Context_Interface_AccessControlList_Network_Component object. You can only get objects for servers attached to your account that have a network firewall enabled. func (r Network_Component_Firewall) GetObject() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getObject", nil, &r.Options, &resp) @@ -5646,60 +3278,12 @@ func (r Network_Component_Firewall) GetRules() (resp []datatypes.Network_Compone return } -func (r Network_Component_Firewall) GetRulesIter() (resp []datatypes.Network_Component_Firewall_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getRules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Firewall_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getRules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The additional subnets linked to this network component firewall. func (r Network_Component_Firewall) GetSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getSubnets", nil, &r.Options, &resp) return } -func (r Network_Component_Firewall) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "getSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Check for active transactions for the shared Firewall. func (r Network_Component_Firewall) HasActiveTransactions() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Component_Firewall", "hasActiveTransactions", nil, &r.Options, &resp) @@ -5761,30 +3345,6 @@ func (r Network_Customer_Subnet) GetIpAddresses() (resp []datatypes.Network_Cust return } -func (r Network_Customer_Subnet) GetIpAddressesIter() (resp []datatypes.Network_Customer_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Customer_Subnet", "getIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Customer_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Customer_Subnet", "getIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Network_Customer_Subnet object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Customer_Subnet service. You can only retrieve the subnet whose account matches the account that your portal user is assigned to. func (r Network_Customer_Subnet) GetObject() (resp datatypes.Network_Customer_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Customer_Subnet", "getObject", nil, &r.Options, &resp) @@ -5837,30 +3397,6 @@ func (r Network_DirectLink_Location) GetAllObjects() (resp []datatypes.Network_D return } -func (r Network_DirectLink_Location) GetAllObjectsIter() (resp []datatypes.Network_DirectLink_Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_DirectLink_Location", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_DirectLink_Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_DirectLink_Location", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The location of Direct Link facility. func (r Network_DirectLink_Location) GetLocation() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_DirectLink_Location", "getLocation", nil, &r.Options, &resp) @@ -6023,30 +3559,6 @@ func (r Network_Firewall_AccessControlList) GetNetworkFirewallUpdateRequests() ( return } -func (r Network_Firewall_AccessControlList) GetNetworkFirewallUpdateRequestsIter() (resp []datatypes.Network_Firewall_Update_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getNetworkFirewallUpdateRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_Update_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getNetworkFirewallUpdateRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Firewall_AccessControlList) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getNetworkVlan", nil, &r.Options, &resp) @@ -6065,30 +3577,6 @@ func (r Network_Firewall_AccessControlList) GetRules() (resp []datatypes.Network return } -func (r Network_Firewall_AccessControlList) GetRulesIter() (resp []datatypes.Network_Vlan_Firewall_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getRules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan_Firewall_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Firewall_AccessControlList", "getRules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Network_Firewall_Interface data type contains general information relating to a single SoftLayer firewall interface. This is the object which ties the firewall context access control list to a firewall. Use the [[SoftLayer Network Firewall Template]] service to pull SoftLayer recommended rule set templates. Use the [[SoftLayer Network Firewall Update Request]] service to submit a firewall update request. type Network_Firewall_Interface struct { Session session.SLSession @@ -6135,30 +3623,6 @@ func (r Network_Firewall_Interface) GetFirewallContextAccessControlLists() (resp return } -func (r Network_Firewall_Interface) GetFirewallContextAccessControlListsIter() (resp []datatypes.Network_Firewall_AccessControlList, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Interface", "getFirewallContextAccessControlLists", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_AccessControlList{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Interface", "getFirewallContextAccessControlLists", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Firewall_Interface) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_Interface", "getNetworkVlan", nil, &r.Options, &resp) @@ -6217,30 +3681,6 @@ func (r Network_Firewall_Module_Context_Interface) GetFirewallContextAccessContr return } -func (r Network_Firewall_Module_Context_Interface) GetFirewallContextAccessControlListsIter() (resp []datatypes.Network_Firewall_AccessControlList, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Module_Context_Interface", "getFirewallContextAccessControlLists", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_AccessControlList{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Module_Context_Interface", "getFirewallContextAccessControlLists", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Firewall_Module_Context_Interface) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_Module_Context_Interface", "getNetworkVlan", nil, &r.Options, &resp) @@ -6303,30 +3743,6 @@ func (r Network_Firewall_Template) GetAllObjects() (resp []datatypes.Network_Fir return } -func (r Network_Firewall_Template) GetAllObjectsIter() (resp []datatypes.Network_Firewall_Template, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_Template{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject returns a SoftLayer_Network_Firewall_Template object. You can retrieve all available firewall templates. getAllObjects returns an array of all available SoftLayer_Network_Firewall_Template objects. You can use these templates to generate a [[SoftLayer Network Firewall Update Request]]. // // @SLDNDocumentation Service See Also SoftLayer_Network_Firewall_Update_Request @@ -6341,30 +3757,6 @@ func (r Network_Firewall_Template) GetRules() (resp []datatypes.Network_Firewall return } -func (r Network_Firewall_Template) GetRulesIter() (resp []datatypes.Network_Firewall_Template_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getRules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_Template_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getRules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Network_Firewall_Update_Request data type contains information relating to a SoftLayer network firewall update request. Use the [[SoftLayer Network Component Firewall]] service to view current rules. Use the [[SoftLayer Network Firewall Template]] service to pull SoftLayer recommended rule set templates. type Network_Firewall_Update_Request struct { Session session.SLSession @@ -6460,30 +3852,6 @@ func (r Network_Firewall_Update_Request) GetRules() (resp []datatypes.Network_Fi return } -func (r Network_Firewall_Update_Request) GetRulesIter() (resp []datatypes.Network_Firewall_Update_Request_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Update_Request", "getRules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_Update_Request_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Firewall_Update_Request", "getRules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Firewall_Update_Request) UpdateRuleNote(fwRule *datatypes.Network_Component_Firewall_Rule, note *string) (resp bool, err error) { params := []interface{}{ @@ -6690,33 +4058,6 @@ func (r Network_Gateway) GetAllowedOsPriceIds(memberId *int) (resp []int, err er return } -func (r Network_Gateway) GetAllowedOsPriceIdsIter(memberId *int) (resp []int, err error) { - params := []interface{}{ - memberId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getAllowedOsPriceIds", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getAllowedOsPriceIds", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns the Gbps capacity of the gateway object func (r Network_Gateway) GetCapacity() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getCapacity", nil, &r.Options, &resp) @@ -6729,30 +4070,6 @@ func (r Network_Gateway) GetInsideVlans() (resp []datatypes.Network_Gateway_Vlan return } -func (r Network_Gateway) GetInsideVlansIter() (resp []datatypes.Network_Gateway_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getInsideVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getInsideVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns manufacturer name for a given gateway object. func (r Network_Gateway) GetManufacturer(checkSameOs *bool, checkOsReloadMember *bool) (resp string, err error) { params := []interface{}{ @@ -6775,30 +4092,6 @@ func (r Network_Gateway) GetMembers() (resp []datatypes.Network_Gateway_Member, return } -func (r Network_Gateway) GetMembersIter() (resp []datatypes.Network_Gateway_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getMembers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getMembers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The firewall associated with this gateway, if any. func (r Network_Gateway) GetNetworkFirewall() (resp datatypes.Network_Vlan_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getNetworkFirewall", nil, &r.Options, &resp) @@ -6823,30 +4116,6 @@ func (r Network_Gateway) GetPossibleInsideVlans() (resp []datatypes.Network_Vlan return } -func (r Network_Gateway) GetPossibleInsideVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getPossibleInsideVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getPossibleInsideVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The private gateway IP address. func (r Network_Gateway) GetPrivateIpAddress() (resp datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getPrivateIpAddress", nil, &r.Options, &resp) @@ -6895,30 +4164,6 @@ func (r Network_Gateway) GetUpgradeItemPrices() (resp []datatypes.Product_Item_P return } -func (r Network_Gateway) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getUpgradeItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getUpgradeItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Gateway) IsAccountWhiteListed(category *string) (resp bool, err error) { params := []interface{}{ @@ -7083,33 +4328,6 @@ func (r Network_Gateway_Member) CreateObjects(templateObjects []datatypes.Networ return } -func (r Network_Gateway_Member) CreateObjectsIter(templateObjects []datatypes.Network_Gateway_Member) (resp []datatypes.Network_Gateway_Member, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Edit this member, only manufacturer and version can be changed func (r Network_Gateway_Member) EditObject(templateObject *datatypes.Network_Gateway_Member) (resp bool, err error) { params := []interface{}{ @@ -7143,30 +4361,6 @@ func (r Network_Gateway_Member) GetLicenses() (resp []datatypes.Network_Gateway_ return } -func (r Network_Gateway_Member) GetLicensesIter() (resp []datatypes.Network_Gateway_Member_Licenses, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_Member_Licenses{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway this member belongs to. func (r Network_Gateway_Member) GetNetworkGateway() (resp datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getNetworkGateway", nil, &r.Options, &resp) @@ -7185,30 +4379,6 @@ func (r Network_Gateway_Member) GetPasswords() (resp []datatypes.Network_Gateway return } -func (r Network_Gateway_Member) GetPasswordsIter() (resp []datatypes.Network_Gateway_Member_Passwords, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getPasswords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_Member_Passwords{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getPasswords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The public gateway IP address. func (r Network_Gateway_Member) GetPublicIpAddress() (resp datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway_Member", "getPublicIpAddress", nil, &r.Options, &resp) @@ -7337,34 +4507,6 @@ func (r Network_Gateway_Precheck) GetPrecheckStatus(gatewayId *int, getRollbackP return } -func (r Network_Gateway_Precheck) GetPrecheckStatusIter(gatewayId *int, getRollbackPrecheck *bool) (resp []datatypes.Network_Gateway_Precheck, err error) { - params := []interface{}{ - gatewayId, - getRollbackPrecheck, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Precheck", "getPrecheckStatus", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_Precheck{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Precheck", "getPrecheckStatus", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Used to create a License Management Network Gateway Precheck transaction. func (r Network_Gateway_Precheck) LicenseManagementPrecheck(gatewayId *int) (resp bool, err error) { params := []interface{}{ @@ -7487,33 +4629,6 @@ func (r Network_Gateway_VersionUpgrade) GetAllByUpgradePkgUrlId(upgradePkgUrlId return } -func (r Network_Gateway_VersionUpgrade) GetAllByUpgradePkgUrlIdIter(upgradePkgUrlId *int) (resp []datatypes.Network_Gateway_VersionUpgrade, err error) { - params := []interface{}{ - upgradePkgUrlId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getAllByUpgradePkgUrlId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_VersionUpgrade{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getAllByUpgradePkgUrlId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Gateway_VersionUpgrade) GetAllUpgradesByGatewayId(gatewayId *int) (resp []datatypes.Network_Gateway_VersionUpgrade, err error) { params := []interface{}{ @@ -7523,33 +4638,6 @@ func (r Network_Gateway_VersionUpgrade) GetAllUpgradesByGatewayId(gatewayId *int return } -func (r Network_Gateway_VersionUpgrade) GetAllUpgradesByGatewayIdIter(gatewayId *int) (resp []datatypes.Network_Gateway_VersionUpgrade, err error) { - params := []interface{}{ - gatewayId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getAllUpgradesByGatewayId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_VersionUpgrade{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getAllUpgradesByGatewayId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - func (r Network_Gateway_VersionUpgrade) GetGwOrdersAllowedLicenses(accountId *int, manufacturer *string) (resp string, err error) { params := []interface{}{ accountId, @@ -7569,34 +4657,6 @@ func (r Network_Gateway_VersionUpgrade) GetGwOrdersAllowedOS(accountId *int, man return } -func (r Network_Gateway_VersionUpgrade) GetGwOrdersAllowedOSIter(accountId *int, manufacturer *string) (resp []datatypes.Product_Package_Item_Prices, err error) { - params := []interface{}{ - accountId, - manufacturer, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getGwOrdersAllowedOS", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Item_Prices{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getGwOrdersAllowedOS", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Gateway_VersionUpgrade) GetObject() (resp datatypes.Network_Gateway_VersionUpgrade, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getObject", nil, &r.Options, &resp) @@ -7678,33 +4738,6 @@ func (r Network_Gateway_Vlan) CreateObjects(templateObjects []datatypes.Network_ return } -func (r Network_Gateway_Vlan) CreateObjectsIter(templateObjects []datatypes.Network_Gateway_Vlan) (resp []datatypes.Network_Gateway_Vlan, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Vlan", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Gateway_Vlan", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Start the asynchronous process to detach this VLANs from the gateway. func (r Network_Gateway_Vlan) DeleteObject() (err error) { var resp datatypes.Void @@ -7834,30 +4867,6 @@ func (r Network_Interconnect_Tenant) GetAllObjects() (resp []datatypes.Network_I return } -func (r Network_Interconnect_Tenant) GetAllObjectsIter() (resp []datatypes.Network_Interconnect_Tenant, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Interconnect_Tenant{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Interconnect_Tenant) GetAllPortLabelsWithCurrentUsage(directLinkLocationId *int) (resp []string, err error) { params := []interface{}{ @@ -7867,33 +4876,6 @@ func (r Network_Interconnect_Tenant) GetAllPortLabelsWithCurrentUsage(directLink return } -func (r Network_Interconnect_Tenant) GetAllPortLabelsWithCurrentUsageIter(directLinkLocationId *int) (resp []string, err error) { - params := []interface{}{ - directLinkLocationId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getAllPortLabelsWithCurrentUsage", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getAllPortLabelsWithCurrentUsage", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Interconnect_Tenant) GetBgpIpRange() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getBgpIpRange", nil, &r.Options, &resp) @@ -7937,30 +4919,6 @@ func (r Network_Interconnect_Tenant) GetNetworkZones() (resp []string, err error return } -func (r Network_Interconnect_Tenant) GetNetworkZonesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getNetworkZones", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getNetworkZones", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Interconnect_Tenant) GetObject() (resp datatypes.Network_Interconnect_Tenant, err error) { err = r.Session.DoRequest("SoftLayer_Network_Interconnect_Tenant", "getObject", nil, &r.Options, &resp) @@ -8221,30 +5179,6 @@ func (r Network_LBaaS_L7Policy) GetL7Rules() (resp []datatypes.Network_LBaaS_L7R return } -func (r Network_LBaaS_L7Policy) GetL7RulesIter() (resp []datatypes.Network_LBaaS_L7Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Policy", "getL7Rules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_L7Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Policy", "getL7Rules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_LBaaS_L7Policy) GetObject() (resp datatypes.Network_LBaaS_L7Policy, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Policy", "getObject", nil, &r.Options, &resp) @@ -8322,60 +5256,12 @@ func (r Network_LBaaS_L7Pool) GetL7Members() (resp []datatypes.Network_LBaaS_L7M return } -func (r Network_LBaaS_L7Pool) GetL7MembersIter() (resp []datatypes.Network_LBaaS_L7Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Members", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_L7Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Members", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_LBaaS_L7Pool) GetL7Policies() (resp []datatypes.Network_LBaaS_L7Policy, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Policies", nil, &r.Options, &resp) return } -func (r Network_LBaaS_L7Pool) GetL7PoliciesIter() (resp []datatypes.Network_LBaaS_L7Policy, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Policies", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_L7Policy{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7Policies", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns the health of all L7 pool's members which are created under load balancer. L7 members health status is available only after a L7 pool is associated with the L7 policy and that L7 policy has at least one L7 rule. func (r Network_LBaaS_L7Pool) GetL7PoolMemberHealth(loadBalancerUuid *string) (resp []datatypes.Network_LBaaS_L7PoolMembersHealth, err error) { params := []interface{}{ @@ -8385,33 +5271,6 @@ func (r Network_LBaaS_L7Pool) GetL7PoolMemberHealth(loadBalancerUuid *string) (r return } -func (r Network_LBaaS_L7Pool) GetL7PoolMemberHealthIter(loadBalancerUuid *string) (resp []datatypes.Network_LBaaS_L7PoolMembersHealth, err error) { - params := []interface{}{ - loadBalancerUuid, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7PoolMemberHealth", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_L7PoolMembersHealth{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7PoolMemberHealth", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_LBaaS_L7Pool) GetL7SessionAffinity() (resp datatypes.Network_LBaaS_L7SessionAffinity, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_L7Pool", "getL7SessionAffinity", nil, &r.Options, &resp) @@ -8574,30 +5433,6 @@ func (r Network_LBaaS_Listener) GetL7Policies() (resp []datatypes.Network_LBaaS_ return } -func (r Network_LBaaS_Listener) GetL7PoliciesIter() (resp []datatypes.Network_LBaaS_L7Policy, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_Listener", "getL7Policies", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_L7Policy{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_Listener", "getL7Policies", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_LBaaS_Listener) GetObject() (resp datatypes.Network_LBaaS_Listener, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_Listener", "getObject", nil, &r.Options, &resp) @@ -8679,30 +5514,6 @@ func (r Network_LBaaS_LoadBalancer) GetAllObjects() (resp []datatypes.Network_LB return } -func (r Network_LBaaS_LoadBalancer) GetAllObjectsIter() (resp []datatypes.Network_LBaaS_LoadBalancer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_LoadBalancer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the load balancer appliances for the given lb id. func (r Network_LBaaS_LoadBalancer) GetAppliances(lbId *string) (resp []datatypes.Network_LBaaS_LoadBalancerAppliance, err error) { params := []interface{}{ @@ -8712,33 +5523,6 @@ func (r Network_LBaaS_LoadBalancer) GetAppliances(lbId *string) (resp []datatype return } -func (r Network_LBaaS_LoadBalancer) GetAppliancesIter(lbId *string) (resp []datatypes.Network_LBaaS_LoadBalancerAppliance, err error) { - params := []interface{}{ - lbId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getAppliances", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_LoadBalancerAppliance{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getAppliances", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Datacenter, where load balancer is located. func (r Network_LBaaS_LoadBalancer) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getDatacenter", nil, &r.Options, &resp) @@ -8751,60 +5535,12 @@ func (r Network_LBaaS_LoadBalancer) GetHealthMonitors() (resp []datatypes.Networ return } -func (r Network_LBaaS_LoadBalancer) GetHealthMonitorsIter() (resp []datatypes.Network_LBaaS_HealthMonitor, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getHealthMonitors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_HealthMonitor{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getHealthMonitors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve L7Pools for load balancer. func (r Network_LBaaS_LoadBalancer) GetL7Pools() (resp []datatypes.Network_LBaaS_L7Pool, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getL7Pools", nil, &r.Options, &resp) return } -func (r Network_LBaaS_LoadBalancer) GetL7PoolsIter() (resp []datatypes.Network_LBaaS_L7Pool, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getL7Pools", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_L7Pool{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getL7Pools", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Return listener time series datapoints. The time series data is available for Throughput, ConnectionRate and ActiveConnections. Throughput is in bits per second. The values are an average over the time range. The time series data is available for 1hour, 6hours, 12hours, 1day, 1week or 2weeks. func (r Network_LBaaS_LoadBalancer) GetListenerTimeSeriesData(loadBalancerUuid *string, metricName *string, timeRange *string, listenerUuid *string) (resp []datatypes.Network_LBaaS_LoadBalancerMonitoringMetricDataPoint, err error) { params := []interface{}{ @@ -8817,66 +5553,12 @@ func (r Network_LBaaS_LoadBalancer) GetListenerTimeSeriesData(loadBalancerUuid * return } -func (r Network_LBaaS_LoadBalancer) GetListenerTimeSeriesDataIter(loadBalancerUuid *string, metricName *string, timeRange *string, listenerUuid *string) (resp []datatypes.Network_LBaaS_LoadBalancerMonitoringMetricDataPoint, err error) { - params := []interface{}{ - loadBalancerUuid, - metricName, - timeRange, - listenerUuid, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListenerTimeSeriesData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_LoadBalancerMonitoringMetricDataPoint{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListenerTimeSeriesData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Listeners assigned to load balancer. func (r Network_LBaaS_LoadBalancer) GetListeners() (resp []datatypes.Network_LBaaS_Listener, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListeners", nil, &r.Options, &resp) return } -func (r Network_LBaaS_LoadBalancer) GetListenersIter() (resp []datatypes.Network_LBaaS_Listener, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListeners", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_Listener{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getListeners", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the load balancer object with given uuid. func (r Network_LBaaS_LoadBalancer) GetLoadBalancer(uuid *string) (resp datatypes.Network_LBaaS_LoadBalancer, err error) { params := []interface{}{ @@ -8895,33 +5577,6 @@ func (r Network_LBaaS_LoadBalancer) GetLoadBalancerMemberHealth(uuid *string) (r return } -func (r Network_LBaaS_LoadBalancer) GetLoadBalancerMemberHealthIter(uuid *string) (resp []datatypes.Network_LBaaS_PoolMembersHealth, err error) { - params := []interface{}{ - uuid, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getLoadBalancerMemberHealth", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_PoolMembersHealth{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getLoadBalancerMemberHealth", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Return load balancers statistics such as total number of current sessions and total number of accumulated connections. func (r Network_LBaaS_LoadBalancer) GetLoadBalancerStatistics(uuid *string) (resp datatypes.Network_LBaaS_LoadBalancerStatistics, err error) { params := []interface{}{ @@ -8940,63 +5595,12 @@ func (r Network_LBaaS_LoadBalancer) GetLoadBalancers(data *string) (resp []datat return } -func (r Network_LBaaS_LoadBalancer) GetLoadBalancersIter(data *string) (resp []datatypes.Network_LBaaS_LoadBalancer, err error) { - params := []interface{}{ - data, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getLoadBalancers", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_LoadBalancer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getLoadBalancers", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Members assigned to load balancer. func (r Network_LBaaS_LoadBalancer) GetMembers() (resp []datatypes.Network_LBaaS_Member, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getMembers", nil, &r.Options, &resp) return } -func (r Network_LBaaS_LoadBalancer) GetMembersIter() (resp []datatypes.Network_LBaaS_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getMembers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getMembers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_LBaaS_LoadBalancer) GetObject() (resp datatypes.Network_LBaaS_LoadBalancer, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getObject", nil, &r.Options, &resp) @@ -9009,30 +5613,6 @@ func (r Network_LBaaS_LoadBalancer) GetSslCiphers() (resp []datatypes.Network_LB return } -func (r Network_LBaaS_LoadBalancer) GetSslCiphersIter() (resp []datatypes.Network_LBaaS_SSLCipher, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getSslCiphers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_SSLCipher{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_LoadBalancer", "getSslCiphers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_LBaaS_LoadBalancer) ServiceDNS(data *string) (err error) { var resp datatypes.Void @@ -9240,30 +5820,6 @@ func (r Network_LBaaS_SSLCipher) GetAllObjects() (resp []datatypes.Network_LBaaS return } -func (r Network_LBaaS_SSLCipher) GetAllObjectsIter() (resp []datatypes.Network_LBaaS_SSLCipher, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_SSLCipher", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_SSLCipher{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LBaaS_SSLCipher", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_LBaaS_SSLCipher) GetObject() (resp datatypes.Network_LBaaS_SSLCipher, err error) { err = r.Session.DoRequest("SoftLayer_Network_LBaaS_SSLCipher", "getObject", nil, &r.Options, &resp) @@ -9350,30 +5906,6 @@ func (r Network_LoadBalancer_Global_Account) GetHosts() (resp []datatypes.Networ return } -func (r Network_LoadBalancer_Global_Account) GetHostsIter() (resp []datatypes.Network_LoadBalancer_Global_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Global_Account", "getHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LoadBalancer_Global_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Global_Account", "getHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The load balance method of a global load balancer account func (r Network_LoadBalancer_Global_Account) GetLoadBalanceType() (resp datatypes.Network_LoadBalancer_Global_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Global_Account", "getLoadBalanceType", nil, &r.Options, &resp) @@ -9548,30 +6080,6 @@ func (r Network_LoadBalancer_Service) GetStatus() (resp []datatypes.Container_Ne return } -func (r Network_LoadBalancer_Service) GetStatusIter() (resp []datatypes.Container_Network_LoadBalancer_StatusEntry, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Service", "getStatus", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_LoadBalancer_StatusEntry{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Service", "getStatus", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The load balancer that this service belongs to. func (r Network_LoadBalancer_Service) GetVip() (resp datatypes.Network_LoadBalancer_VirtualIpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Service", "getVip", nil, &r.Options, &resp) @@ -9683,30 +6191,6 @@ func (r Network_LoadBalancer_VirtualIpAddress) GetServices() (resp []datatypes.N return } -func (r Network_LoadBalancer_VirtualIpAddress) GetServicesIter() (resp []datatypes.Network_LoadBalancer_Service, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_VirtualIpAddress", "getServices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LoadBalancer_Service{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_VirtualIpAddress", "getServices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Quickly remove all active external connections to a Virtual IP Address. func (r Network_LoadBalancer_VirtualIpAddress) KickAllConnections() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_VirtualIpAddress", "kickAllConnections", nil, &r.Options, &resp) @@ -9798,30 +6282,6 @@ func (r Network_Message_Delivery) GetUpgradeItemPrices() (resp []datatypes.Produ return } -func (r Network_Message_Delivery) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery", "getUpgradeItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery", "getUpgradeItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The vendor for a network message delivery account. func (r Network_Message_Delivery) GetVendor() (resp datatypes.Network_Message_Delivery_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery", "getVendor", nil, &r.Options, &resp) @@ -9947,33 +6407,6 @@ func (r Network_Message_Delivery_Email_Sendgrid) GetEmailList(list *string) (res return } -func (r Network_Message_Delivery_Email_Sendgrid) GetEmailListIter(list *string) (resp []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_List_Entry, err error) { - params := []interface{}{ - list, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getEmailList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_List_Entry{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getEmailList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Message_Delivery_Email_Sendgrid) GetObject() (resp datatypes.Network_Message_Delivery_Email_Sendgrid, err error) { err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getObject", nil, &r.Options, &resp) @@ -9986,30 +6419,6 @@ func (r Network_Message_Delivery_Email_Sendgrid) GetOfferingsList() (resp []data return } -func (r Network_Message_Delivery_Email_Sendgrid) GetOfferingsListIter() (resp []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Catalog_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getOfferingsList", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Catalog_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getOfferingsList", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag that determines if a SendGrid e-mail delivery account has access to send mail through the SendGrid SMTP server. func (r Network_Message_Delivery_Email_Sendgrid) GetSmtpAccess() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getSmtpAccess", nil, &r.Options, &resp) @@ -10025,33 +6434,6 @@ func (r Network_Message_Delivery_Email_Sendgrid) GetStatistics(options *datatype return } -func (r Network_Message_Delivery_Email_Sendgrid) GetStatisticsIter(options *datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics_Options) (resp []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics, err error) { - params := []interface{}{ - options, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getStatistics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getStatistics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Message_Delivery_Email_Sendgrid) GetStatisticsGraph(options *datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics_Options) (resp datatypes.Container_Network_Message_Delivery_Email_Sendgrid_Statistics_Graph, err error) { params := []interface{}{ @@ -10073,30 +6455,6 @@ func (r Network_Message_Delivery_Email_Sendgrid) GetUpgradeItemPrices() (resp [] return } -func (r Network_Message_Delivery_Email_Sendgrid) GetUpgradeItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getUpgradeItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getUpgradeItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The vendor for a network message delivery account. func (r Network_Message_Delivery_Email_Sendgrid) GetVendor() (resp datatypes.Network_Message_Delivery_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getVendor", nil, &r.Options, &resp) @@ -10168,34 +6526,6 @@ func (r Network_Monitor) GetIpAddressesByHardware(hardware *datatypes.Hardware, return } -func (r Network_Monitor) GetIpAddressesByHardwareIter(hardware *datatypes.Hardware, partialIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { - params := []interface{}{ - hardware, - partialIpAddress, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Monitor", "getIpAddressesByHardware", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Monitor", "getIpAddressesByHardware", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This will return an arrayObject of objects containing the ipaddresses. Using an string parameter you can send a partial ipaddress to search within a given ipaddress. You can also set the max limit as well using the setting the resultLimit. func (r Network_Monitor) GetIpAddressesByVirtualGuest(guest *datatypes.Virtual_Guest, partialIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -10206,34 +6536,6 @@ func (r Network_Monitor) GetIpAddressesByVirtualGuest(guest *datatypes.Virtual_G return } -func (r Network_Monitor) GetIpAddressesByVirtualGuestIter(guest *datatypes.Virtual_Guest, partialIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { - params := []interface{}{ - guest, - partialIpAddress, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Monitor", "getIpAddressesByVirtualGuest", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Monitor", "getIpAddressesByVirtualGuest", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The Monitoring_Query_Host type represents a monitoring instance. It consists of a hardware ID to monitor, an IP address attached to that hardware ID, a method of monitoring, and what to do in the instance that the monitor ever fails. type Network_Monitor_Version1_Query_Host struct { Session session.SLSession @@ -10292,33 +6594,6 @@ func (r Network_Monitor_Version1_Query_Host) CreateObjects(templateObjects []dat return } -func (r Network_Monitor_Version1_Query_Host) CreateObjectsIter(templateObjects []datatypes.Network_Monitor_Version1_Query_Host) (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Like any other API object, the monitoring objects can be deleted by passing an instance of them into this function. The ID on the object must be set. func (r Network_Monitor_Version1_Query_Host) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "deleteObject", nil, &r.Options, &resp) @@ -10363,33 +6638,6 @@ func (r Network_Monitor_Version1_Query_Host) FindByHardwareId(hardwareId *int) ( return } -func (r Network_Monitor_Version1_Query_Host) FindByHardwareIdIter(hardwareId *int) (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { - params := []interface{}{ - hardwareId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "findByHardwareId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "findByHardwareId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware that is being monitored by this monitoring instance func (r Network_Monitor_Version1_Query_Host) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host", "getHardware", nil, &r.Options, &resp) @@ -10472,60 +6720,12 @@ func (r Network_Monitor_Version1_Query_Host_Stratum) GetAllQueryTypes() (resp [] return } -func (r Network_Monitor_Version1_Query_Host_Stratum) GetAllQueryTypesIter() (resp []datatypes.Network_Monitor_Version1_Query_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllQueryTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllQueryTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Calling this function returns all possible response type objects. These objects are to be used to set the values on the SoftLayer_Network_Monitor_Version1_Query_Host when creating new monitoring instances. func (r Network_Monitor_Version1_Query_Host_Stratum) GetAllResponseTypes() (resp []datatypes.Network_Monitor_Version1_Query_ResponseType, err error) { err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllResponseTypes", nil, &r.Options, &resp) return } -func (r Network_Monitor_Version1_Query_Host_Stratum) GetAllResponseTypesIter() (resp []datatypes.Network_Monitor_Version1_Query_ResponseType, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllResponseTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_ResponseType{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getAllResponseTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware object that these monitoring permissions applies to. func (r Network_Monitor_Version1_Query_Host_Stratum) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Monitor_Version1_Query_Host_Stratum", "getHardware", nil, &r.Options, &resp) @@ -10592,60 +6792,12 @@ func (r Network_Pod) GetAllObjects() (resp []datatypes.Network_Pod, err error) { return } -func (r Network_Pod) GetAllObjectsIter() (resp []datatypes.Network_Pod, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Pod", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Pod{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Pod", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Provides the list of capabilities a Pod fulfills. See [[SoftLayer_Network_Pod/listCapabilities]] for more information on capabilities. func (r Network_Pod) GetCapabilities() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Pod", "getCapabilities", nil, &r.Options, &resp) return } -func (r Network_Pod) GetCapabilitiesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Pod", "getCapabilities", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Pod", "getCapabilities", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Set the initialization parameter to the “name“ of the Pod to retrieve. func (r Network_Pod) GetObject() (resp datatypes.Network_Pod, err error) { err = r.Session.DoRequest("SoftLayer_Network_Pod", "getObject", nil, &r.Options, &resp) @@ -10658,30 +6810,6 @@ func (r Network_Pod) ListCapabilities() (resp []string, err error) { return } -func (r Network_Pod) ListCapabilitiesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Pod", "listCapabilities", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Pod", "listCapabilities", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Network_SecurityGroup data type contains general information for a single security group. A security group contains a set of IP filter [[SoftLayer_Network_SecurityGroup_Rule (type)|rules]] that define how to handle incoming (ingress) and outgoing (egress) traffic to both the public and private interfaces of a virtual server instance and a set of [[SoftLayer_Virtual_Network_SecurityGroup_NetworkComponentBinding (type)|bindings]] to associate virtual guest network components with the security group. type Network_SecurityGroup struct { Session session.SLSession @@ -10758,33 +6886,6 @@ func (r Network_SecurityGroup) CreateObjects(templateObjects []datatypes.Network return } -func (r Network_SecurityGroup) CreateObjectsIter(templateObjects []datatypes.Network_SecurityGroup) (resp []datatypes.Network_SecurityGroup, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_SecurityGroup{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Delete a security group for an account. A security group cannot be deleted if any network components are attached or if the security group is a remote security group for a [[SoftLayer_Network_SecurityGroup_Rule (type)|rule]]. func (r Network_SecurityGroup) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "deleteObject", nil, &r.Options, &resp) @@ -10848,90 +6949,18 @@ func (r Network_SecurityGroup) GetAllObjects() (resp []datatypes.Network_Securit return } -func (r Network_SecurityGroup) GetAllObjectsIter() (resp []datatypes.Network_SecurityGroup, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_SecurityGroup{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // List the current security group limits func (r Network_SecurityGroup) GetLimits() (resp []datatypes.Container_Network_SecurityGroup_Limit, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getLimits", nil, &r.Options, &resp) return } -func (r Network_SecurityGroup) GetLimitsIter() (resp []datatypes.Container_Network_SecurityGroup_Limit, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getLimits", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_SecurityGroup_Limit{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getLimits", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network component bindings for this security group. func (r Network_SecurityGroup) GetNetworkComponentBindings() (resp []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getNetworkComponentBindings", nil, &r.Options, &resp) return } -func (r Network_SecurityGroup) GetNetworkComponentBindingsIter() (resp []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getNetworkComponentBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getNetworkComponentBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_SecurityGroup) GetObject() (resp datatypes.Network_SecurityGroup, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getObject", nil, &r.Options, &resp) @@ -10944,90 +6973,18 @@ func (r Network_SecurityGroup) GetOrderBindings() (resp []datatypes.Network_Secu return } -func (r Network_SecurityGroup) GetOrderBindingsIter() (resp []datatypes.Network_SecurityGroup_OrderBinding, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getOrderBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_SecurityGroup_OrderBinding{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getOrderBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The rules for this security group. func (r Network_SecurityGroup) GetRules() (resp []datatypes.Network_SecurityGroup_Rule, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getRules", nil, &r.Options, &resp) return } -func (r Network_SecurityGroup) GetRulesIter() (resp []datatypes.Network_SecurityGroup_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getRules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_SecurityGroup_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getRules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // List the data centers that currently support the use of security groups. func (r Network_SecurityGroup) GetSupportedDataCenters() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getSupportedDataCenters", nil, &r.Options, &resp) return } -func (r Network_SecurityGroup) GetSupportedDataCentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getSupportedDataCenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_SecurityGroup", "getSupportedDataCenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Remove rules from a security group. func (r Network_SecurityGroup) RemoveRules(ruleIds []int) (resp datatypes.Network_SecurityGroup_RequestRules, err error) { params := []interface{}{ @@ -11292,33 +7249,6 @@ func (r Network_Storage) AllowAccessFromHostList(hostObjectTemplates []datatypes return } -func (r Network_Storage) AllowAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "allowAccessFromHostList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "allowAccessFromHostList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is used to modify the access control list for this Storage volume. The SoftLayer_Network_Subnet_IpAddress objects which have been allowed access to this storage will be listed in the allowedIpAddresses property of this storage volume. func (r Network_Storage) AllowAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -11677,60 +7607,12 @@ func (r Network_Storage) GetActiveTransactions() (resp []datatypes.Provisioning_ return } -func (r Network_Storage) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getActiveTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getActiveTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files in a Storage account's root directory. This does not download file content. func (r Network_Storage) GetAllFiles() (resp []datatypes.Container_Utility_File_Entity, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFiles", nil, &r.Options, &resp) return } -func (r Network_Storage) GetAllFilesIter() (resp []datatypes.Container_Utility_File_Entity, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files matching the filter's criteria in a Storage account's root directory. This does not download file content. func (r Network_Storage) GetAllFilesByFilter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -11740,33 +7622,6 @@ func (r Network_Storage) GetAllFilesByFilter(filter *datatypes.Container_Utility return } -func (r Network_Storage) GetAllFilesByFilterIter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { - params := []interface{}{ - filter, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFilesByFilter", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllFilesByFilter", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage) GetAllowDisasterRecoveryFailback() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowDisasterRecoveryFailback", nil, &r.Options, &resp) @@ -11788,33 +7643,6 @@ func (r Network_Storage) GetAllowableHardware(filterHostname *string) (resp []da return } -func (r Network_Storage) GetAllowableHardwareIter(filterHostname *string) (resp []datatypes.Hardware, err error) { - params := []interface{}{ - filterHostname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableHardware", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableHardware", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Subnet_IpAddress that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage) GetAllowableIpAddresses(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -11825,34 +7653,6 @@ func (r Network_Storage) GetAllowableIpAddresses(subnetId *int, filterIpAddress return } -func (r Network_Storage) GetAllowableIpAddressesIter(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { - params := []interface{}{ - subnetId, - filterIpAddress, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableIpAddresses", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableIpAddresses", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Subnet that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage) GetAllowableSubnets(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { params := []interface{}{ @@ -11862,33 +7662,6 @@ func (r Network_Storage) GetAllowableSubnets(filterNetworkIdentifier *string) (r return } -func (r Network_Storage) GetAllowableSubnetsIter(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { - params := []interface{}{ - filterNetworkIdentifier, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableSubnets", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableSubnets", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Virtual_Guest that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage) GetAllowableVirtualGuests(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -11898,63 +7671,12 @@ func (r Network_Storage) GetAllowableVirtualGuests(filterHostname *string) (resp return } -func (r Network_Storage) GetAllowableVirtualGuestsIter(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { - params := []interface{}{ - filterHostname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableVirtualGuests", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowableVirtualGuests", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume. func (r Network_Storage) GetAllowedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedHardware", nil, &r.Options, &resp) return } -func (r Network_Storage) GetAllowedHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the total number of allowed hosts limit per volume. func (r Network_Storage) GetAllowedHostsLimit() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedHostsLimit", nil, &r.Options, &resp) @@ -11967,210 +7689,42 @@ func (r Network_Storage) GetAllowedIpAddresses() (resp []datatypes.Network_Subne return } -func (r Network_Storage) GetAllowedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage) GetAllowedReplicationHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationHardware", nil, &r.Options, &resp) return } -func (r Network_Storage) GetAllowedReplicationHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet_IpAddress objects which are allowed access to this storage volume's Replicant. func (r Network_Storage) GetAllowedReplicationIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) return } -func (r Network_Storage) GetAllowedReplicationIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume's Replicant. func (r Network_Storage) GetAllowedReplicationSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationSubnets", nil, &r.Options, &resp) return } -func (r Network_Storage) GetAllowedReplicationSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage) GetAllowedReplicationVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) return } -func (r Network_Storage) GetAllowedReplicationVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedReplicationVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume. func (r Network_Storage) GetAllowedSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedSubnets", nil, &r.Options, &resp) return } -func (r Network_Storage) GetAllowedSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Virtual_Guest objects which are allowed access to this storage volume. func (r Network_Storage) GetAllowedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedVirtualGuests", nil, &r.Options, &resp) return } -func (r Network_Storage) GetAllowedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getAllowedVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current billing item for a Storage volume. func (r Network_Storage) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getBillingItem", nil, &r.Options, &resp) @@ -12193,34 +7747,6 @@ func (r Network_Storage) GetByUsername(username *string, typ *string) (resp []da return } -func (r Network_Storage) GetByUsernameIter(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - username, - typ, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getByUsername", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getByUsername", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of space used by the volume, in bytes. func (r Network_Storage) GetBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getBytesUsed", nil, &r.Options, &resp) @@ -12233,30 +7759,6 @@ func (r Network_Storage) GetCdnUrls() (resp []datatypes.Container_Network_Storag return } -func (r Network_Storage) GetCdnUrlsIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getCdnUrls", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getCdnUrls", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage) GetClusterResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getClusterResource", nil, &r.Options, &resp) @@ -12275,30 +7777,6 @@ func (r Network_Storage) GetCredentials() (resp []datatypes.Network_Storage_Cred return } -func (r Network_Storage) GetCredentialsIter() (resp []datatypes.Network_Storage_Credential, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getCredentials", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Credential{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getCredentials", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Daily Schedule which is associated with this network storage volume. func (r Network_Storage) GetDailySchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getDailySchedule", nil, &r.Options, &resp) @@ -12317,30 +7795,6 @@ func (r Network_Storage) GetDependentDuplicates() (resp []datatypes.Network_Stor return } -func (r Network_Storage) GetDependentDuplicatesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getDependentDuplicates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getDependentDuplicates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is used to check, if for the given classic file block storage volume, a transaction performing dependent to independent duplicate conversion is active. If yes, then this returns the current percentage of its progress along with its start time as [SoftLayer_Container_Network_Storage_DuplicateConversionStatusInformation] object with its name, percentage and transaction start timestamp. func (r Network_Storage) GetDuplicateConversionStatus() (resp datatypes.Container_Network_Storage_DuplicateConversionStatusInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getDuplicateConversionStatus", nil, &r.Options, &resp) @@ -12353,30 +7807,6 @@ func (r Network_Storage) GetEvents() (resp []datatypes.Network_Storage_Event, er return } -func (r Network_Storage) GetEventsIter() (resp []datatypes.Network_Storage_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determines whether the volume is allowed to failback func (r Network_Storage) GetFailbackNotAllowed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFailbackNotAllowed", nil, &r.Options, &resp) @@ -12394,30 +7824,6 @@ func (r Network_Storage) GetFileBlockEncryptedLocations() (resp []datatypes.Loca return } -func (r Network_Storage) GetFileBlockEncryptedLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileBlockEncryptedLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date of a file within a Storage account. This does not download file content. func (r Network_Storage) GetFileByIdentifier(identifier *string) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -12443,34 +7849,6 @@ func (r Network_Storage) GetFileList(folder *string, path *string) (resp []datat return } -func (r Network_Storage) GetFileListIter(folder *string, path *string) (resp []datatypes.Container_Utility_File_Entity, err error) { - params := []interface{}{ - folder, - path, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Retrieves the NFS Network Mount Address Name for a given File Storage Volume. func (r Network_Storage) GetFileNetworkMountAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileNetworkMountAddress", nil, &r.Options, &resp) @@ -12489,30 +7867,6 @@ func (r Network_Storage) GetFilesPendingDelete() (resp []datatypes.Container_Uti return } -func (r Network_Storage) GetFilesPendingDeleteIter() (resp []datatypes.Container_Utility_File_Entity, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFilesPendingDelete", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFilesPendingDelete", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage) GetFixReplicationCurrentStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFixReplicationCurrentStatus", nil, &r.Options, &resp) @@ -12525,30 +7879,6 @@ func (r Network_Storage) GetFolderList() (resp []datatypes.Container_Network_Sto return } -func (r Network_Storage) GetFolderListIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFolderList", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFolderList", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} // // getGraph() retrieves a Storage account's usage and returns a PNG graph image, title, and the minimum and maximum dates included in the graphed date range. Virtual Server storage accounts can also graph upload and download bandwidth usage. @@ -12640,30 +7970,6 @@ func (r Network_Storage) GetIscsiLuns() (resp []datatypes.Network_Storage, err e return } -func (r Network_Storage) GetIscsiLunsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiLuns", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiLuns", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes configured to be replicants of this volume. func (r Network_Storage) GetIscsiReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiReplicatingVolume", nil, &r.Options, &resp) @@ -12676,30 +7982,6 @@ func (r Network_Storage) GetIscsiTargetIpAddresses() (resp []string, err error) return } -func (r Network_Storage) GetIscsiTargetIpAddressesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiTargetIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIscsiTargetIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The ID of the LUN volume. func (r Network_Storage) GetLunId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getLunId", nil, &r.Options, &resp) @@ -12712,30 +7994,6 @@ func (r Network_Storage) GetManualSnapshots() (resp []datatypes.Network_Storage, return } -func (r Network_Storage) GetManualSnapshotsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getManualSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getManualSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage) GetMaximumExpansionSize() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getMaximumExpansionSize", nil, &r.Options, &resp) @@ -12790,30 +8048,6 @@ func (r Network_Storage) GetNotificationSubscribers() (resp []datatypes.Notifica return } -func (r Network_Storage) GetNotificationSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getNotificationSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getNotificationSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Network_Storage object whose ID corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Storage service. // // Please use the associated methods in the [[SoftLayer_Network_Storage]] service to retrieve a Storage account's id. @@ -12828,30 +8062,6 @@ func (r Network_Storage) GetObjectStorageConnectionInformation() (resp []datatyp return } -func (r Network_Storage) GetObjectStorageConnectionInformationIter() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getObjectStorageConnectionInformation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getObjectStorageConnectionInformation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve network storage accounts by SoftLayer_Network_Storage_Credential object. Use this method if you wish to retrieve a storage record by a credential rather than by id. func (r Network_Storage) GetObjectsByCredential(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -12861,33 +8071,6 @@ func (r Network_Storage) GetObjectsByCredential(credentialObject *datatypes.Netw return } -func (r Network_Storage) GetObjectsByCredentialIter(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - credentialObject, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getObjectsByCredential", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getObjectsByCredential", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The name of the snapshot that this volume was duplicated from. func (r Network_Storage) GetOriginalSnapshotName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getOriginalSnapshotName", nil, &r.Options, &resp) @@ -12930,30 +8113,6 @@ func (r Network_Storage) GetParentPartnerships() (resp []datatypes.Network_Stora return } -func (r Network_Storage) GetParentPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getParentPartnerships", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Partnership{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getParentPartnerships", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The parent volume of a volume in a complex storage relationship. func (r Network_Storage) GetParentVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getParentVolume", nil, &r.Options, &resp) @@ -12966,90 +8125,18 @@ func (r Network_Storage) GetPartnerships() (resp []datatypes.Network_Storage_Par return } -func (r Network_Storage) GetPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPartnerships", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Partnership{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPartnerships", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All permissions group(s) this volume is in. func (r Network_Storage) GetPermissionsGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPermissionsGroups", nil, &r.Options, &resp) return } -func (r Network_Storage) GetPermissionsGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPermissionsGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getPermissionsGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The properties used to provide additional details about a network storage volume. func (r Network_Storage) GetProperties() (resp []datatypes.Network_Storage_Property, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getProperties", nil, &r.Options, &resp) return } -func (r Network_Storage) GetPropertiesIter() (resp []datatypes.Network_Storage_Property, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getProperties", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Property{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getProperties", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The number of IOPs provisioned for this volume. func (r Network_Storage) GetProvisionedIops() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getProvisionedIops", nil, &r.Options, &resp) @@ -13083,30 +8170,6 @@ func (r Network_Storage) GetReplicatingLuns() (resp []datatypes.Network_Storage, return } -func (r Network_Storage) GetReplicatingLunsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicatingLuns", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicatingLuns", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volume being replicated by a volume. func (r Network_Storage) GetReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicatingVolume", nil, &r.Options, &resp) @@ -13119,60 +8182,12 @@ func (r Network_Storage) GetReplicationEvents() (resp []datatypes.Network_Storag return } -func (r Network_Storage) GetReplicationEventsIter() (resp []datatypes.Network_Storage_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes configured to be replicants of a volume. func (r Network_Storage) GetReplicationPartners() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationPartners", nil, &r.Options, &resp) return } -func (r Network_Storage) GetReplicationPartnersIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationPartners", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationPartners", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Replication Schedule associated with a network storage volume. func (r Network_Storage) GetReplicationSchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getReplicationSchedule", nil, &r.Options, &resp) @@ -13197,30 +8212,6 @@ func (r Network_Storage) GetSchedules() (resp []datatypes.Network_Storage_Schedu return } -func (r Network_Storage) GetSchedulesIter() (resp []datatypes.Network_Storage_Schedule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSchedules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Schedule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSchedules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network resource a Storage service is connected to. func (r Network_Storage) GetServiceResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getServiceResource", nil, &r.Options, &resp) @@ -13281,60 +8272,12 @@ func (r Network_Storage) GetSnapshots() (resp []datatypes.Network_Storage, err e return } -func (r Network_Storage) GetSnapshotsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of snapshots for this SoftLayer_Network_Storage volume. This method works with the result limits and offset to support pagination. func (r Network_Storage) GetSnapshotsForVolume() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshotsForVolume", nil, &r.Options, &resp) return } -func (r Network_Storage) GetSnapshotsForVolumeIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshotsForVolume", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getSnapshotsForVolume", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage) GetStaasVersion() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStaasVersion", nil, &r.Options, &resp) @@ -13347,60 +8290,12 @@ func (r Network_Storage) GetStorageGroups() (resp []datatypes.Network_Storage_Gr return } -func (r Network_Storage) GetStorageGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage) GetStorageGroupsNetworkConnectionDetails() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) return } -func (r Network_Storage) GetStorageGroupsNetworkConnectionDetailsIter() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_NetworkConnectionInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageGroupsNetworkConnectionDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage) GetStorageTierLevel() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getStorageTierLevel", nil, &r.Options, &resp) @@ -13419,30 +8314,6 @@ func (r Network_Storage) GetTargetIpAddresses() (resp []string, err error) { return } -func (r Network_Storage) GetTargetIpAddressesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getTargetIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getTargetIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of space used by the volume. func (r Network_Storage) GetTotalBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getTotalBytesUsed", nil, &r.Options, &resp) @@ -13467,30 +8338,6 @@ func (r Network_Storage) GetValidReplicationTargetDatacenterLocations() (resp [] return } -func (r Network_Storage) GetValidReplicationTargetDatacenterLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getValidReplicationTargetDatacenterLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getValidReplicationTargetDatacenterLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type of network storage service. func (r Network_Storage) GetVendorName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVendorName", nil, &r.Options, &resp) @@ -13509,30 +8356,6 @@ func (r Network_Storage) GetVolumeCountLimits() (resp []datatypes.Container_Netw return } -func (r Network_Storage) GetVolumeCountLimitsIter() (resp []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeCountLimits", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeCountLimits", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns the parameters for cloning a volume func (r Network_Storage) GetVolumeDuplicateParameters() (resp datatypes.Container_Network_Storage_VolumeDuplicateParameters, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeDuplicateParameters", nil, &r.Options, &resp) @@ -13545,30 +8368,6 @@ func (r Network_Storage) GetVolumeHistory() (resp []datatypes.Network_Storage_Hi return } -func (r Network_Storage) GetVolumeHistoryIter() (resp []datatypes.Network_Storage_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current status of a network storage volume. func (r Network_Storage) GetVolumeStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getVolumeStatus", nil, &r.Options, &resp) @@ -13691,33 +8490,6 @@ func (r Network_Storage) RemoveAccessFromHostList(hostObjectTemplates []datatype return } -func (r Network_Storage) RemoveAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "removeAccessFromHostList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "removeAccessFromHostList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is used to modify the access control list for this Storage volume. The SoftLayer_Network_Subnet_IpAddress objects which have been allowed access to this storage will be listed in the allowedIpAddresses property of this storage volume. func (r Network_Storage) RemoveAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -13920,33 +8692,6 @@ func (r Network_Storage) ValidateHostsAccess(hostObjectTemplates []datatypes.Con return } -func (r Network_Storage) ValidateHostsAccessIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Container_Network_Storage_HostsGatewayInformation, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage", "validateHostsAccess", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_HostsGatewayInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage", "validateHostsAccess", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Network_Storage_Allowed_Host struct { Session session.SLSession @@ -13996,33 +8741,6 @@ func (r Network_Storage_Allowed_Host) AssignSubnetsToAcl(subnetIds []int) (resp return } -func (r Network_Storage_Allowed_Host) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "assignSubnetsToAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "assignSubnetsToAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -14038,180 +8756,36 @@ func (r Network_Storage_Allowed_Host) GetAllObjects() (resp []datatypes.Network_ return } -func (r Network_Storage_Allowed_Host) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. func (r Network_Storage_Allowed_Host) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedGroups", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedIscsiVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedIscsiVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedNfsVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedNfsVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedReplicationVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedReplicationVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getAssignedVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getCredential", nil, &r.Options, &resp) @@ -14236,30 +8810,6 @@ func (r Network_Storage_Allowed_Host) GetSubnetsInAcl() (resp []datatypes.Networ return } -func (r Network_Storage_Allowed_Host) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getSubnetsInAcl", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "getSubnetsInAcl", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -14269,33 +8819,6 @@ func (r Network_Storage_Allowed_Host) RemoveSubnetsFromAcl(subnetIds []int) (res return } -func (r Network_Storage_Allowed_Host) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "removeSubnetsFromAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host", "removeSubnetsFromAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -14354,33 +8877,6 @@ func (r Network_Storage_Allowed_Host_Hardware) AssignSubnetsToAcl(subnetIds []in return } -func (r Network_Storage_Allowed_Host_Hardware) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "assignSubnetsToAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "assignSubnetsToAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host_Hardware) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -14402,180 +8898,36 @@ func (r Network_Storage_Allowed_Host_Hardware) GetAllObjects() (resp []datatypes return } -func (r Network_Storage_Allowed_Host_Hardware) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedGroups", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Hardware) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Hardware) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedIscsiVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedIscsiVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Hardware) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedNfsVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedNfsVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Hardware) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedReplicationVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedReplicationVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Hardware) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Hardware) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getAssignedVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host_Hardware) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getCredential", nil, &r.Options, &resp) @@ -14606,30 +8958,6 @@ func (r Network_Storage_Allowed_Host_Hardware) GetSubnetsInAcl() (resp []datatyp return } -func (r Network_Storage_Allowed_Host_Hardware) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getSubnetsInAcl", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "getSubnetsInAcl", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host_Hardware) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -14639,33 +8967,6 @@ func (r Network_Storage_Allowed_Host_Hardware) RemoveSubnetsFromAcl(subnetIds [] return } -func (r Network_Storage_Allowed_Host_Hardware) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "removeSubnetsFromAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Hardware", "removeSubnetsFromAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host_Hardware) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -14724,33 +9025,6 @@ func (r Network_Storage_Allowed_Host_IpAddress) AssignSubnetsToAcl(subnetIds []i return } -func (r Network_Storage_Allowed_Host_IpAddress) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "assignSubnetsToAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "assignSubnetsToAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host_IpAddress) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -14772,180 +9046,36 @@ func (r Network_Storage_Allowed_Host_IpAddress) GetAllObjects() (resp []datatype return } -func (r Network_Storage_Allowed_Host_IpAddress) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedGroups", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedIscsiVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedIscsiVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedNfsVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedNfsVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedReplicationVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedReplicationVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_IpAddress) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getAssignedVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host_IpAddress) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getCredential", nil, &r.Options, &resp) @@ -14976,30 +9106,6 @@ func (r Network_Storage_Allowed_Host_IpAddress) GetSubnetsInAcl() (resp []dataty return } -func (r Network_Storage_Allowed_Host_IpAddress) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getSubnetsInAcl", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "getSubnetsInAcl", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host_IpAddress) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -15009,33 +9115,6 @@ func (r Network_Storage_Allowed_Host_IpAddress) RemoveSubnetsFromAcl(subnetIds [ return } -func (r Network_Storage_Allowed_Host_IpAddress) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "removeSubnetsFromAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_IpAddress", "removeSubnetsFromAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host_IpAddress) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -15094,33 +9173,6 @@ func (r Network_Storage_Allowed_Host_Subnet) AssignSubnetsToAcl(subnetIds []int) return } -func (r Network_Storage_Allowed_Host_Subnet) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "assignSubnetsToAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "assignSubnetsToAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host_Subnet) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -15142,180 +9194,36 @@ func (r Network_Storage_Allowed_Host_Subnet) GetAllObjects() (resp []datatypes.N return } -func (r Network_Storage_Allowed_Host_Subnet) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedGroups", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Subnet) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedIscsiVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedIscsiVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Subnet) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedIscsiVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedIscsiVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Subnet) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedNfsVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedNfsVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Subnet) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedReplicationVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedReplicationVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_Subnet) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_Subnet) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getAssignedVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host_Subnet) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getCredential", nil, &r.Options, &resp) @@ -15346,30 +9254,6 @@ func (r Network_Storage_Allowed_Host_Subnet) GetSubnetsInAcl() (resp []datatypes return } -func (r Network_Storage_Allowed_Host_Subnet) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getSubnetsInAcl", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "getSubnetsInAcl", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host_Subnet) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -15379,33 +9263,6 @@ func (r Network_Storage_Allowed_Host_Subnet) RemoveSubnetsFromAcl(subnetIds []in return } -func (r Network_Storage_Allowed_Host_Subnet) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "removeSubnetsFromAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_Subnet", "removeSubnetsFromAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host_Subnet) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -15464,33 +9321,6 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) AssignSubnetsToAcl(subnetIds return } -func (r Network_Storage_Allowed_Host_VirtualGuest) AssignSubnetsToAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "assignSubnetsToAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "assignSubnetsToAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host_VirtualGuest) EditObject(templateObject *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) { params := []interface{}{ @@ -15512,57 +9342,9 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) GetAllObjects() (resp []datat return } -func (r Network_Storage_Allowed_Host_VirtualGuest) GetAllObjectsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Group objects this SoftLayer_Network_Storage_Allowed_Host is present in. -func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedGroups", nil, &r.Options, &resp) - return -} - -func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() +func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -15572,120 +9354,24 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedIscsiVolumes() (re return } -func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedIscsiVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedIscsiVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedIscsiVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedNfsVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedNfsVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedNfsVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedNfsVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedNfsVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage primary volumes whose replicas are allowed access. func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedReplicationVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedReplicationVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedReplicationVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedReplicationVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedReplicationVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage volumes to which this SoftLayer_Network_Storage_Allowed_Host is allowed access. func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Allowed_Host_VirtualGuest) GetAssignedVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getAssignedVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Credential this allowed host uses. func (r Network_Storage_Allowed_Host_VirtualGuest) GetCredential() (resp datatypes.Network_Storage_Credential, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getCredential", nil, &r.Options, &resp) @@ -15716,30 +9402,6 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) GetSubnetsInAcl() (resp []dat return } -func (r Network_Storage_Allowed_Host_VirtualGuest) GetSubnetsInAclIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getSubnetsInAcl", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "getSubnetsInAcl", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Allowed_Host_VirtualGuest) RemoveSubnetsFromAcl(subnetIds []int) (resp []int, err error) { params := []interface{}{ @@ -15749,33 +9411,6 @@ func (r Network_Storage_Allowed_Host_VirtualGuest) RemoveSubnetsFromAcl(subnetId return } -func (r Network_Storage_Allowed_Host_VirtualGuest) RemoveSubnetsFromAclIter(subnetIds []int) (resp []int, err error) { - params := []interface{}{ - subnetIds, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "removeSubnetsFromAcl", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Allowed_Host_VirtualGuest", "removeSubnetsFromAcl", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method to modify the credential password for a SoftLayer_Network_Storage_Allowed_Host object. func (r Network_Storage_Allowed_Host_VirtualGuest) SetCredentialPassword(password *string) (resp bool, err error) { params := []interface{}{ @@ -15862,33 +9497,6 @@ func (r Network_Storage_Backup_Evault) AllowAccessFromHostList(hostObjectTemplat return } -func (r Network_Storage_Backup_Evault) AllowAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "allowAccessFromHostList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "allowAccessFromHostList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is used to modify the access control list for this Storage volume. The SoftLayer_Network_Subnet_IpAddress objects which have been allowed access to this storage will be listed in the allowedIpAddresses property of this storage volume. func (r Network_Storage_Backup_Evault) AllowAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -16258,60 +9866,12 @@ func (r Network_Storage_Backup_Evault) GetActiveTransactions() (resp []datatypes return } -func (r Network_Storage_Backup_Evault) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getActiveTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getActiveTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files in a Storage account's root directory. This does not download file content. func (r Network_Storage_Backup_Evault) GetAllFiles() (resp []datatypes.Container_Utility_File_Entity, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFiles", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetAllFilesIter() (resp []datatypes.Container_Utility_File_Entity, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files matching the filter's criteria in a Storage account's root directory. This does not download file content. func (r Network_Storage_Backup_Evault) GetAllFilesByFilter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -16321,33 +9881,6 @@ func (r Network_Storage_Backup_Evault) GetAllFilesByFilter(filter *datatypes.Con return } -func (r Network_Storage_Backup_Evault) GetAllFilesByFilterIter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { - params := []interface{}{ - filter, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFilesByFilter", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllFilesByFilter", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Backup_Evault) GetAllowDisasterRecoveryFailback() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowDisasterRecoveryFailback", nil, &r.Options, &resp) @@ -16369,33 +9902,6 @@ func (r Network_Storage_Backup_Evault) GetAllowableHardware(filterHostname *stri return } -func (r Network_Storage_Backup_Evault) GetAllowableHardwareIter(filterHostname *string) (resp []datatypes.Hardware, err error) { - params := []interface{}{ - filterHostname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableHardware", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableHardware", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Subnet_IpAddress that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Backup_Evault) GetAllowableIpAddresses(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -16406,34 +9912,6 @@ func (r Network_Storage_Backup_Evault) GetAllowableIpAddresses(subnetId *int, fi return } -func (r Network_Storage_Backup_Evault) GetAllowableIpAddressesIter(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { - params := []interface{}{ - subnetId, - filterIpAddress, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableIpAddresses", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableIpAddresses", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Subnet that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Backup_Evault) GetAllowableSubnets(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { params := []interface{}{ @@ -16443,33 +9921,6 @@ func (r Network_Storage_Backup_Evault) GetAllowableSubnets(filterNetworkIdentifi return } -func (r Network_Storage_Backup_Evault) GetAllowableSubnetsIter(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { - params := []interface{}{ - filterNetworkIdentifier, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableSubnets", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableSubnets", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Virtual_Guest that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Backup_Evault) GetAllowableVirtualGuests(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -16479,63 +9930,12 @@ func (r Network_Storage_Backup_Evault) GetAllowableVirtualGuests(filterHostname return } -func (r Network_Storage_Backup_Evault) GetAllowableVirtualGuestsIter(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { - params := []interface{}{ - filterHostname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableVirtualGuests", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowableVirtualGuests", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume. func (r Network_Storage_Backup_Evault) GetAllowedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedHardware", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetAllowedHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the total number of allowed hosts limit per volume. func (r Network_Storage_Backup_Evault) GetAllowedHostsLimit() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedHostsLimit", nil, &r.Options, &resp) @@ -16548,210 +9948,42 @@ func (r Network_Storage_Backup_Evault) GetAllowedIpAddresses() (resp []datatypes return } -func (r Network_Storage_Backup_Evault) GetAllowedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Backup_Evault) GetAllowedReplicationHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationHardware", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetAllowedReplicationHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet_IpAddress objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Backup_Evault) GetAllowedReplicationIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetAllowedReplicationIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Backup_Evault) GetAllowedReplicationSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationSubnets", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetAllowedReplicationSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Backup_Evault) GetAllowedReplicationVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetAllowedReplicationVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedReplicationVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume. func (r Network_Storage_Backup_Evault) GetAllowedSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedSubnets", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetAllowedSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Virtual_Guest objects which are allowed access to this storage volume. func (r Network_Storage_Backup_Evault) GetAllowedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedVirtualGuests", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetAllowedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getAllowedVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current billing item for a Storage volume. func (r Network_Storage_Backup_Evault) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getBillingItem", nil, &r.Options, &resp) @@ -16774,34 +10006,6 @@ func (r Network_Storage_Backup_Evault) GetByUsername(username *string, typ *stri return } -func (r Network_Storage_Backup_Evault) GetByUsernameIter(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - username, - typ, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getByUsername", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getByUsername", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of space used by the volume, in bytes. func (r Network_Storage_Backup_Evault) GetBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getBytesUsed", nil, &r.Options, &resp) @@ -16814,30 +10018,6 @@ func (r Network_Storage_Backup_Evault) GetCdnUrls() (resp []datatypes.Container_ return } -func (r Network_Storage_Backup_Evault) GetCdnUrlsIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getCdnUrls", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getCdnUrls", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Backup_Evault) GetClusterResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getClusterResource", nil, &r.Options, &resp) @@ -16856,30 +10036,6 @@ func (r Network_Storage_Backup_Evault) GetCredentials() (resp []datatypes.Networ return } -func (r Network_Storage_Backup_Evault) GetCredentialsIter() (resp []datatypes.Network_Storage_Credential, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getCredentials", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Credential{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getCredentials", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Daily Schedule which is associated with this network storage volume. func (r Network_Storage_Backup_Evault) GetDailySchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getDailySchedule", nil, &r.Options, &resp) @@ -16898,30 +10054,6 @@ func (r Network_Storage_Backup_Evault) GetDependentDuplicates() (resp []datatype return } -func (r Network_Storage_Backup_Evault) GetDependentDuplicatesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getDependentDuplicates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getDependentDuplicates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is used to check, if for the given classic file block storage volume, a transaction performing dependent to independent duplicate conversion is active. If yes, then this returns the current percentage of its progress along with its start time as [SoftLayer_Container_Network_Storage_DuplicateConversionStatusInformation] object with its name, percentage and transaction start timestamp. func (r Network_Storage_Backup_Evault) GetDuplicateConversionStatus() (resp datatypes.Container_Network_Storage_DuplicateConversionStatusInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getDuplicateConversionStatus", nil, &r.Options, &resp) @@ -16934,30 +10066,6 @@ func (r Network_Storage_Backup_Evault) GetEvents() (resp []datatypes.Network_Sto return } -func (r Network_Storage_Backup_Evault) GetEventsIter() (resp []datatypes.Network_Storage_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determines whether the volume is allowed to failback func (r Network_Storage_Backup_Evault) GetFailbackNotAllowed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFailbackNotAllowed", nil, &r.Options, &resp) @@ -16975,30 +10083,6 @@ func (r Network_Storage_Backup_Evault) GetFileBlockEncryptedLocations() (resp [] return } -func (r Network_Storage_Backup_Evault) GetFileBlockEncryptedLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileBlockEncryptedLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date of a file within a Storage account. This does not download file content. func (r Network_Storage_Backup_Evault) GetFileByIdentifier(identifier *string) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -17024,34 +10108,6 @@ func (r Network_Storage_Backup_Evault) GetFileList(folder *string, path *string) return } -func (r Network_Storage_Backup_Evault) GetFileListIter(folder *string, path *string) (resp []datatypes.Container_Utility_File_Entity, err error) { - params := []interface{}{ - folder, - path, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Retrieves the NFS Network Mount Address Name for a given File Storage Volume. func (r Network_Storage_Backup_Evault) GetFileNetworkMountAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileNetworkMountAddress", nil, &r.Options, &resp) @@ -17070,30 +10126,6 @@ func (r Network_Storage_Backup_Evault) GetFilesPendingDelete() (resp []datatypes return } -func (r Network_Storage_Backup_Evault) GetFilesPendingDeleteIter() (resp []datatypes.Container_Utility_File_Entity, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFilesPendingDelete", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFilesPendingDelete", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Backup_Evault) GetFixReplicationCurrentStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFixReplicationCurrentStatus", nil, &r.Options, &resp) @@ -17106,30 +10138,6 @@ func (r Network_Storage_Backup_Evault) GetFolderList() (resp []datatypes.Contain return } -func (r Network_Storage_Backup_Evault) GetFolderListIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFolderList", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFolderList", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} // // getGraph() retrieves a Storage account's usage and returns a PNG graph image, title, and the minimum and maximum dates included in the graphed date range. Virtual Server storage accounts can also graph upload and download bandwidth usage. @@ -17165,36 +10173,6 @@ func (r Network_Storage_Backup_Evault) GetHardwareWithEvaultFirst(option *string return } -func (r Network_Storage_Backup_Evault) GetHardwareWithEvaultFirstIter(option *string, exactMatch *bool, criteria *string, mode *string) (resp []datatypes.Hardware, err error) { - params := []interface{}{ - option, - exactMatch, - criteria, - mode, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getHardwareWithEvaultFirst", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getHardwareWithEvaultFirst", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Backup_Evault) GetHasEncryptionAtRest() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getHasEncryptionAtRest", nil, &r.Options, &resp) @@ -17267,30 +10245,6 @@ func (r Network_Storage_Backup_Evault) GetIscsiLuns() (resp []datatypes.Network_ return } -func (r Network_Storage_Backup_Evault) GetIscsiLunsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiLuns", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiLuns", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes configured to be replicants of this volume. func (r Network_Storage_Backup_Evault) GetIscsiReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiReplicatingVolume", nil, &r.Options, &resp) @@ -17303,30 +10257,6 @@ func (r Network_Storage_Backup_Evault) GetIscsiTargetIpAddresses() (resp []strin return } -func (r Network_Storage_Backup_Evault) GetIscsiTargetIpAddressesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiTargetIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIscsiTargetIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The ID of the LUN volume. func (r Network_Storage_Backup_Evault) GetLunId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getLunId", nil, &r.Options, &resp) @@ -17339,30 +10269,6 @@ func (r Network_Storage_Backup_Evault) GetManualSnapshots() (resp []datatypes.Ne return } -func (r Network_Storage_Backup_Evault) GetManualSnapshotsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getManualSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getManualSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Backup_Evault) GetMaximumExpansionSize() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getMaximumExpansionSize", nil, &r.Options, &resp) @@ -17407,37 +10313,13 @@ func (r Network_Storage_Backup_Evault) GetNetworkMountAddress() (resp string, er // no documentation yet func (r Network_Storage_Backup_Evault) GetNetworkMountPath() (resp string, err error) { - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getNetworkMountPath", nil, &r.Options, &resp) - return -} - -// Retrieve The subscribers that will be notified for usage amount warnings and overages. -func (r Network_Storage_Backup_Evault) GetNotificationSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getNotificationSubscribers", nil, &r.Options, &resp) + err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getNetworkMountPath", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetNotificationSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { - limit := r.Options.ValidateLimit() +// Retrieve The subscribers that will be notified for usage amount warnings and overages. +func (r Network_Storage_Backup_Evault) GetNotificationSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getNotificationSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getNotificationSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -17453,30 +10335,6 @@ func (r Network_Storage_Backup_Evault) GetObjectStorageConnectionInformation() ( return } -func (r Network_Storage_Backup_Evault) GetObjectStorageConnectionInformationIter() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObjectStorageConnectionInformation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObjectStorageConnectionInformation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve network storage accounts by SoftLayer_Network_Storage_Credential object. Use this method if you wish to retrieve a storage record by a credential rather than by id. func (r Network_Storage_Backup_Evault) GetObjectsByCredential(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -17486,33 +10344,6 @@ func (r Network_Storage_Backup_Evault) GetObjectsByCredential(credentialObject * return } -func (r Network_Storage_Backup_Evault) GetObjectsByCredentialIter(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - credentialObject, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObjectsByCredential", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getObjectsByCredential", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The name of the snapshot that this volume was duplicated from. func (r Network_Storage_Backup_Evault) GetOriginalSnapshotName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getOriginalSnapshotName", nil, &r.Options, &resp) @@ -17555,30 +10386,6 @@ func (r Network_Storage_Backup_Evault) GetParentPartnerships() (resp []datatypes return } -func (r Network_Storage_Backup_Evault) GetParentPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getParentPartnerships", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Partnership{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getParentPartnerships", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The parent volume of a volume in a complex storage relationship. func (r Network_Storage_Backup_Evault) GetParentVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getParentVolume", nil, &r.Options, &resp) @@ -17591,90 +10398,18 @@ func (r Network_Storage_Backup_Evault) GetPartnerships() (resp []datatypes.Netwo return } -func (r Network_Storage_Backup_Evault) GetPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPartnerships", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Partnership{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPartnerships", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All permissions group(s) this volume is in. func (r Network_Storage_Backup_Evault) GetPermissionsGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPermissionsGroups", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetPermissionsGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPermissionsGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getPermissionsGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The properties used to provide additional details about a network storage volume. func (r Network_Storage_Backup_Evault) GetProperties() (resp []datatypes.Network_Storage_Property, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getProperties", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetPropertiesIter() (resp []datatypes.Network_Storage_Property, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getProperties", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Property{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getProperties", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The number of IOPs provisioned for this volume. func (r Network_Storage_Backup_Evault) GetProvisionedIops() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getProvisionedIops", nil, &r.Options, &resp) @@ -17708,30 +10443,6 @@ func (r Network_Storage_Backup_Evault) GetReplicatingLuns() (resp []datatypes.Ne return } -func (r Network_Storage_Backup_Evault) GetReplicatingLunsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicatingLuns", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicatingLuns", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volume being replicated by a volume. func (r Network_Storage_Backup_Evault) GetReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicatingVolume", nil, &r.Options, &resp) @@ -17744,60 +10455,12 @@ func (r Network_Storage_Backup_Evault) GetReplicationEvents() (resp []datatypes. return } -func (r Network_Storage_Backup_Evault) GetReplicationEventsIter() (resp []datatypes.Network_Storage_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes configured to be replicants of a volume. func (r Network_Storage_Backup_Evault) GetReplicationPartners() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationPartners", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetReplicationPartnersIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationPartners", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationPartners", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Replication Schedule associated with a network storage volume. func (r Network_Storage_Backup_Evault) GetReplicationSchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getReplicationSchedule", nil, &r.Options, &resp) @@ -17822,30 +10485,6 @@ func (r Network_Storage_Backup_Evault) GetSchedules() (resp []datatypes.Network_ return } -func (r Network_Storage_Backup_Evault) GetSchedulesIter() (resp []datatypes.Network_Storage_Schedule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSchedules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Schedule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSchedules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network resource a Storage service is connected to. func (r Network_Storage_Backup_Evault) GetServiceResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getServiceResource", nil, &r.Options, &resp) @@ -17906,60 +10545,12 @@ func (r Network_Storage_Backup_Evault) GetSnapshots() (resp []datatypes.Network_ return } -func (r Network_Storage_Backup_Evault) GetSnapshotsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of snapshots for this SoftLayer_Network_Storage volume. This method works with the result limits and offset to support pagination. func (r Network_Storage_Backup_Evault) GetSnapshotsForVolume() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshotsForVolume", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetSnapshotsForVolumeIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshotsForVolume", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getSnapshotsForVolume", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Backup_Evault) GetStaasVersion() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStaasVersion", nil, &r.Options, &resp) @@ -17972,60 +10563,12 @@ func (r Network_Storage_Backup_Evault) GetStorageGroups() (resp []datatypes.Netw return } -func (r Network_Storage_Backup_Evault) GetStorageGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Backup_Evault) GetStorageGroupsNetworkConnectionDetails() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) return } -func (r Network_Storage_Backup_Evault) GetStorageGroupsNetworkConnectionDetailsIter() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_NetworkConnectionInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageGroupsNetworkConnectionDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Backup_Evault) GetStorageTierLevel() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getStorageTierLevel", nil, &r.Options, &resp) @@ -18044,30 +10587,6 @@ func (r Network_Storage_Backup_Evault) GetTargetIpAddresses() (resp []string, er return } -func (r Network_Storage_Backup_Evault) GetTargetIpAddressesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getTargetIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getTargetIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of space used by the volume. func (r Network_Storage_Backup_Evault) GetTotalBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getTotalBytesUsed", nil, &r.Options, &resp) @@ -18092,30 +10611,6 @@ func (r Network_Storage_Backup_Evault) GetValidReplicationTargetDatacenterLocati return } -func (r Network_Storage_Backup_Evault) GetValidReplicationTargetDatacenterLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getValidReplicationTargetDatacenterLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getValidReplicationTargetDatacenterLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type of network storage service. func (r Network_Storage_Backup_Evault) GetVendorName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVendorName", nil, &r.Options, &resp) @@ -18134,30 +10629,6 @@ func (r Network_Storage_Backup_Evault) GetVolumeCountLimits() (resp []datatypes. return } -func (r Network_Storage_Backup_Evault) GetVolumeCountLimitsIter() (resp []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeCountLimits", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeCountLimits", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns the parameters for cloning a volume func (r Network_Storage_Backup_Evault) GetVolumeDuplicateParameters() (resp datatypes.Container_Network_Storage_VolumeDuplicateParameters, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeDuplicateParameters", nil, &r.Options, &resp) @@ -18170,30 +10641,6 @@ func (r Network_Storage_Backup_Evault) GetVolumeHistory() (resp []datatypes.Netw return } -func (r Network_Storage_Backup_Evault) GetVolumeHistoryIter() (resp []datatypes.Network_Storage_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current status of a network storage volume. func (r Network_Storage_Backup_Evault) GetVolumeStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getVolumeStatus", nil, &r.Options, &resp) @@ -18337,33 +10784,6 @@ func (r Network_Storage_Backup_Evault) RemoveAccessFromHostList(hostObjectTempla return } -func (r Network_Storage_Backup_Evault) RemoveAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "removeAccessFromHostList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "removeAccessFromHostList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is used to modify the access control list for this Storage volume. The SoftLayer_Network_Subnet_IpAddress objects which have been allowed access to this storage will be listed in the allowedIpAddresses property of this storage volume. func (r Network_Storage_Backup_Evault) RemoveAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -18566,33 +10986,6 @@ func (r Network_Storage_Backup_Evault) ValidateHostsAccess(hostObjectTemplates [ return } -func (r Network_Storage_Backup_Evault) ValidateHostsAccessIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Container_Network_Storage_HostsGatewayInformation, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "validateHostsAccess", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_HostsGatewayInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "validateHostsAccess", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Network_Storage_DedicatedCluster struct { Session session.SLSession @@ -18645,30 +11038,6 @@ func (r Network_Storage_DedicatedCluster) GetDedicatedClusterList() (resp []int, return } -func (r Network_Storage_DedicatedCluster) GetDedicatedClusterListIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_DedicatedCluster", "getDedicatedClusterList", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_DedicatedCluster", "getDedicatedClusterList", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_DedicatedCluster) GetObject() (resp datatypes.Network_Storage_DedicatedCluster, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_DedicatedCluster", "getObject", nil, &r.Options, &resp) @@ -18775,90 +11144,18 @@ func (r Network_Storage_Group) GetAllObjects() (resp []datatypes.Network_Storage return } -func (r Network_Storage_Group) GetAllObjectsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The allowed hosts list for this group. func (r Network_Storage_Group) GetAllowedHosts() (resp []datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllowedHosts", nil, &r.Options, &resp) return } -func (r Network_Storage_Group) GetAllowedHostsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllowedHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAllowedHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes this group is attached to. func (r Network_Storage_Group) GetAttachedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAttachedVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Group) GetAttachedVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAttachedVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getAttachedVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type which defines this group. func (r Network_Storage_Group) GetGroupType() (resp datatypes.Network_Storage_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group", "getGroupType", nil, &r.Options, &resp) @@ -19001,90 +11298,18 @@ func (r Network_Storage_Group_Iscsi) GetAllObjects() (resp []datatypes.Network_S return } -func (r Network_Storage_Group_Iscsi) GetAllObjectsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The allowed hosts list for this group. func (r Network_Storage_Group_Iscsi) GetAllowedHosts() (resp []datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllowedHosts", nil, &r.Options, &resp) return } -func (r Network_Storage_Group_Iscsi) GetAllowedHostsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllowedHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAllowedHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes this group is attached to. func (r Network_Storage_Group_Iscsi) GetAttachedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAttachedVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Group_Iscsi) GetAttachedVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAttachedVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getAttachedVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type which defines this group. func (r Network_Storage_Group_Iscsi) GetGroupType() (resp datatypes.Network_Storage_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "getGroupType", nil, &r.Options, &resp) @@ -19227,90 +11452,18 @@ func (r Network_Storage_Group_Nfs) GetAllObjects() (resp []datatypes.Network_Sto return } -func (r Network_Storage_Group_Nfs) GetAllObjectsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The allowed hosts list for this group. func (r Network_Storage_Group_Nfs) GetAllowedHosts() (resp []datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllowedHosts", nil, &r.Options, &resp) return } -func (r Network_Storage_Group_Nfs) GetAllowedHostsIter() (resp []datatypes.Network_Storage_Allowed_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllowedHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAllowedHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes this group is attached to. func (r Network_Storage_Group_Nfs) GetAttachedVolumes() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAttachedVolumes", nil, &r.Options, &resp) return } -func (r Network_Storage_Group_Nfs) GetAttachedVolumesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAttachedVolumes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getAttachedVolumes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type which defines this group. func (r Network_Storage_Group_Nfs) GetGroupType() (resp datatypes.Network_Storage_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Nfs", "getGroupType", nil, &r.Options, &resp) @@ -19405,30 +11558,6 @@ func (r Network_Storage_Group_Type) GetAllObjects() (resp []datatypes.Network_St return } -func (r Network_Storage_Group_Type) GetAllObjectsIter() (resp []datatypes.Network_Storage_Group_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Group_Type) GetObject() (resp datatypes.Network_Storage_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Type", "getObject", nil, &r.Options, &resp) @@ -19481,30 +11610,6 @@ func (r Network_Storage_Hub_Cleversafe_Account) CredentialCreate() (resp []datat return } -func (r Network_Storage_Hub_Cleversafe_Account) CredentialCreateIter() (resp []datatypes.Network_Storage_Credential, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "credentialCreate", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Credential{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "credentialCreate", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Delete a credential func (r Network_Storage_Hub_Cleversafe_Account) CredentialDelete(credential *datatypes.Network_Storage_Credential) (resp bool, err error) { params := []interface{}{ @@ -19526,30 +11631,6 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetAllObjects() (resp []datatype return } -func (r Network_Storage_Hub_Cleversafe_Account) GetAllObjectsIter() (resp []datatypes.Network_Storage_Hub_Cleversafe_Account, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Hub_Cleversafe_Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An associated parent billing item which is active. Includes billing items which are scheduled to be cancelled in the future. func (r Network_Storage_Hub_Cleversafe_Account) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getBillingItem", nil, &r.Options, &resp) @@ -19562,30 +11643,6 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetBuckets() (resp []datatypes.C return } -func (r Network_Storage_Hub_Cleversafe_Account) GetBucketsIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Bucket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getBuckets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Bucket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getBuckets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An associated parent billing item which has been cancelled. func (r Network_Storage_Hub_Cleversafe_Account) GetCancelledBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCancelledBillingItem", nil, &r.Options, &resp) @@ -19623,37 +11680,6 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetCloudObjectStorageMetrics(sta return } -func (r Network_Storage_Hub_Cleversafe_Account) GetCloudObjectStorageMetricsIter(start *string, end *string, storageLocation *string, storageClass *string, metrics *string) (resp []string, err error) { - params := []interface{}{ - start, - end, - storageLocation, - storageClass, - metrics, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCloudObjectStorageMetrics", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCloudObjectStorageMetrics", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns credential limits for this IBM Cloud Object Storage account. func (r Network_Storage_Hub_Cleversafe_Account) GetCredentialLimit() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCredentialLimit", nil, &r.Options, &resp) @@ -19662,105 +11688,26 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetCredentialLimit() (resp int, // Retrieve Credentials used for generating an AWS signature. Max of 2. func (r Network_Storage_Hub_Cleversafe_Account) GetCredentials() (resp []datatypes.Network_Storage_Credential, err error) { - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCredentials", nil, &r.Options, &resp) - return -} - -func (r Network_Storage_Hub_Cleversafe_Account) GetCredentialsIter() (resp []datatypes.Network_Storage_Credential, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCredentials", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Credential{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCredentials", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - -// Returns a collection of endpoint URLs available to this IBM Cloud Object Storage account. -func (r Network_Storage_Hub_Cleversafe_Account) GetEndpoints(accountId *int) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { - params := []interface{}{ - accountId, - } - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpoints", params, &r.Options, &resp) - return -} - -func (r Network_Storage_Hub_Cleversafe_Account) GetEndpointsIter(accountId *int) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { - params := []interface{}{ - accountId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpoints", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpoints", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getCredentials", nil, &r.Options, &resp) return } // Returns a collection of endpoint URLs available to this IBM Cloud Object Storage account. -func (r Network_Storage_Hub_Cleversafe_Account) GetEndpointsWithRefetch(accountId *int, refetch *bool) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { +func (r Network_Storage_Hub_Cleversafe_Account) GetEndpoints(accountId *int) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { params := []interface{}{ accountId, - refetch, } - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpointsWithRefetch", params, &r.Options, &resp) + err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpoints", params, &r.Options, &resp) return } -func (r Network_Storage_Hub_Cleversafe_Account) GetEndpointsWithRefetchIter(accountId *int, refetch *bool) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { +// Returns a collection of endpoint URLs available to this IBM Cloud Object Storage account. +func (r Network_Storage_Hub_Cleversafe_Account) GetEndpointsWithRefetch(accountId *int, refetch *bool) (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint, err error) { params := []interface{}{ accountId, refetch, } - limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpointsWithRefetch", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Endpoint{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Cleversafe_Account", "getEndpointsWithRefetch", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -19834,36 +11781,6 @@ func (r Network_Storage_Hub_Swift_Metrics) GetMetricData(startDateTime *datatype return } -func (r Network_Storage_Hub_Swift_Metrics) GetMetricDataIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, metricKey *string, location *string) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - metricKey, - location, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Metrics", "getMetricData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Metrics", "getMetricData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Hub_Swift_Metrics) GetSummaryData(startDateTime *datatypes.Time, endDateTime *datatypes.Time, validTypes []datatypes.Container_Metric_Data_Type, summaryPeriod *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -19876,36 +11793,6 @@ func (r Network_Storage_Hub_Swift_Metrics) GetSummaryData(startDateTime *datatyp return } -func (r Network_Storage_Hub_Swift_Metrics) GetSummaryDataIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, validTypes []datatypes.Container_Metric_Data_Type, summaryPeriod *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - validTypes, - summaryPeriod, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Metrics", "getSummaryData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Metrics", "getSummaryData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Network_Storage_Hub_Swift_Share struct { Session session.SLSession @@ -19952,30 +11839,6 @@ func (r Network_Storage_Hub_Swift_Share) GetContainerList() (resp []datatypes.Co return } -func (r Network_Storage_Hub_Swift_Share) GetContainerListIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Share", "getContainerList", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Share", "getContainerList", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns a file object given the file's full name. func (r Network_Storage_Hub_Swift_Share) GetFile(fileName *string, container *string) (resp datatypes.Container_Network_Storage_Hub_ObjectStorage_File, err error) { params := []interface{}{ @@ -19996,34 +11859,6 @@ func (r Network_Storage_Hub_Swift_Share) GetFileList(container *string, path *st return } -func (r Network_Storage_Hub_Swift_Share) GetFileListIter(container *string, path *string) (resp []datatypes.Container_Utility_File_Entity, err error) { - params := []interface{}{ - container, - path, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Share", "getFileList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Hub_Swift_Share", "getFileList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The iscsi data type provides access to additional information about an iscsi volume such as the snapshot capacity limit and replication partners. type Network_Storage_Iscsi struct { Session session.SLSession @@ -20101,33 +11936,6 @@ func (r Network_Storage_Iscsi) AllowAccessFromHostList(hostObjectTemplates []dat return } -func (r Network_Storage_Iscsi) AllowAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "allowAccessFromHostList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "allowAccessFromHostList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Iscsi) AllowAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -20486,60 +12294,12 @@ func (r Network_Storage_Iscsi) GetActiveTransactions() (resp []datatypes.Provisi return } -func (r Network_Storage_Iscsi) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getActiveTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getActiveTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files in a Storage account's root directory. This does not download file content. func (r Network_Storage_Iscsi) GetAllFiles() (resp []datatypes.Container_Utility_File_Entity, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFiles", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetAllFilesIter() (resp []datatypes.Container_Utility_File_Entity, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date for all files matching the filter's criteria in a Storage account's root directory. This does not download file content. func (r Network_Storage_Iscsi) GetAllFilesByFilter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -20549,33 +12309,6 @@ func (r Network_Storage_Iscsi) GetAllFilesByFilter(filter *datatypes.Container_U return } -func (r Network_Storage_Iscsi) GetAllFilesByFilterIter(filter *datatypes.Container_Utility_File_Entity) (resp []datatypes.Container_Utility_File_Entity, err error) { - params := []interface{}{ - filter, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFilesByFilter", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllFilesByFilter", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Iscsi) GetAllowDisasterRecoveryFailback() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowDisasterRecoveryFailback", nil, &r.Options, &resp) @@ -20597,33 +12330,6 @@ func (r Network_Storage_Iscsi) GetAllowableHardware(filterHostname *string) (res return } -func (r Network_Storage_Iscsi) GetAllowableHardwareIter(filterHostname *string) (resp []datatypes.Hardware, err error) { - params := []interface{}{ - filterHostname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableHardware", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableHardware", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Subnet_IpAddress that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Iscsi) GetAllowableIpAddresses(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -20634,34 +12340,6 @@ func (r Network_Storage_Iscsi) GetAllowableIpAddresses(subnetId *int, filterIpAd return } -func (r Network_Storage_Iscsi) GetAllowableIpAddressesIter(subnetId *int, filterIpAddress *string) (resp []datatypes.Network_Subnet_IpAddress, err error) { - params := []interface{}{ - subnetId, - filterIpAddress, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableIpAddresses", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableIpAddresses", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Subnet that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Iscsi) GetAllowableSubnets(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { params := []interface{}{ @@ -20671,33 +12349,6 @@ func (r Network_Storage_Iscsi) GetAllowableSubnets(filterNetworkIdentifier *stri return } -func (r Network_Storage_Iscsi) GetAllowableSubnetsIter(filterNetworkIdentifier *string) (resp []datatypes.Network_Subnet, err error) { - params := []interface{}{ - filterNetworkIdentifier, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableSubnets", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableSubnets", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Virtual_Guest that can be authorized to this SoftLayer_Network_Storage. func (r Network_Storage_Iscsi) GetAllowableVirtualGuests(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -20707,63 +12358,12 @@ func (r Network_Storage_Iscsi) GetAllowableVirtualGuests(filterHostname *string) return } -func (r Network_Storage_Iscsi) GetAllowableVirtualGuestsIter(filterHostname *string) (resp []datatypes.Virtual_Guest, err error) { - params := []interface{}{ - filterHostname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableVirtualGuests", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowableVirtualGuests", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume. func (r Network_Storage_Iscsi) GetAllowedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedHardware", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetAllowedHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the total number of allowed hosts limit per volume. func (r Network_Storage_Iscsi) GetAllowedHostsLimit() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedHostsLimit", nil, &r.Options, &resp) @@ -20776,210 +12376,42 @@ func (r Network_Storage_Iscsi) GetAllowedIpAddresses() (resp []datatypes.Network return } -func (r Network_Storage_Iscsi) GetAllowedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Iscsi) GetAllowedReplicationHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationHardware", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetAllowedReplicationHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet_IpAddress objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Iscsi) GetAllowedReplicationIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetAllowedReplicationIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Iscsi) GetAllowedReplicationSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationSubnets", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetAllowedReplicationSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Hardware objects which are allowed access to this storage volume's Replicant. func (r Network_Storage_Iscsi) GetAllowedReplicationVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetAllowedReplicationVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedReplicationVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Subnet objects which are allowed access to this storage volume. func (r Network_Storage_Iscsi) GetAllowedSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedSubnets", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetAllowedSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Virtual_Guest objects which are allowed access to this storage volume. func (r Network_Storage_Iscsi) GetAllowedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedVirtualGuests", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetAllowedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getAllowedVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current billing item for a Storage volume. func (r Network_Storage_Iscsi) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getBillingItem", nil, &r.Options, &resp) @@ -21002,34 +12434,6 @@ func (r Network_Storage_Iscsi) GetByUsername(username *string, typ *string) (res return } -func (r Network_Storage_Iscsi) GetByUsernameIter(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - username, - typ, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getByUsername", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getByUsername", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of space used by the volume, in bytes. func (r Network_Storage_Iscsi) GetBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getBytesUsed", nil, &r.Options, &resp) @@ -21042,30 +12446,6 @@ func (r Network_Storage_Iscsi) GetCdnUrls() (resp []datatypes.Container_Network_ return } -func (r Network_Storage_Iscsi) GetCdnUrlsIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getCdnUrls", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_ContentDeliveryUrl{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getCdnUrls", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Iscsi) GetClusterResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getClusterResource", nil, &r.Options, &resp) @@ -21084,30 +12464,6 @@ func (r Network_Storage_Iscsi) GetCredentials() (resp []datatypes.Network_Storag return } -func (r Network_Storage_Iscsi) GetCredentialsIter() (resp []datatypes.Network_Storage_Credential, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getCredentials", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Credential{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getCredentials", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Daily Schedule which is associated with this network storage volume. func (r Network_Storage_Iscsi) GetDailySchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getDailySchedule", nil, &r.Options, &resp) @@ -21126,30 +12482,6 @@ func (r Network_Storage_Iscsi) GetDependentDuplicates() (resp []datatypes.Networ return } -func (r Network_Storage_Iscsi) GetDependentDuplicatesIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getDependentDuplicates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getDependentDuplicates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is used to check, if for the given classic file block storage volume, a transaction performing dependent to independent duplicate conversion is active. If yes, then this returns the current percentage of its progress along with its start time as [SoftLayer_Container_Network_Storage_DuplicateConversionStatusInformation] object with its name, percentage and transaction start timestamp. func (r Network_Storage_Iscsi) GetDuplicateConversionStatus() (resp datatypes.Container_Network_Storage_DuplicateConversionStatusInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getDuplicateConversionStatus", nil, &r.Options, &resp) @@ -21162,30 +12494,6 @@ func (r Network_Storage_Iscsi) GetEvents() (resp []datatypes.Network_Storage_Eve return } -func (r Network_Storage_Iscsi) GetEventsIter() (resp []datatypes.Network_Storage_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Determines whether the volume is allowed to failback func (r Network_Storage_Iscsi) GetFailbackNotAllowed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFailbackNotAllowed", nil, &r.Options, &resp) @@ -21203,30 +12511,6 @@ func (r Network_Storage_Iscsi) GetFileBlockEncryptedLocations() (resp []datatype return } -func (r Network_Storage_Iscsi) GetFileBlockEncryptedLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileBlockEncryptedLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} Retrieve details such as id, name, size, create date of a file within a Storage account. This does not download file content. func (r Network_Storage_Iscsi) GetFileByIdentifier(identifier *string) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ @@ -21252,34 +12536,6 @@ func (r Network_Storage_Iscsi) GetFileList(folder *string, path *string) (resp [ return } -func (r Network_Storage_Iscsi) GetFileListIter(folder *string, path *string) (resp []datatypes.Container_Utility_File_Entity, err error) { - params := []interface{}{ - folder, - path, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Retrieves the NFS Network Mount Address Name for a given File Storage Volume. func (r Network_Storage_Iscsi) GetFileNetworkMountAddress() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileNetworkMountAddress", nil, &r.Options, &resp) @@ -21298,30 +12554,6 @@ func (r Network_Storage_Iscsi) GetFilesPendingDelete() (resp []datatypes.Contain return } -func (r Network_Storage_Iscsi) GetFilesPendingDeleteIter() (resp []datatypes.Container_Utility_File_Entity, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFilesPendingDelete", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Utility_File_Entity{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFilesPendingDelete", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Iscsi) GetFixReplicationCurrentStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFixReplicationCurrentStatus", nil, &r.Options, &resp) @@ -21334,30 +12566,6 @@ func (r Network_Storage_Iscsi) GetFolderList() (resp []datatypes.Container_Netwo return } -func (r Network_Storage_Iscsi) GetFolderListIter() (resp []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFolderList", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_Hub_ObjectStorage_Folder{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFolderList", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // {{CloudLayerOnlyMethod}} // // getGraph() retrieves a Storage account's usage and returns a PNG graph image, title, and the minimum and maximum dates included in the graphed date range. Virtual Server storage accounts can also graph upload and download bandwidth usage. @@ -21449,30 +12657,6 @@ func (r Network_Storage_Iscsi) GetIscsiLuns() (resp []datatypes.Network_Storage, return } -func (r Network_Storage_Iscsi) GetIscsiLunsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiLuns", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiLuns", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes configured to be replicants of this volume. func (r Network_Storage_Iscsi) GetIscsiReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiReplicatingVolume", nil, &r.Options, &resp) @@ -21485,30 +12669,6 @@ func (r Network_Storage_Iscsi) GetIscsiTargetIpAddresses() (resp []string, err e return } -func (r Network_Storage_Iscsi) GetIscsiTargetIpAddressesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiTargetIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIscsiTargetIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The ID of the LUN volume. func (r Network_Storage_Iscsi) GetLunId() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getLunId", nil, &r.Options, &resp) @@ -21521,30 +12681,6 @@ func (r Network_Storage_Iscsi) GetManualSnapshots() (resp []datatypes.Network_St return } -func (r Network_Storage_Iscsi) GetManualSnapshotsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getManualSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getManualSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Iscsi) GetMaximumExpansionSize() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getMaximumExpansionSize", nil, &r.Options, &resp) @@ -21599,30 +12735,6 @@ func (r Network_Storage_Iscsi) GetNotificationSubscribers() (resp []datatypes.No return } -func (r Network_Storage_Iscsi) GetNotificationSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getNotificationSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getNotificationSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Iscsi) GetObject() (resp datatypes.Network_Storage_Iscsi, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObject", nil, &r.Options, &resp) @@ -21630,32 +12742,8 @@ func (r Network_Storage_Iscsi) GetObject() (resp datatypes.Network_Storage_Iscsi } // no documentation yet -func (r Network_Storage_Iscsi) GetObjectStorageConnectionInformation() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectStorageConnectionInformation", nil, &r.Options, &resp) - return -} - -func (r Network_Storage_Iscsi) GetObjectStorageConnectionInformationIter() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { - limit := r.Options.ValidateLimit() +func (r Network_Storage_Iscsi) GetObjectStorageConnectionInformation() (resp []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectStorageConnectionInformation", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Service_Resource_ObjectStorage_ConnectionInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectStorageConnectionInformation", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -21668,33 +12756,6 @@ func (r Network_Storage_Iscsi) GetObjectsByCredential(credentialObject *datatype return } -func (r Network_Storage_Iscsi) GetObjectsByCredentialIter(credentialObject *datatypes.Network_Storage_Credential) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - credentialObject, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectsByCredential", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getObjectsByCredential", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The name of the snapshot that this volume was duplicated from. func (r Network_Storage_Iscsi) GetOriginalSnapshotName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getOriginalSnapshotName", nil, &r.Options, &resp) @@ -21737,30 +12798,6 @@ func (r Network_Storage_Iscsi) GetParentPartnerships() (resp []datatypes.Network return } -func (r Network_Storage_Iscsi) GetParentPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getParentPartnerships", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Partnership{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getParentPartnerships", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The parent volume of a volume in a complex storage relationship. func (r Network_Storage_Iscsi) GetParentVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getParentVolume", nil, &r.Options, &resp) @@ -21773,90 +12810,18 @@ func (r Network_Storage_Iscsi) GetPartnerships() (resp []datatypes.Network_Stora return } -func (r Network_Storage_Iscsi) GetPartnershipsIter() (resp []datatypes.Network_Storage_Partnership, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPartnerships", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Partnership{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPartnerships", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All permissions group(s) this volume is in. func (r Network_Storage_Iscsi) GetPermissionsGroups() (resp []datatypes.Network_Storage_Group, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPermissionsGroups", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetPermissionsGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPermissionsGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getPermissionsGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The properties used to provide additional details about a network storage volume. func (r Network_Storage_Iscsi) GetProperties() (resp []datatypes.Network_Storage_Property, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getProperties", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetPropertiesIter() (resp []datatypes.Network_Storage_Property, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getProperties", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Property{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getProperties", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The number of IOPs provisioned for this volume. func (r Network_Storage_Iscsi) GetProvisionedIops() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getProvisionedIops", nil, &r.Options, &resp) @@ -21890,30 +12855,6 @@ func (r Network_Storage_Iscsi) GetReplicatingLuns() (resp []datatypes.Network_St return } -func (r Network_Storage_Iscsi) GetReplicatingLunsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicatingLuns", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicatingLuns", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volume being replicated by a volume. func (r Network_Storage_Iscsi) GetReplicatingVolume() (resp datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicatingVolume", nil, &r.Options, &resp) @@ -21926,60 +12867,12 @@ func (r Network_Storage_Iscsi) GetReplicationEvents() (resp []datatypes.Network_ return } -func (r Network_Storage_Iscsi) GetReplicationEventsIter() (resp []datatypes.Network_Storage_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage volumes configured to be replicants of a volume. func (r Network_Storage_Iscsi) GetReplicationPartners() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationPartners", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetReplicationPartnersIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationPartners", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationPartners", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Replication Schedule associated with a network storage volume. func (r Network_Storage_Iscsi) GetReplicationSchedule() (resp datatypes.Network_Storage_Schedule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getReplicationSchedule", nil, &r.Options, &resp) @@ -22004,30 +12897,6 @@ func (r Network_Storage_Iscsi) GetSchedules() (resp []datatypes.Network_Storage_ return } -func (r Network_Storage_Iscsi) GetSchedulesIter() (resp []datatypes.Network_Storage_Schedule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSchedules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Schedule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSchedules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network resource a Storage service is connected to. func (r Network_Storage_Iscsi) GetServiceResource() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getServiceResource", nil, &r.Options, &resp) @@ -22088,60 +12957,12 @@ func (r Network_Storage_Iscsi) GetSnapshots() (resp []datatypes.Network_Storage, return } -func (r Network_Storage_Iscsi) GetSnapshotsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of snapshots for this SoftLayer_Network_Storage volume. This method works with the result limits and offset to support pagination. func (r Network_Storage_Iscsi) GetSnapshotsForVolume() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshotsForVolume", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetSnapshotsForVolumeIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshotsForVolume", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getSnapshotsForVolume", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Iscsi) GetStaasVersion() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStaasVersion", nil, &r.Options, &resp) @@ -22154,60 +12975,12 @@ func (r Network_Storage_Iscsi) GetStorageGroups() (resp []datatypes.Network_Stor return } -func (r Network_Storage_Iscsi) GetStorageGroupsIter() (resp []datatypes.Network_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Iscsi) GetStorageGroupsNetworkConnectionDetails() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) return } -func (r Network_Storage_Iscsi) GetStorageGroupsNetworkConnectionDetailsIter() (resp []datatypes.Container_Network_Storage_NetworkConnectionInformation, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroupsNetworkConnectionDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_NetworkConnectionInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageGroupsNetworkConnectionDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Storage_Iscsi) GetStorageTierLevel() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getStorageTierLevel", nil, &r.Options, &resp) @@ -22226,30 +12999,6 @@ func (r Network_Storage_Iscsi) GetTargetIpAddresses() (resp []string, err error) return } -func (r Network_Storage_Iscsi) GetTargetIpAddressesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getTargetIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getTargetIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The amount of space used by the volume. func (r Network_Storage_Iscsi) GetTotalBytesUsed() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getTotalBytesUsed", nil, &r.Options, &resp) @@ -22274,30 +13023,6 @@ func (r Network_Storage_Iscsi) GetValidReplicationTargetDatacenterLocations() (r return } -func (r Network_Storage_Iscsi) GetValidReplicationTargetDatacenterLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getValidReplicationTargetDatacenterLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getValidReplicationTargetDatacenterLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type of network storage service. func (r Network_Storage_Iscsi) GetVendorName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVendorName", nil, &r.Options, &resp) @@ -22316,30 +13041,6 @@ func (r Network_Storage_Iscsi) GetVolumeCountLimits() (resp []datatypes.Containe return } -func (r Network_Storage_Iscsi) GetVolumeCountLimitsIter() (resp []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeCountLimits", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_DataCenterLimits_VolumeCountLimitContainer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeCountLimits", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns the parameters for cloning a volume func (r Network_Storage_Iscsi) GetVolumeDuplicateParameters() (resp datatypes.Container_Network_Storage_VolumeDuplicateParameters, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeDuplicateParameters", nil, &r.Options, &resp) @@ -22352,30 +13053,6 @@ func (r Network_Storage_Iscsi) GetVolumeHistory() (resp []datatypes.Network_Stor return } -func (r Network_Storage_Iscsi) GetVolumeHistoryIter() (resp []datatypes.Network_Storage_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current status of a network storage volume. func (r Network_Storage_Iscsi) GetVolumeStatus() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getVolumeStatus", nil, &r.Options, &resp) @@ -22498,33 +13175,6 @@ func (r Network_Storage_Iscsi) RemoveAccessFromHostList(hostObjectTemplates []da return } -func (r Network_Storage_Iscsi) RemoveAccessFromHostListIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Network_Storage_Allowed_Host, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "removeAccessFromHostList", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Allowed_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "removeAccessFromHostList", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Iscsi) RemoveAccessFromIpAddress(ipAddressObjectTemplate *datatypes.Network_Subnet_IpAddress) (resp bool, err error) { params := []interface{}{ @@ -22727,33 +13377,6 @@ func (r Network_Storage_Iscsi) ValidateHostsAccess(hostObjectTemplates []datatyp return } -func (r Network_Storage_Iscsi) ValidateHostsAccessIter(hostObjectTemplates []datatypes.Container_Network_Storage_Host) (resp []datatypes.Container_Network_Storage_HostsGatewayInformation, err error) { - params := []interface{}{ - hostObjectTemplates, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "validateHostsAccess", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Network_Storage_HostsGatewayInformation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "validateHostsAccess", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Network_Storage_Iscsi_OS_Type struct { Session session.SLSession @@ -22800,30 +13423,6 @@ func (r Network_Storage_Iscsi_OS_Type) GetAllObjects() (resp []datatypes.Network return } -func (r Network_Storage_Iscsi_OS_Type) GetAllObjectsIter() (resp []datatypes.Network_Storage_Iscsi_OS_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi_OS_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Iscsi_OS_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi_OS_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Iscsi_OS_Type) GetObject() (resp datatypes.Network_Storage_Iscsi_OS_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi_OS_Type", "getObject", nil, &r.Options, &resp) @@ -22876,30 +13475,6 @@ func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetAllObject return } -func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetAllObjectsIter() (resp []datatypes.Network_Storage_MassDataMigration_CrossRegion_Country_Xref, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_MassDataMigration_CrossRegion_Country_Xref{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve SoftLayer_Locale_Country Id. func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetCountry() (resp datatypes.Locale_Country, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getCountry", nil, &r.Options, &resp) @@ -22927,33 +13502,6 @@ func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetValidCoun return } -func (r Network_Storage_MassDataMigration_CrossRegion_Country_Xref) GetValidCountriesForRegionIter(locationGroupName *string) (resp []datatypes.Network_Storage_MassDataMigration_CrossRegion_Country_Xref, err error) { - params := []interface{}{ - locationGroupName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getValidCountriesForRegion", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_MassDataMigration_CrossRegion_Country_Xref{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_CrossRegion_Country_Xref", "getValidCountriesForRegion", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Network_Storage_MassDataMigration_Request data type contains information on a single Mass Data Migration request. Creation of these requests is limited to SoftLayer customers through the SoftLayer Customer Portal. type Network_Storage_MassDataMigration_Request struct { Session session.SLSession @@ -23006,30 +13554,6 @@ func (r Network_Storage_MassDataMigration_Request) GetActiveTickets() (resp []da return } -func (r Network_Storage_MassDataMigration_Request) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getActiveTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getActiveTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The customer address where the device is shipped to. func (r Network_Storage_MassDataMigration_Request) GetAddress() (resp datatypes.Account_Address, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAddress", nil, &r.Options, &resp) @@ -23042,60 +13566,12 @@ func (r Network_Storage_MassDataMigration_Request) GetAllObjects() (resp []datat return } -func (r Network_Storage_MassDataMigration_Request) GetAllObjectsIter() (resp []datatypes.Network_Storage_MassDataMigration_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_MassDataMigration_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves a list of all the possible statuses to which a request may be set. func (r Network_Storage_MassDataMigration_Request) GetAllRequestStatuses() (resp []datatypes.Network_Storage_MassDataMigration_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllRequestStatuses", nil, &r.Options, &resp) return } -func (r Network_Storage_MassDataMigration_Request) GetAllRequestStatusesIter() (resp []datatypes.Network_Storage_MassDataMigration_Request_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllRequestStatuses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_MassDataMigration_Request_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getAllRequestStatuses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An associated parent billing item which is active. Includes billing items which are scheduled to be cancelled in the future. func (r Network_Storage_MassDataMigration_Request) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getBillingItem", nil, &r.Options, &resp) @@ -23132,30 +13608,6 @@ func (r Network_Storage_MassDataMigration_Request) GetKeyContacts() (resp []data return } -func (r Network_Storage_MassDataMigration_Request) GetKeyContactsIter() (resp []datatypes.Network_Storage_MassDataMigration_Request_KeyContact, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getKeyContacts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_MassDataMigration_Request_KeyContact{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getKeyContacts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The employee who last modified the request. func (r Network_Storage_MassDataMigration_Request) GetModifyEmployee() (resp datatypes.User_Employee, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getModifyEmployee", nil, &r.Options, &resp) @@ -23180,60 +13632,12 @@ func (r Network_Storage_MassDataMigration_Request) GetPendingRequests() (resp [] return } -func (r Network_Storage_MassDataMigration_Request) GetPendingRequestsIter() (resp []datatypes.Network_Storage_MassDataMigration_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getPendingRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_MassDataMigration_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getPendingRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The shipments of the request. func (r Network_Storage_MassDataMigration_Request) GetShipments() (resp []datatypes.Account_Shipment, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getShipments", nil, &r.Options, &resp) return } -func (r Network_Storage_MassDataMigration_Request) GetShipmentsIter() (resp []datatypes.Account_Shipment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getShipments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Shipment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getShipments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of the request. func (r Network_Storage_MassDataMigration_Request) GetStatus() (resp datatypes.Network_Storage_MassDataMigration_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getStatus", nil, &r.Options, &resp) @@ -23252,30 +13656,6 @@ func (r Network_Storage_MassDataMigration_Request) GetTickets() (resp []datatype return } -func (r Network_Storage_MassDataMigration_Request) GetTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_MassDataMigration_Request", "getTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Network_Storage_MassDataMigration_Request_KeyContact data type contains name, email, and phone for key contact at customer location who will handle Mass Data Migration. type Network_Storage_MassDataMigration_Request_KeyContact struct { Session session.SLSession @@ -23468,30 +13848,6 @@ func (r Network_Storage_Schedule) GetEvents() (resp []datatypes.Network_Storage_ return } -func (r Network_Storage_Schedule) GetEventsIter() (resp []datatypes.Network_Storage_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hour parameter of this schedule. func (r Network_Storage_Schedule) GetHour() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getHour", nil, &r.Options, &resp) @@ -23528,60 +13884,12 @@ func (r Network_Storage_Schedule) GetProperties() (resp []datatypes.Network_Stor return } -func (r Network_Storage_Schedule) GetPropertiesIter() (resp []datatypes.Network_Storage_Schedule_Property, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getProperties", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Schedule_Property{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getProperties", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Replica snapshots which have been created as the result of this schedule's execution. func (r Network_Storage_Schedule) GetReplicaSnapshots() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getReplicaSnapshots", nil, &r.Options, &resp) return } -func (r Network_Storage_Schedule) GetReplicaSnapshotsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getReplicaSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getReplicaSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The number of snapshots this schedule is configured to retain. func (r Network_Storage_Schedule) GetRetentionCount() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getRetentionCount", nil, &r.Options, &resp) @@ -23600,30 +13908,6 @@ func (r Network_Storage_Schedule) GetSnapshots() (resp []datatypes.Network_Stora return } -func (r Network_Storage_Schedule) GetSnapshotsIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getSnapshots", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getSnapshots", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type provides a standardized definition for a schedule. func (r Network_Storage_Schedule) GetType() (resp datatypes.Network_Storage_Schedule_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getType", nil, &r.Options, &resp) @@ -23682,30 +13966,6 @@ func (r Network_Storage_Schedule_Property_Type) GetAllObjects() (resp []datatype return } -func (r Network_Storage_Schedule_Property_Type) GetAllObjectsIter() (resp []datatypes.Network_Storage_Schedule_Property_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule_Property_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage_Schedule_Property_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule_Property_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Storage_Schedule_Property_Type) GetObject() (resp datatypes.Network_Storage_Schedule_Property_Type, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule_Property_Type", "getObject", nil, &r.Options, &resp) @@ -23836,30 +14096,6 @@ func (r Network_Subnet) FindAllSubnetsAndActiveSwipTransactionStatus() (resp []d return } -func (r Network_Subnet) FindAllSubnetsAndActiveSwipTransactionStatusIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "findAllSubnetsAndActiveSwipTransactionStatus", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "findAllSubnetsAndActiveSwipTransactionStatus", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Subnet) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAccount", nil, &r.Options, &resp) @@ -23902,129 +14138,27 @@ func (r Network_Subnet) GetAllowedNetworkStorage() (resp []datatypes.Network_Sto return } -func (r Network_Subnet) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network storage device replicas this subnet has been granted access to. func (r Network_Subnet) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } -func (r Network_Subnet) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the combination of network storage devices and replicas this subnet has been granted access to. Allows for filtering based on storage device type. -func (r Network_Subnet) GetAttachedNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAttachedNetworkStorages", params, &r.Options, &resp) - return -} - -func (r Network_Subnet) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAttachedNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAttachedNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - -// Retrieves the combination of network storage devices and replicas this subnet has NOT been granted access to. Allows for filtering based on storage device type. -func (r Network_Subnet) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { +func (r Network_Subnet) GetAttachedNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ nasType, } - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAvailableNetworkStorages", params, &r.Options, &resp) + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAttachedNetworkStorages", params, &r.Options, &resp) return } -func (r Network_Subnet) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { +// Retrieves the combination of network storage devices and replicas this subnet has NOT been granted access to. Allows for filtering based on storage device type. +func (r Network_Subnet) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ nasType, } - limit := r.Options.ValidateLimit() err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAvailableNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getAvailableNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -24040,30 +14174,6 @@ func (r Network_Subnet) GetBoundDescendants() (resp []datatypes.Network_Subnet, return } -func (r Network_Subnet) GetBoundDescendantsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundDescendants", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundDescendants", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Indicates whether this subnet is associated to a network router and is routable on the network. func (r Network_Subnet) GetBoundRouterFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundRouterFlag", nil, &r.Options, &resp) @@ -24076,60 +14186,12 @@ func (r Network_Subnet) GetBoundRouters() (resp []datatypes.Hardware, err error) return } -func (r Network_Subnet) GetBoundRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getBoundRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The immediate descendants of this subnet. func (r Network_Subnet) GetChildren() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getChildren", nil, &r.Options, &resp) return } -func (r Network_Subnet) GetChildrenIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The datacenter this subnet is primarily associated with. func (r Network_Subnet) GetDatacenter() (resp datatypes.Location_Datacenter, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getDatacenter", nil, &r.Options, &resp) @@ -24142,30 +14204,6 @@ func (r Network_Subnet) GetDescendants() (resp []datatypes.Network_Subnet, err e return } -func (r Network_Subnet) GetDescendantsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getDescendants", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getDescendants", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [DEPRECATED] The description of this subnet. func (r Network_Subnet) GetDisplayLabel() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getDisplayLabel", nil, &r.Options, &resp) @@ -24190,30 +14228,6 @@ func (r Network_Subnet) GetHardware() (resp []datatypes.Hardware, err error) { return } -func (r Network_Subnet) GetHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns a list of IP address assignment details. Only assigned IP addresses are reported on. IP address assignments are presently only recorded and available for Primary Subnets. // // Details on the resource assigned to each IP address will only be provided to users with access to the underlying resource. If the user cannot access the resource, a detail record will still be returned for the assignment but without any accompanying resource data. @@ -24222,60 +14236,12 @@ func (r Network_Subnet) GetIpAddressUsage() (resp []datatypes.Network_Subnet_IpA return } -func (r Network_Subnet) GetIpAddressUsageIter() (resp []datatypes.Network_Subnet_IpAddress_UsageDetail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddressUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress_UsageDetail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddressUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The IP address records belonging to this subnet. func (r Network_Subnet) GetIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddresses", nil, &r.Options, &resp) return } -func (r Network_Subnet) GetIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware firewall associated to this subnet via access control list. func (r Network_Subnet) GetNetworkComponentFirewall() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkComponentFirewall", nil, &r.Options, &resp) @@ -24288,60 +14254,12 @@ func (r Network_Subnet) GetNetworkProtectionAddresses() (resp []datatypes.Networ return } -func (r Network_Subnet) GetNetworkProtectionAddressesIter() (resp []datatypes.Network_Protection_Address, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkProtectionAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Protection_Address{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkProtectionAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The IPSec VPN tunnels associated to this subnet. func (r Network_Subnet) GetNetworkTunnelContexts() (resp []datatypes.Network_Tunnel_Module_Context, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkTunnelContexts", nil, &r.Options, &resp) return } -func (r Network_Subnet) GetNetworkTunnelContextsIter() (resp []datatypes.Network_Tunnel_Module_Context, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkTunnelContexts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Tunnel_Module_Context{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkTunnelContexts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The VLAN this subnet is associated with. func (r Network_Subnet) GetNetworkVlan() (resp datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getNetworkVlan", nil, &r.Options, &resp) @@ -24366,30 +14284,6 @@ func (r Network_Subnet) GetProtectedIpAddresses() (resp []datatypes.Network_Subn return } -func (r Network_Subnet) GetProtectedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getProtectedIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getProtectedIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The RIR which is authoritative over the network in which this subnet resides. func (r Network_Subnet) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRegionalInternetRegistry", nil, &r.Options, &resp) @@ -24402,30 +14296,6 @@ func (r Network_Subnet) GetRegistrations() (resp []datatypes.Network_Subnet_Regi return } -func (r Network_Subnet) GetRegistrationsIter() (resp []datatypes.Network_Subnet_Registration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRegistrations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Registration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRegistrations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The reverse DNS domain associated with this subnet. func (r Network_Subnet) GetReverseDomain() (resp datatypes.Dns_Domain, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getReverseDomain", nil, &r.Options, &resp) @@ -24438,30 +14308,6 @@ func (r Network_Subnet) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, return } -func (r Network_Subnet) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getReverseDomainRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getReverseDomainRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The role identifier that this subnet is participating in. Roles dictate how a subnet may be used. func (r Network_Subnet) GetRoleKeyName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRoleKeyName", nil, &r.Options, &resp) @@ -24480,30 +14326,6 @@ func (r Network_Subnet) GetRoutableEndpointIpAddresses() (resp []datatypes.Netwo return } -func (r Network_Subnet) GetRoutableEndpointIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRoutableEndpointIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRoutableEndpointIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The product and route classifier for this routed subnet, with the following values: PRIMARY, SECONDARY, STATIC_TO_IP, GLOBAL_IP, IPSEC_STATIC_NAT. func (r Network_Subnet) GetRoutingTypeKeyName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getRoutingTypeKeyName", nil, &r.Options, &resp) @@ -24531,90 +14353,18 @@ func (r Network_Subnet) GetSwipTransaction() (resp []datatypes.Network_Subnet_Sw return } -func (r Network_Subnet) GetSwipTransactionIter() (resp []datatypes.Network_Subnet_Swip_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getSwipTransaction", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Swip_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getSwipTransaction", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The tags associated to this subnet. func (r Network_Subnet) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getTagReferences", nil, &r.Options, &resp) return } -func (r Network_Subnet) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Subnet) GetUnboundDescendants() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getUnboundDescendants", nil, &r.Options, &resp) return } -func (r Network_Subnet) GetUnboundDescendantsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getUnboundDescendants", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getUnboundDescendants", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The total number of utilized IP addresses on this subnet. The primary consumer of IP addresses are compute resources, which can consume more than one address. This value is only supported for primary subnets. func (r Network_Subnet) GetUtilizedIpAddressCount() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getUtilizedIpAddressCount", nil, &r.Options, &resp) @@ -24627,30 +14377,6 @@ func (r Network_Subnet) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err return } -func (r Network_Subnet) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Subnet) RemoveAccessToNetworkStorageList(networkStorageTemplateObjects []datatypes.Network_Storage) (resp bool, err error) { params := []interface{}{ @@ -24804,30 +14530,6 @@ func (r Network_Subnet_IpAddress) FindUsage() (resp []datatypes.Network_Subnet_I return } -func (r Network_Subnet_IpAddress) FindUsageIter() (resp []datatypes.Network_Subnet_IpAddress_UsageDetail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "findUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress_UsageDetail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "findUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this IP Address to Network Storage supporting access control lists. func (r Network_Subnet_IpAddress) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedHost", nil, &r.Options, &resp) @@ -24840,60 +14542,12 @@ func (r Network_Subnet_IpAddress) GetAllowedNetworkStorage() (resp []datatypes.N return } -func (r Network_Subnet_IpAddress) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Hardware has access to. func (r Network_Subnet_IpAddress) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The application delivery controller using this address. func (r Network_Subnet_IpAddress) GetApplicationDeliveryController() (resp datatypes.Network_Application_Delivery_Controller, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getApplicationDeliveryController", nil, &r.Options, &resp) @@ -24909,33 +14563,6 @@ func (r Network_Subnet_IpAddress) GetAttachedNetworkStorages(nasType *string) (r return } -func (r Network_Subnet_IpAddress) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAttachedNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAttachedNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Network_Subnet_IpAddress. func (r Network_Subnet_IpAddress) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -24945,33 +14572,6 @@ func (r Network_Subnet_IpAddress) GetAvailableNetworkStorages(nasType *string) ( return } -func (r Network_Subnet_IpAddress) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAvailableNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getAvailableNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Search for an IP address record by IP address. func (r Network_Subnet_IpAddress) GetByIpAddress(ipAddress *string) (resp datatypes.Network_Subnet_IpAddress, err error) { params := []interface{}{ @@ -24987,60 +14587,12 @@ func (r Network_Subnet_IpAddress) GetContextTunnelTranslations() (resp []datatyp return } -func (r Network_Subnet_IpAddress) GetContextTunnelTranslationsIter() (resp []datatypes.Network_Tunnel_Module_Context_Address_Translation, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getContextTunnelTranslations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Tunnel_Module_Context_Address_Translation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getContextTunnelTranslations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All the subnets routed to an IP address. func (r Network_Subnet_IpAddress) GetEndpointSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getEndpointSubnets", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetEndpointSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getEndpointSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getEndpointSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A network component that is statically routed to an IP address. func (r Network_Subnet_IpAddress) GetGuestNetworkComponent() (resp datatypes.Virtual_Guest_Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getGuestNetworkComponent", nil, &r.Options, &resp) @@ -25083,30 +14635,6 @@ func (r Network_Subnet_IpAddress) GetProtectionAddress() (resp []datatypes.Netwo return } -func (r Network_Subnet_IpAddress) GetProtectionAddressIter() (resp []datatypes.Network_Protection_Address, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getProtectionAddress", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Protection_Address{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getProtectionAddress", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network gateway appliance using this address as the public IP address. func (r Network_Subnet_IpAddress) GetPublicNetworkGateway() (resp datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getPublicNetworkGateway", nil, &r.Options, &resp) @@ -25131,300 +14659,60 @@ func (r Network_Subnet_IpAddress) GetSyslogEventsOneDay() (resp []datatypes.Netw return } -func (r Network_Subnet_IpAddress) GetSyslogEventsOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsOneDay", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsOneDay", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All events for this IP address stored in the datacenter syslogs from the last 7 days func (r Network_Subnet_IpAddress) GetSyslogEventsSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsSevenDays", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetSyslogEventsSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsSevenDays", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getSyslogEventsSevenDays", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Top Ten network datacenter syslog events, grouped by destination port, for the last 24 hours func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByDestinationPortOneDay() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortOneDay", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByDestinationPortOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortOneDay", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortOneDay", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Top Ten network datacenter syslog events, grouped by destination port, for the last 7 days func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByDestinationPortSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortSevenDays", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByDestinationPortSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortSevenDays", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByDestinationPortSevenDays", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Top Ten network datacenter syslog events, grouped by source port, for the last 24 hours func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByProtocolsOneDay() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsOneDay", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByProtocolsOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsOneDay", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsOneDay", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Top Ten network datacenter syslog events, grouped by source port, for the last 7 days func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByProtocolsSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsSevenDays", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsByProtocolsSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsSevenDays", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsByProtocolsSevenDays", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Top Ten network datacenter syslog events, grouped by source ip address, for the last 24 hours func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourceIpOneDay() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpOneDay", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourceIpOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpOneDay", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpOneDay", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Top Ten network datacenter syslog events, grouped by source ip address, for the last 7 days func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourceIpSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpSevenDays", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourceIpSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpSevenDays", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourceIpSevenDays", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Top Ten network datacenter syslog events, grouped by source port, for the last 24 hours func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourcePortOneDay() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortOneDay", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourcePortOneDayIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortOneDay", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortOneDay", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Top Ten network datacenter syslog events, grouped by source port, for the last 7 days func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourcePortSevenDays() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortSevenDays", nil, &r.Options, &resp) return } -func (r Network_Subnet_IpAddress) GetTopTenSyslogEventsBySourcePortSevenDaysIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortSevenDays", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getTopTenSyslogEventsBySourcePortSevenDays", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A virtual guest that this IP address is routed to. func (r Network_Subnet_IpAddress) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getVirtualGuest", nil, &r.Options, &resp) @@ -25437,30 +14725,6 @@ func (r Network_Subnet_IpAddress) GetVirtualLicenses() (resp []datatypes.Softwar return } -func (r Network_Subnet_IpAddress) GetVirtualLicensesIter() (resp []datatypes.Software_VirtualLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getVirtualLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_VirtualLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_IpAddress", "getVirtualLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is used to remove access to multiple SoftLayer_Network_Storage volumes func (r Network_Subnet_IpAddress) RemoveAccessToNetworkStorageList(networkStorageTemplateObjects []datatypes.Network_Storage) (resp bool, err error) { params := []interface{}{ @@ -25655,33 +14919,6 @@ func (r Network_Subnet_Registration) CreateObjects(templateObjects []datatypes.N return } -func (r Network_Subnet_Registration) CreateObjectsIter(templateObjects []datatypes.Network_Subnet_Registration) (resp []datatypes.Network_Subnet_Registration, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Registration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The subnet registration service has been deprecated. // // This method will edit an existing SoftLayer_Network_Subnet_Registration object. For more detail, see [[SoftLayer_Network_Subnet_Registration::createObject|createObject]]. @@ -25719,60 +14956,12 @@ func (r Network_Subnet_Registration) GetDetailReferences() (resp []datatypes.Net return } -func (r Network_Subnet_Registration) GetDetailReferencesIter() (resp []datatypes.Network_Subnet_Registration_Details, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getDetailReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Registration_Details{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getDetailReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [Deprecated] The related registration events. func (r Network_Subnet_Registration) GetEvents() (resp []datatypes.Network_Subnet_Registration_Event, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getEvents", nil, &r.Options, &resp) return } -func (r Network_Subnet_Registration) GetEventsIter() (resp []datatypes.Network_Subnet_Registration_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Registration_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve [Deprecated] The "network" detail object. func (r Network_Subnet_Registration) GetNetworkDetail() (resp datatypes.Account_Regional_Registry_Detail, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getNetworkDetail", nil, &r.Options, &resp) @@ -25951,30 +15140,6 @@ func (r Network_Subnet_Registration_Status) GetAllObjects() (resp []datatypes.Ne return } -func (r Network_Subnet_Registration_Status) GetAllObjectsIter() (resp []datatypes.Network_Subnet_Registration_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration_Status", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Registration_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration_Status", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Network_Subnet_Registration_Status) GetObject() (resp datatypes.Network_Subnet_Registration_Status, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration_Status", "getObject", nil, &r.Options, &resp) @@ -26108,30 +15273,6 @@ func (r Network_Subnet_Swip_Transaction) FindMyTransactions() (resp []datatypes. return } -func (r Network_Subnet_Swip_Transaction) FindMyTransactionsIter() (resp []datatypes.Network_Subnet_Swip_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Swip_Transaction", "findMyTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_Swip_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Subnet_Swip_Transaction", "findMyTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Account whose RWHOIS data was used to SWIP this subnet func (r Network_Subnet_Swip_Transaction) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet_Swip_Transaction", "getAccount", nil, &r.Options, &resp) @@ -26294,33 +15435,6 @@ func (r Network_Tunnel_Module_Context) CreateAddressTranslations(translations [] return } -func (r Network_Tunnel_Module_Context) CreateAddressTranslationsIter(translations []datatypes.Network_Tunnel_Module_Context_Address_Translation) (resp []datatypes.Network_Tunnel_Module_Context_Address_Translation, err error) { - params := []interface{}{ - translations, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "createAddressTranslations", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Tunnel_Module_Context_Address_Translation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "createAddressTranslations", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Remove an existing address translation from a network tunnel. // // Address translations deliver packets to a destination ip address that is on a customer subnet (remote). @@ -26372,33 +15486,6 @@ func (r Network_Tunnel_Module_Context) EditAddressTranslations(translations []da return } -func (r Network_Tunnel_Module_Context) EditAddressTranslationsIter(translations []datatypes.Network_Tunnel_Module_Context_Address_Translation) (resp []datatypes.Network_Tunnel_Module_Context_Address_Translation, err error) { - params := []interface{}{ - translations, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "editAddressTranslations", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Tunnel_Module_Context_Address_Translation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "editAddressTranslations", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Negotiation parameters for both phases one and two are editable. Here are the phase one and two parameters that can modified: // // *Phase One @@ -26482,60 +15569,12 @@ func (r Network_Tunnel_Module_Context) GetAddressTranslations() (resp []datatype return } -func (r Network_Tunnel_Module_Context) GetAddressTranslationsIter() (resp []datatypes.Network_Tunnel_Module_Context_Address_Translation, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAddressTranslations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Tunnel_Module_Context_Address_Translation{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAddressTranslations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Subnets that provide access to SoftLayer services such as the management portal and the SoftLayer API. func (r Network_Tunnel_Module_Context) GetAllAvailableServiceSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAllAvailableServiceSubnets", nil, &r.Options, &resp) return } -func (r Network_Tunnel_Module_Context) GetAllAvailableServiceSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAllAvailableServiceSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAllAvailableServiceSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The default authentication type used for both phases of the negotiation process. The default value is set to MD5. func (r Network_Tunnel_Module_Context) GetAuthenticationDefault() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAuthenticationDefault", nil, &r.Options, &resp) @@ -26553,30 +15592,6 @@ func (r Network_Tunnel_Module_Context) GetAuthenticationOptions() (resp []string return } -func (r Network_Tunnel_Module_Context) GetAuthenticationOptionsIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAuthenticationOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getAuthenticationOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The current billing item for network tunnel. func (r Network_Tunnel_Module_Context) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getBillingItem", nil, &r.Options, &resp) @@ -26589,30 +15604,6 @@ func (r Network_Tunnel_Module_Context) GetCustomerSubnets() (resp []datatypes.Ne return } -func (r Network_Tunnel_Module_Context) GetCustomerSubnetsIter() (resp []datatypes.Network_Customer_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getCustomerSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Customer_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getCustomerSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The datacenter location for one end of the network tunnel that allows access to account's private subnets. func (r Network_Tunnel_Module_Context) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getDatacenter", nil, &r.Options, &resp) @@ -26637,30 +15628,6 @@ func (r Network_Tunnel_Module_Context) GetDiffieHellmanGroupOptions() (resp []in return } -func (r Network_Tunnel_Module_Context) GetDiffieHellmanGroupOptionsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getDiffieHellmanGroupOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getDiffieHellmanGroupOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The default encryption type used for both phases of the negotiation process. The default value is set to 3DES. func (r Network_Tunnel_Module_Context) GetEncryptionDefault() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getEncryptionDefault", nil, &r.Options, &resp) @@ -26680,90 +15647,18 @@ func (r Network_Tunnel_Module_Context) GetEncryptionOptions() (resp []string, er return } -func (r Network_Tunnel_Module_Context) GetEncryptionOptionsIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getEncryptionOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getEncryptionOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Private subnets that can be accessed through the network tunnel. func (r Network_Tunnel_Module_Context) GetInternalSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getInternalSubnets", nil, &r.Options, &resp) return } -func (r Network_Tunnel_Module_Context) GetInternalSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getInternalSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getInternalSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The keylife limits. Keylife max limit is set to 120. Keylife min limit is set to 172800. func (r Network_Tunnel_Module_Context) GetKeylifeLimits() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getKeylifeLimits", nil, &r.Options, &resp) return } -func (r Network_Tunnel_Module_Context) GetKeylifeLimitsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getKeylifeLimits", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getKeylifeLimits", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Network_Tunnel_Module_Context object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Tunnel_Module_Context service. The IPSec network tunnel will be returned if it is associated with the account and the user has proper permission to manage network tunnels. func (r Network_Tunnel_Module_Context) GetObject() (resp datatypes.Network_Tunnel_Module_Context, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getObject", nil, &r.Options, &resp) @@ -26794,90 +15689,18 @@ func (r Network_Tunnel_Module_Context) GetServiceSubnets() (resp []datatypes.Net return } -func (r Network_Tunnel_Module_Context) GetServiceSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getServiceSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getServiceSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Subnets used for a network tunnel's address translations. func (r Network_Tunnel_Module_Context) GetStaticRouteSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getStaticRouteSubnets", nil, &r.Options, &resp) return } -func (r Network_Tunnel_Module_Context) GetStaticRouteSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getStaticRouteSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getStaticRouteSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve DEPRECATED func (r Network_Tunnel_Module_Context) GetTransactionHistory() (resp []datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getTransactionHistory", nil, &r.Options, &resp) return } -func (r Network_Tunnel_Module_Context) GetTransactionHistoryIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getTransactionHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "getTransactionHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Disassociate a customer subnet (remote) from a network tunnel. When a remote subnet is disassociated, that subnet will not able to communicate with private and service subnets on the SoftLayer network. // // NOTE: A network tunnel's configurations must be applied to the network device in order for the disassociation described above to take effect. @@ -26982,30 +15805,6 @@ func (r Network_Vlan) GetAdditionalPrimarySubnets() (resp []datatypes.Network_Su return } -func (r Network_Vlan) GetAdditionalPrimarySubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getAdditionalPrimarySubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getAdditionalPrimarySubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway device this VLAN is associated with for routing purposes. func (r Network_Vlan) GetAttachedNetworkGateway() (resp datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getAttachedNetworkGateway", nil, &r.Options, &resp) @@ -27036,30 +15835,6 @@ func (r Network_Vlan) GetCancelFailureReasons() (resp []string, err error) { return } -func (r Network_Vlan) GetCancelFailureReasonsIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getCancelFailureReasons", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getCancelFailureReasons", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The datacenter this VLAN is associated with. func (r Network_Vlan) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getDatacenter", nil, &r.Options, &resp) @@ -27084,90 +15859,18 @@ func (r Network_Vlan) GetFirewallGuestNetworkComponents() (resp []datatypes.Netw return } -func (r Network_Vlan) GetFirewallGuestNetworkComponentsIter() (resp []datatypes.Network_Component_Firewall, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallGuestNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Firewall{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallGuestNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The context for the firewall device associated with this VLAN. func (r Network_Vlan) GetFirewallInterfaces() (resp []datatypes.Network_Firewall_Module_Context_Interface, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallInterfaces", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetFirewallInterfacesIter() (resp []datatypes.Network_Firewall_Module_Context_Interface, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallInterfaces", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_Module_Context_Interface{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallInterfaces", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The uplinks of the hardware network interfaces connected natively to this VLAN and associated with a Hardware Firewall. func (r Network_Vlan) GetFirewallNetworkComponents() (resp []datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallNetworkComponents", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetFirewallNetworkComponentsIter() (resp []datatypes.Network_Component_Firewall, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Firewall{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // *** DEPRECATED *** // Retrieves the IP addresses routed on this VLAN that are protectable by a Hardware Firewall. // Deprecated: This function has been marked as deprecated. @@ -27176,30 +15879,6 @@ func (r Network_Vlan) GetFirewallProtectableIpAddresses() (resp []datatypes.Netw return } -func (r Network_Vlan) GetFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallProtectableIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallProtectableIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // *** DEPRECATED *** // Retrieves the subnets routed on this VLAN that are protectable by a Hardware Firewall. // Deprecated: This function has been marked as deprecated. @@ -27208,120 +15887,24 @@ func (r Network_Vlan) GetFirewallProtectableSubnets() (resp []datatypes.Network_ return } -func (r Network_Vlan) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallProtectableSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallProtectableSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The access rules for the firewall device associated with this VLAN. func (r Network_Vlan) GetFirewallRules() (resp []datatypes.Network_Vlan_Firewall_Rule, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallRules", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetFirewallRulesIter() (resp []datatypes.Network_Vlan_Firewall_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallRules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan_Firewall_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getFirewallRules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The VSI network interfaces connected to this VLAN. func (r Network_Vlan) GetGuestNetworkComponents() (resp []datatypes.Virtual_Guest_Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getGuestNetworkComponents", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetGuestNetworkComponentsIter() (resp []datatypes.Virtual_Guest_Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getGuestNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getGuestNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware with network interfaces connected natively to this VLAN. func (r Network_Vlan) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getHardware", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A value of '1' indicates this VLAN is associated with a firewall device in a high availability configuration. func (r Network_Vlan) GetHighAvailabilityFirewallFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getHighAvailabilityFirewallFlag", nil, &r.Options, &resp) @@ -27336,30 +15919,6 @@ func (r Network_Vlan) GetIpAddressUsage() (resp []datatypes.Network_Subnet_IpAdd return } -func (r Network_Vlan) GetIpAddressUsageIter() (resp []datatypes.Network_Subnet_IpAddress_UsageDetail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getIpAddressUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress_UsageDetail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getIpAddressUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A value of '1' indicates this VLAN's pod has VSI local disk storage capability. func (r Network_Vlan) GetLocalDiskStorageCapabilityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getLocalDiskStorageCapabilityFlag", nil, &r.Options, &resp) @@ -27372,90 +15931,18 @@ func (r Network_Vlan) GetNetworkComponentTrunks() (resp []datatypes.Network_Comp return } -func (r Network_Vlan) GetNetworkComponentTrunksIter() (resp []datatypes.Network_Component_Network_Vlan_Trunk, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentTrunks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component_Network_Vlan_Trunk{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentTrunks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware network interfaces connected natively to this VLAN. func (r Network_Vlan) GetNetworkComponents() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponents", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetNetworkComponentsIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The viable hardware network interface trunking targets of this VLAN. Viable targets include accessible components of assigned hardware in the same pod and network as this VLAN, which are not already connected, either natively or trunked. func (r Network_Vlan) GetNetworkComponentsTrunkable() (resp []datatypes.Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentsTrunkable", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetNetworkComponentsTrunkableIter() (resp []datatypes.Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentsTrunkable", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkComponentsTrunkable", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network that this VLAN is on, either PUBLIC or PRIVATE, if applicable. func (r Network_Vlan) GetNetworkSpace() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getNetworkSpace", nil, &r.Options, &resp) @@ -27504,60 +15991,12 @@ func (r Network_Vlan) GetPrimarySubnets() (resp []datatypes.Network_Subnet, err return } -func (r Network_Vlan) GetPrimarySubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrimarySubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrimarySubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway devices with connectivity supported by this private VLAN. func (r Network_Vlan) GetPrivateNetworkGateways() (resp []datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrivateNetworkGateways", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetPrivateNetworkGatewaysIter() (resp []datatypes.Network_Gateway, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrivateNetworkGateways", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPrivateNetworkGateways", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // *** DEPRECATED *** // Retrieves a private VLAN associated to one or more hosts also associated to this public VLAN. // Deprecated: This function has been marked as deprecated. @@ -27583,60 +16022,12 @@ func (r Network_Vlan) GetProtectedIpAddresses() (resp []datatypes.Network_Subnet return } -func (r Network_Vlan) GetProtectedIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getProtectedIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getProtectedIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway devices with connectivity supported by this public VLAN. func (r Network_Vlan) GetPublicNetworkGateways() (resp []datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPublicNetworkGateways", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetPublicNetworkGatewaysIter() (resp []datatypes.Network_Gateway, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPublicNetworkGateways", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Gateway{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getPublicNetworkGateways", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // *** DEPRECATED *** // Retrieves a public VLAN associated to the host matched by the given fully-qualified domain name. // Deprecated: This function has been marked as deprecated. @@ -27656,30 +16047,6 @@ func (r Network_Vlan) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, er return } -func (r Network_Vlan) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getReverseDomainRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getReverseDomainRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A value of '1' indicates this VLAN's pod has VSI SAN disk storage capability. func (r Network_Vlan) GetSanStorageCapabilityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSanStorageCapabilityFlag", nil, &r.Options, &resp) @@ -27698,90 +16065,18 @@ func (r Network_Vlan) GetSecondarySubnets() (resp []datatypes.Network_Subnet, er return } -func (r Network_Vlan) GetSecondarySubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSecondarySubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSecondarySubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All subnets routed on this VLAN. func (r Network_Vlan) GetSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSubnets", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The tags associated to this VLAN. func (r Network_Vlan) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getTagReferences", nil, &r.Options, &resp) return } -func (r Network_Vlan) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The number of primary IPv4 addresses routed on this VLAN. func (r Network_Vlan) GetTotalPrimaryIpAddressCount() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getTotalPrimaryIpAddressCount", nil, &r.Options, &resp) @@ -27800,30 +16095,6 @@ func (r Network_Vlan) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err er return } -func (r Network_Vlan) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the VLAN on which the given IP address is routed. func (r Network_Vlan) GetVlanForIpAddress(ipAddress *string) (resp datatypes.Network_Vlan, err error) { params := []interface{}{ @@ -27927,30 +16198,6 @@ func (r Network_Vlan_Firewall) GetBillingCycleBandwidthUsage() (resp []datatypes return } -func (r Network_Vlan_Firewall) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Usage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Network_Vlan_Firewall) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -28023,30 +16270,6 @@ func (r Network_Vlan_Firewall) GetNetworkFirewallUpdateRequests() (resp []dataty return } -func (r Network_Vlan_Firewall) GetNetworkFirewallUpdateRequestsIter() (resp []datatypes.Network_Firewall_Update_Request, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkFirewallUpdateRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Firewall_Update_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkFirewallUpdateRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The gateway associated with this firewall, if any. func (r Network_Vlan_Firewall) GetNetworkGateway() (resp datatypes.Network_Gateway, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkGateway", nil, &r.Options, &resp) @@ -28065,30 +16288,6 @@ func (r Network_Vlan_Firewall) GetNetworkVlans() (resp []datatypes.Network_Vlan, return } -func (r Network_Vlan_Firewall) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject returns a SoftLayer_Network_Vlan_Firewall object. You can only get objects for vlans attached to your account that have a network firewall enabled. func (r Network_Vlan_Firewall) GetObject() (resp datatypes.Network_Vlan_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getObject", nil, &r.Options, &resp) @@ -28101,60 +16300,12 @@ func (r Network_Vlan_Firewall) GetRules() (resp []datatypes.Network_Vlan_Firewal return } -func (r Network_Vlan_Firewall) GetRulesIter() (resp []datatypes.Network_Vlan_Firewall_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getRules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan_Firewall_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getRules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Network_Vlan_Firewall) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getTagReferences", nil, &r.Options, &resp) return } -func (r Network_Vlan_Firewall) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A firewall's associated upgrade request object, if any. func (r Network_Vlan_Firewall) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Network_Vlan_Firewall", "getUpgradeRequest", nil, &r.Options, &resp) diff --git a/services/notification.go b/services/notification.go index 3880a49..67dec55 100644 --- a/services/notification.go +++ b/services/notification.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,30 +68,6 @@ func (r Notification) GetAllObjects() (resp []datatypes.Notification, err error) return } -func (r Notification) GetAllObjectsIter() (resp []datatypes.Notification, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Notification) GetObject() (resp datatypes.Notification, err error) { err = r.Session.DoRequest("SoftLayer_Notification", "getObject", nil, &r.Options, &resp) @@ -105,60 +80,12 @@ func (r Notification) GetPreferences() (resp []datatypes.Notification_Preference return } -func (r Notification) GetPreferencesIter() (resp []datatypes.Notification_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification", "getPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification", "getPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The required preferences related to the notification. While configurable, the subscriber does not have the option whether to use the preference. func (r Notification) GetRequiredPreferences() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification", "getRequiredPreferences", nil, &r.Options, &resp) return } -func (r Notification) GetRequiredPreferencesIter() (resp []datatypes.Notification_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification", "getRequiredPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification", "getRequiredPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This is an extension of the SoftLayer_Notification class. These are implementation details specific to those notifications which can be subscribed to and received on a mobile device. type Notification_Mobile struct { Session session.SLSession @@ -216,30 +143,6 @@ func (r Notification_Mobile) GetAllObjects() (resp []datatypes.Notification, err return } -func (r Notification_Mobile) GetAllObjectsIter() (resp []datatypes.Notification, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Notification_Mobile) GetObject() (resp datatypes.Notification_Mobile, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getObject", nil, &r.Options, &resp) @@ -252,60 +155,12 @@ func (r Notification_Mobile) GetPreferences() (resp []datatypes.Notification_Pre return } -func (r Notification_Mobile) GetPreferencesIter() (resp []datatypes.Notification_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The required preferences related to the notification. While configurable, the subscriber does not have the option whether to use the preference. func (r Notification_Mobile) GetRequiredPreferences() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getRequiredPreferences", nil, &r.Options, &resp) return } -func (r Notification_Mobile) GetRequiredPreferencesIter() (resp []datatypes.Notification_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getRequiredPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getRequiredPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Notification_Occurrence_Event struct { Session session.SLSession @@ -364,30 +219,6 @@ func (r Notification_Occurrence_Event) GetAllObjects() (resp []datatypes.Notific return } -func (r Notification_Occurrence_Event) GetAllObjectsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the contents of the file attached to a SoftLayer event by it's given identifier. func (r Notification_Occurrence_Event) GetAttachedFile(attachmentId *int) (resp []byte, err error) { params := []interface{}{ @@ -403,30 +234,6 @@ func (r Notification_Occurrence_Event) GetAttachments() (resp []datatypes.Notifi return } -func (r Notification_Occurrence_Event) GetAttachmentsIter() (resp []datatypes.Notification_Occurrence_Event_Attachment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAttachments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event_Attachment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAttachments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The first update for this event. func (r Notification_Occurrence_Event) GetFirstUpdate() (resp datatypes.Notification_Occurrence_Update, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getFirstUpdate", nil, &r.Options, &resp) @@ -445,30 +252,6 @@ func (r Notification_Occurrence_Event) GetImpactedAccounts() (resp []datatypes.N return } -func (r Notification_Occurrence_Event) GetImpactedAccountsIter() (resp []datatypes.Notification_Occurrence_Account, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedAccounts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedAccounts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return the number of impacted devices associated with this event for the current user. func (r Notification_Occurrence_Event) GetImpactedDeviceCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedDeviceCount", nil, &r.Options, &resp) @@ -481,90 +264,18 @@ func (r Notification_Occurrence_Event) GetImpactedDevices() (resp []datatypes.No return } -func (r Notification_Occurrence_Event) GetImpactedDevicesIter() (resp []datatypes.Notification_Occurrence_Resource, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedDevices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Resource{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedDevices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of resources impacted by this event. Each record will relate to some physical resource that the user has access to such as [[SoftLayer_Hardware]] or [[SoftLayer_Virtual_Guest]]. func (r Notification_Occurrence_Event) GetImpactedResources() (resp []datatypes.Notification_Occurrence_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedResources", nil, &r.Options, &resp) return } -func (r Notification_Occurrence_Event) GetImpactedResourcesIter() (resp []datatypes.Notification_Occurrence_Resource, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedResources", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Resource{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedResources", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of users impacted by this event. Each impacted user record relates directly to a [[SoftLayer_User_Customer]]. func (r Notification_Occurrence_Event) GetImpactedUsers() (resp []datatypes.Notification_Occurrence_User, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedUsers", nil, &r.Options, &resp) return } -func (r Notification_Occurrence_Event) GetImpactedUsersIter() (resp []datatypes.Notification_Occurrence_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The last update for this event. func (r Notification_Occurrence_Event) GetLastUpdate() (resp datatypes.Notification_Occurrence_Update, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getLastUpdate", nil, &r.Options, &resp) @@ -595,30 +306,6 @@ func (r Notification_Occurrence_Event) GetUpdates() (resp []datatypes.Notificati return } -func (r Notification_Occurrence_Event) GetUpdatesIter() (resp []datatypes.Notification_Occurrence_Update, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getUpdates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Update{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getUpdates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This type contains general information relating to a user that may be impacted by a [[SoftLayer_Notification_Occurrence_Event]]. type Notification_Occurrence_User struct { Session session.SLSession @@ -671,30 +358,6 @@ func (r Notification_Occurrence_User) GetAllObjects() (resp []datatypes.Notifica return } -func (r Notification_Occurrence_User) GetAllObjectsIter() (resp []datatypes.Notification_Occurrence_User, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_User{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Notification_Occurrence_User) GetImpactedDeviceCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getImpactedDeviceCount", nil, &r.Options, &resp) @@ -707,30 +370,6 @@ func (r Notification_Occurrence_User) GetImpactedResources() (resp []datatypes.N return } -func (r Notification_Occurrence_User) GetImpactedResourcesIter() (resp []datatypes.Notification_Occurrence_Resource, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getImpactedResources", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Resource{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getImpactedResources", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The associated event. func (r Notification_Occurrence_User) GetNotificationOccurrenceEvent() (resp datatypes.Notification_Occurrence_Event, err error) { err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getNotificationOccurrenceEvent", nil, &r.Options, &resp) @@ -843,30 +482,6 @@ func (r Notification_User_Subscriber) GetDeliveryMethods() (resp []datatypes.Not return } -func (r Notification_User_Subscriber) GetDeliveryMethodsIter() (resp []datatypes.Notification_Delivery_Method, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getDeliveryMethods", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Delivery_Method{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getDeliveryMethods", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Notification subscribed to. func (r Notification_User_Subscriber) GetNotification() (resp datatypes.Notification, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getNotification", nil, &r.Options, &resp) @@ -885,60 +500,12 @@ func (r Notification_User_Subscriber) GetPreferences() (resp []datatypes.Notific return } -func (r Notification_User_Subscriber) GetPreferencesIter() (resp []datatypes.Notification_User_Subscriber_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure. func (r Notification_User_Subscriber) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferencesDetails", nil, &r.Options, &resp) return } -func (r Notification_User_Subscriber) GetPreferencesDetailsIter() (resp []datatypes.Notification_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferencesDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferencesDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The subscriber id to resource id mapping. func (r Notification_User_Subscriber) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getResourceRecord", nil, &r.Options, &resp) @@ -1045,30 +612,6 @@ func (r Notification_User_Subscriber_Billing) GetDeliveryMethods() (resp []datat return } -func (r Notification_User_Subscriber_Billing) GetDeliveryMethodsIter() (resp []datatypes.Notification_Delivery_Method, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getDeliveryMethods", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Delivery_Method{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getDeliveryMethods", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Notification subscribed to. func (r Notification_User_Subscriber_Billing) GetNotification() (resp datatypes.Notification, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getNotification", nil, &r.Options, &resp) @@ -1087,60 +630,12 @@ func (r Notification_User_Subscriber_Billing) GetPreferences() (resp []datatypes return } -func (r Notification_User_Subscriber_Billing) GetPreferencesIter() (resp []datatypes.Notification_User_Subscriber_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure. func (r Notification_User_Subscriber_Billing) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferencesDetails", nil, &r.Options, &resp) return } -func (r Notification_User_Subscriber_Billing) GetPreferencesDetailsIter() (resp []datatypes.Notification_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferencesDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferencesDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The subscriber id to resource id mapping. func (r Notification_User_Subscriber_Billing) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getResourceRecord", nil, &r.Options, &resp) @@ -1253,30 +748,6 @@ func (r Notification_User_Subscriber_Mobile) GetDeliveryMethods() (resp []dataty return } -func (r Notification_User_Subscriber_Mobile) GetDeliveryMethodsIter() (resp []datatypes.Notification_Delivery_Method, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getDeliveryMethods", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Delivery_Method{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getDeliveryMethods", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Notification subscribed to. func (r Notification_User_Subscriber_Mobile) GetNotification() (resp datatypes.Notification, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getNotification", nil, &r.Options, &resp) @@ -1295,60 +766,12 @@ func (r Notification_User_Subscriber_Mobile) GetPreferences() (resp []datatypes. return } -func (r Notification_User_Subscriber_Mobile) GetPreferencesIter() (resp []datatypes.Notification_User_Subscriber_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure. func (r Notification_User_Subscriber_Mobile) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferencesDetails", nil, &r.Options, &resp) return } -func (r Notification_User_Subscriber_Mobile) GetPreferencesDetailsIter() (resp []datatypes.Notification_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferencesDetails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferencesDetails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The subscriber id to resource id mapping. func (r Notification_User_Subscriber_Mobile) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getResourceRecord", nil, &r.Options, &resp) diff --git a/services/product.go b/services/product.go index f94e726..006bbd0 100644 --- a/services/product.go +++ b/services/product.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -69,120 +68,24 @@ func (r Product_Item) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_E return } -func (r Product_Item) GetActivePresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getActivePresaleEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Sales_Presale_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getActivePresaleEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Active usage based prices. func (r Product_Item) GetActiveUsagePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getActiveUsagePrices", nil, &r.Options, &resp) return } -func (r Product_Item) GetActiveUsagePricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getActiveUsagePrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getActiveUsagePrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The attribute values for a product item. These are additional properties that give extra information about the product being sold. func (r Product_Item) GetAttributes() (resp []datatypes.Product_Item_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getAttributes", nil, &r.Options, &resp) return } -func (r Product_Item) GetAttributesIter() (resp []datatypes.Product_Item_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Attributes that govern when an item may no longer be available. func (r Product_Item) GetAvailabilityAttributes() (resp []datatypes.Product_Item_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getAvailabilityAttributes", nil, &r.Options, &resp) return } -func (r Product_Item) GetAvailabilityAttributesIter() (resp []datatypes.Product_Item_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getAvailabilityAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getAvailabilityAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An item's special billing type, if applicable. func (r Product_Item) GetBillingType() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getBillingType", nil, &r.Options, &resp) @@ -195,60 +98,12 @@ func (r Product_Item) GetBundle() (resp []datatypes.Product_Item_Bundles, err er return } -func (r Product_Item) GetBundleIter() (resp []datatypes.Product_Item_Bundles, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundle", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Bundles{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundle", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An item's included products. Some items have other items included in them that we specifically detail. They are here called Bundled Items. An example is Plesk unlimited. It as a bundled item labeled 'SiteBuilder'. These are the SoftLayer_Product_Item objects. func (r Product_Item) GetBundleItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundleItems", nil, &r.Options, &resp) return } -func (r Product_Item) GetBundleItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundleItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getBundleItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve When the product capacity is best described as a range, this holds the ceiling of the range. func (r Product_Item) GetCapacityMaximum() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getCapacityMaximum", nil, &r.Options, &resp) @@ -273,90 +128,18 @@ func (r Product_Item) GetCategories() (resp []datatypes.Product_Item_Category, e return } -func (r Product_Item) GetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Some product items have configuration templates which can be used to during provisioning of that product. func (r Product_Item) GetConfigurationTemplates() (resp []datatypes.Configuration_Template, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getConfigurationTemplates", nil, &r.Options, &resp) return } -func (r Product_Item) GetConfigurationTemplatesIter() (resp []datatypes.Configuration_Template, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getConfigurationTemplates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Template{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getConfigurationTemplates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An item's conflicts. For example, McAfee LinuxShield cannot be ordered with Windows. It was not meant for that operating system and as such is a conflict. func (r Product_Item) GetConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getConflicts", nil, &r.Options, &resp) return } -func (r Product_Item) GetConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getConflicts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Resource_Conflict{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getConflicts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This flag indicates that this product is restricted by the number of cores on the compute instance. This is deprecated. Use [[SoftLayer_Product_Item/getCapacityRestrictedProductFlag|getCapacityRestrictedProductFlag]] func (r Product_Item) GetCoreRestrictedItemFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getCoreRestrictedItemFlag", nil, &r.Options, &resp) @@ -375,60 +158,12 @@ func (r Product_Item) GetDowngradeItems() (resp []datatypes.Product_Item, err er return } -func (r Product_Item) GetDowngradeItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getDowngradeItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getDowngradeItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An item's category conflicts. For example, 10 Gbps redundant network functionality cannot be ordered with a secondary GPU and as such is a conflict. func (r Product_Item) GetGlobalCategoryConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getGlobalCategoryConflicts", nil, &r.Options, &resp) return } -func (r Product_Item) GetGlobalCategoryConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getGlobalCategoryConflicts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Resource_Conflict{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getGlobalCategoryConflicts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The generic hardware component that this item represents. func (r Product_Item) GetHardwareGenericComponentModel() (resp datatypes.Hardware_Component_Model_Generic, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getHardwareGenericComponentModel", nil, &r.Options, &resp) @@ -453,30 +188,6 @@ func (r Product_Item) GetInventory() (resp []datatypes.Product_Package_Inventory return } -func (r Product_Item) GetInventoryIter() (resp []datatypes.Product_Package_Inventory, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getInventory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Inventory{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getInventory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Flag to indicate the server product is engineered for a multi-server solution. (Deprecated) func (r Product_Item) GetIsEngineeredServerProduct() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getIsEngineeredServerProduct", nil, &r.Options, &resp) @@ -501,30 +212,6 @@ func (r Product_Item) GetLocationConflicts() (resp []datatypes.Product_Item_Reso return } -func (r Product_Item) GetLocationConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getLocationConflicts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Resource_Conflict{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getLocationConflicts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Indicates whether an item is a M.2 disk controller. func (r Product_Item) GetM2ControllerFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getM2ControllerFlag", nil, &r.Options, &resp) @@ -579,30 +266,6 @@ func (r Product_Item) GetPackages() (resp []datatypes.Product_Package, err error return } -func (r Product_Item) GetPackagesIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getPackages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getPackages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Indicates whether an item is a PCIe drive. func (r Product_Item) GetPcieDriveFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getPcieDriveFlag", nil, &r.Options, &resp) @@ -621,120 +284,24 @@ func (r Product_Item) GetPresaleEvents() (resp []datatypes.Sales_Presale_Event, return } -func (r Product_Item) GetPresaleEventsIter() (resp []datatypes.Sales_Presale_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getPresaleEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Sales_Presale_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getPresaleEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A product item's prices. func (r Product_Item) GetPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrices", nil, &r.Options, &resp) return } -func (r Product_Item) GetPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve If an item must be ordered with another item, it will have a requirement item here. func (r Product_Item) GetRequirements() (resp []datatypes.Product_Item_Requirement, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getRequirements", nil, &r.Options, &resp) return } -func (r Product_Item) GetRequirementsIter() (resp []datatypes.Product_Item_Requirement, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getRequirements", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Requirement{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getRequirements", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An item's rules. This includes the requirements and conflicts to resources that an item has. func (r Product_Item) GetRules() (resp []datatypes.Product_Item_Rule, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getRules", nil, &r.Options, &resp) return } -func (r Product_Item) GetRulesIter() (resp []datatypes.Product_Item_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getRules", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getRules", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Software_Description tied to this item. This will only be populated for software items. func (r Product_Item) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getSoftwareDescription", nil, &r.Options, &resp) @@ -765,30 +332,6 @@ func (r Product_Item) GetThirdPartyPolicyAssignments() (resp []datatypes.Product return } -func (r Product_Item) GetThirdPartyPolicyAssignmentsIter() (resp []datatypes.Product_Item_Policy_Assignment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getThirdPartyPolicyAssignments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Policy_Assignment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getThirdPartyPolicyAssignments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The 3rd party vendor for a support subscription item. (Deprecated) func (r Product_Item) GetThirdPartySupportVendor() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item", "getThirdPartySupportVendor", nil, &r.Options, &resp) @@ -825,30 +368,6 @@ func (r Product_Item) GetUpgradeItems() (resp []datatypes.Product_Item, err erro return } -func (r Product_Item) GetUpgradeItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item", "getUpgradeItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item", "getUpgradeItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Product_Item_Category data type contains general category information for prices. type Product_Item_Category struct { Session session.SLSession @@ -895,90 +414,18 @@ func (r Product_Item_Category) GetAdditionalProductsForCategory() (resp []dataty return } -func (r Product_Item_Category) GetAdditionalProductsForCategoryIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getAdditionalProductsForCategory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getAdditionalProductsForCategory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Item_Category) GetBandwidthCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBandwidthCategories", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetBandwidthCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBandwidthCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBandwidthCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing items associated with an account that share a category code with an item category's category code. func (r Product_Item_Category) GetBillingItems() (resp []datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBillingItems", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetBillingItemsIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBillingItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getBillingItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns a collection of computing categories. These categories are also top level items in a service offering. func (r Product_Item_Category) GetComputingCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { params := []interface{}{ @@ -988,33 +435,6 @@ func (r Product_Item_Category) GetComputingCategories(resetCache *bool) (resp [] return } -func (r Product_Item_Category) GetComputingCategoriesIter(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { - params := []interface{}{ - resetCache, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getComputingCategories", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getComputingCategories", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Item_Category) GetCustomUsageRatesCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { params := []interface{}{ @@ -1024,63 +444,12 @@ func (r Product_Item_Category) GetCustomUsageRatesCategories(resetCache *bool) ( return } -func (r Product_Item_Category) GetCustomUsageRatesCategoriesIter(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { - params := []interface{}{ - resetCache, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getCustomUsageRatesCategories", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getCustomUsageRatesCategories", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Item_Category) GetExternalResourceCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getExternalResourceCategories", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetExternalResourceCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getExternalResourceCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getExternalResourceCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This invoice item's "item category group". func (r Product_Item_Category) GetGroup() (resp datatypes.Product_Item_Category_Group, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getGroup", nil, &r.Options, &resp) @@ -1093,30 +462,6 @@ func (r Product_Item_Category) GetGroups() (resp []datatypes.Product_Package_Ite return } -func (r Product_Item_Category) GetGroupsIter() (resp []datatypes.Product_Package_Item_Category_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Item_Category_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Each product item price must be tied to a category for it to be sold. These categories describe how a particular product item is sold. For example, the 250GB hard drive can be sold as disk0, disk1, ... disk11. There are different prices for this product item depending on which category it is. This keeps down the number of products in total. func (r Product_Item_Category) GetObject() (resp datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getObject", nil, &r.Options, &resp) @@ -1132,243 +477,48 @@ func (r Product_Item_Category) GetObjectStorageCategories(resetCache *bool) (res return } -func (r Product_Item_Category) GetObjectStorageCategoriesIter(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { - params := []interface{}{ - resetCache, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getObjectStorageCategories", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getObjectStorageCategories", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Any unique options associated with an item category. func (r Product_Item_Category) GetOrderOptions() (resp []datatypes.Product_Item_Category_Order_Option_Type, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getOrderOptions", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetOrderOptionsIter() (resp []datatypes.Product_Item_Category_Order_Option_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getOrderOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category_Order_Option_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getOrderOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A list of configuration available in this category.' func (r Product_Item_Category) GetPackageConfigurations() (resp []datatypes.Product_Package_Order_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPackageConfigurations", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetPackageConfigurationsIter() (resp []datatypes.Product_Package_Order_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPackageConfigurations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Order_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPackageConfigurations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A list of preset configurations this category is used in.' func (r Product_Item_Category) GetPresetConfigurations() (resp []datatypes.Product_Package_Preset_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPresetConfigurations", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetPresetConfigurationsIter() (resp []datatypes.Product_Package_Preset_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPresetConfigurations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Preset_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getPresetConfigurations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The question references that are associated with an item category. func (r Product_Item_Category) GetQuestionReferences() (resp []datatypes.Product_Item_Category_Question_Xref, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestionReferences", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetQuestionReferencesIter() (resp []datatypes.Product_Item_Category_Question_Xref, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestionReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category_Question_Xref{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestionReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The questions that are associated with an item category. func (r Product_Item_Category) GetQuestions() (resp []datatypes.Product_Item_Category_Question, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestions", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetQuestionsIter() (resp []datatypes.Product_Item_Category_Question, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category_Question{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getQuestions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Item_Category) GetSoftwareCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSoftwareCategories", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetSoftwareCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSoftwareCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSoftwareCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns a list of subnet categories. func (r Product_Item_Category) GetSubnetCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSubnetCategories", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetSubnetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSubnetCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getSubnetCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns a collection of computing categories. These categories are also top level items in a service offering. func (r Product_Item_Category) GetTopLevelCategories(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { params := []interface{}{ @@ -1378,93 +528,18 @@ func (r Product_Item_Category) GetTopLevelCategories(resetCache *bool) (resp []d return } -func (r Product_Item_Category) GetTopLevelCategoriesIter(resetCache *bool) (resp []datatypes.Product_Item_Category, err error) { - params := []interface{}{ - resetCache, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getTopLevelCategories", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getTopLevelCategories", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns service product categories that can be canceled via API. You can use these categories to find the billing items you wish to cancel. func (r Product_Item_Category) GetValidCancelableServiceItemCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getValidCancelableServiceItemCategories", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetValidCancelableServiceItemCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getValidCancelableServiceItemCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getValidCancelableServiceItemCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Item_Category) GetVlanCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getVlanCategories", nil, &r.Options, &resp) return } -func (r Product_Item_Category) GetVlanCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getVlanCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Category", "getVlanCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Product_Item_Category_Group data type contains general category group information. type Product_Item_Category_Group struct { Session session.SLSession @@ -1625,32 +700,8 @@ func (r Product_Item_Price) Offset(offset int) Product_Item_Price { } // Retrieve The account that the item price is restricted to. -func (r Product_Item_Price) GetAccountRestrictions() (resp []datatypes.Product_Item_Price_Account_Restriction, err error) { - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAccountRestrictions", nil, &r.Options, &resp) - return -} - -func (r Product_Item_Price) GetAccountRestrictionsIter() (resp []datatypes.Product_Item_Price_Account_Restriction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAccountRestrictions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price_Account_Restriction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAccountRestrictions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() +func (r Product_Item_Price) GetAccountRestrictions() (resp []datatypes.Product_Item_Price_Account_Restriction, err error) { + err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAccountRestrictions", nil, &r.Options, &resp) return } @@ -1660,30 +711,6 @@ func (r Product_Item_Price) GetAttributes() (resp []datatypes.Product_Item_Price return } -func (r Product_Item_Price) GetAttributesIter() (resp []datatypes.Product_Item_Price_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Signifies pricing that is only available on a bare metal reserved capacity order. func (r Product_Item_Price) GetBareMetalReservedCapacityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBareMetalReservedCapacityFlag", nil, &r.Options, &resp) @@ -1702,30 +729,6 @@ func (r Product_Item_Price) GetBundleReferences() (resp []datatypes.Product_Item return } -func (r Product_Item_Price) GetBundleReferencesIter() (resp []datatypes.Product_Item_Bundles, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBundleReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Bundles{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getBundleReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The maximum capacity value for which this price is suitable. func (r Product_Item_Price) GetCapacityRestrictionMaximum() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCapacityRestrictionMaximum", nil, &r.Options, &resp) @@ -1750,30 +753,6 @@ func (r Product_Item_Price) GetCategories() (resp []datatypes.Product_Item_Categ return } -func (r Product_Item_Price) GetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Signifies pricing that is only available on a dedicated host virtual server order. func (r Product_Item_Price) GetDedicatedHostInstanceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getDedicatedHostInstanceFlag", nil, &r.Options, &resp) @@ -1810,120 +789,24 @@ func (r Product_Item_Price) GetOrderPremiums() (resp []datatypes.Product_Item_Pr return } -func (r Product_Item_Price) GetOrderPremiumsIter() (resp []datatypes.Product_Item_Price_Premium, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getOrderPremiums", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price_Premium{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getOrderPremiums", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve cross reference for packages func (r Product_Item_Price) GetPackageReferences() (resp []datatypes.Product_Package_Item_Prices, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackageReferences", nil, &r.Options, &resp) return } -func (r Product_Item_Price) GetPackageReferencesIter() (resp []datatypes.Product_Package_Item_Prices, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackageReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Item_Prices{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackageReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A price's packages under which this item is sold. func (r Product_Item_Price) GetPackages() (resp []datatypes.Product_Package, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackages", nil, &r.Options, &resp) return } -func (r Product_Item_Price) GetPackagesIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A list of preset configurations this price is used in.' func (r Product_Item_Price) GetPresetConfigurations() (resp []datatypes.Product_Package_Preset_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPresetConfigurations", nil, &r.Options, &resp) return } -func (r Product_Item_Price) GetPresetConfigurationsIter() (resp []datatypes.Product_Package_Preset_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPresetConfigurations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Preset_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPresetConfigurations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type keyname of this price which can be STANDARD, TIERED, or TERM. func (r Product_Item_Price) GetPriceType() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPriceType", nil, &r.Options, &resp) @@ -1958,34 +841,6 @@ func (r Product_Item_Price) GetUsageRatePrices(location *datatypes.Location, ite return } -func (r Product_Item_Price) GetUsageRatePricesIter(location *datatypes.Location, items []datatypes.Product_Item) (resp []datatypes.Product_Item_Price, err error) { - params := []interface{}{ - location, - items, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getUsageRatePrices", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getUsageRatePrices", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Product_Item_Price_Premium struct { Session session.SLSession @@ -2144,35 +999,6 @@ func (r Product_Order) GetNetworks(locationId *int, packageId *int, accountId *i return } -func (r Product_Order) GetNetworksIter(locationId *int, packageId *int, accountId *int) (resp []datatypes.Container_Product_Order_Network, err error) { - params := []interface{}{ - locationId, - packageId, - accountId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Order", "getNetworks", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Product_Order_Network{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Order", "getNetworks", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // When the account is on an external reseller brand, this service will provide a SoftLayer_Product_Order with the the pricing adjusted by the external reseller. func (r Product_Order) GetResellerOrder(orderContainer *datatypes.Container_Product_Order) (resp datatypes.Container_Product_Order, err error) { params := []interface{}{ @@ -2598,33 +1424,6 @@ func (r Product_Order) RequiredItems(itemPrices []datatypes.Product_Item_Price) return } -func (r Product_Order) RequiredItemsIter(itemPrices []datatypes.Product_Item_Price) (resp []datatypes.Product_Item, err error) { - params := []interface{}{ - itemPrices, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Order", "requiredItems", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Order", "requiredItems", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This service is used to verify that an order meets all the necessary requirements to purchase a server, virtual server or service from SoftLayer. It will verify that the products requested do not conflict. For example, you cannot order a Windows firewall with a Linux operating system. It will also check to make sure you have provided all the products that are required for the [[SoftLayer_Product_Package_Order_Configuration]] associated with the [[SoftLayer_Product_Package]] on each of the [[SoftLayer_Container_Product_Order]] specified.

// // This service returns the same container that was provided, but with additional information that can be used for debugging or validation. It will also contain pricing information (prorated if applicable) for each of the products on the order. If an exception occurs during verification, a container with the SoftLayer_Exception_Order exception type will be specified in the result.

@@ -2688,60 +1487,12 @@ func (r Product_Package) GetAccountRestrictedActivePresets() (resp []datatypes.P return } -func (r Product_Package) GetAccountRestrictedActivePresetsIter() (resp []datatypes.Product_Package_Preset, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedActivePresets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Preset{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedActivePresets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The results from this call are similar to [[SoftLayer_Product_Package/getCategories|getCategories]], but these ONLY include account-restricted prices. Not all accounts have restricted pricing. func (r Product_Package) GetAccountRestrictedCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedCategories", nil, &r.Options, &resp) return } -func (r Product_Package) GetAccountRestrictedCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The flag to indicate if there are any restricted prices in a package for the currently-active account. func (r Product_Package) GetAccountRestrictedPricesFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAccountRestrictedPricesFlag", nil, &r.Options, &resp) @@ -2754,30 +1505,6 @@ func (r Product_Package) GetActiveItems() (resp []datatypes.Product_Item, err er return } -func (r Product_Package) GetActiveItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is deprecated and should not be used in production code. // // This method will return the [[SoftLayer_Product_Package]] objects from which you can order a bare metal server, virtual server, service (such as CDN or Object Storage) or other software filtered by an attribute type associated with the package. Once you have the package you want to order from, you may query one of various endpoints from that package to get specific information about its products and pricing. See [[SoftLayer_Product_Package/getCategories|getCategories]] or [[SoftLayer_Product_Package/getItems|getItems]] for more information. @@ -2790,63 +1517,12 @@ func (r Product_Package) GetActivePackagesByAttribute(attributeKeyName *string) return } -func (r Product_Package) GetActivePackagesByAttributeIter(attributeKeyName *string) (resp []datatypes.Product_Package, err error) { - params := []interface{}{ - attributeKeyName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePackagesByAttribute", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePackagesByAttribute", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The available preset configurations for this package. func (r Product_Package) GetActivePresets() (resp []datatypes.Product_Package_Preset, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePresets", nil, &r.Options, &resp) return } -func (r Product_Package) GetActivePresetsIter() (resp []datatypes.Product_Package_Preset, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePresets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Preset{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePresets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // [DEPRECATED] This method pulls all the active private hosted cloud packages. This will give you a basic description of the packages that are currently active and from which you can order private hosted cloud configurations. // Deprecated: This function has been marked as deprecated. func (r Product_Package) GetActivePrivateHostedCloudPackages() (resp []datatypes.Product_Package, err error) { @@ -2854,150 +1530,30 @@ func (r Product_Package) GetActivePrivateHostedCloudPackages() (resp []datatypes return } -func (r Product_Package) GetActivePrivateHostedCloudPackagesIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePrivateHostedCloudPackages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActivePrivateHostedCloudPackages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of valid RAM items available for purchase in this package. func (r Product_Package) GetActiveRamItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveRamItems", nil, &r.Options, &resp) return } -func (r Product_Package) GetActiveRamItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveRamItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveRamItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of valid server items available for purchase in this package. func (r Product_Package) GetActiveServerItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveServerItems", nil, &r.Options, &resp) return } -func (r Product_Package) GetActiveServerItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveServerItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveServerItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of valid software items available for purchase in this package. func (r Product_Package) GetActiveSoftwareItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveSoftwareItems", nil, &r.Options, &resp) return } -func (r Product_Package) GetActiveSoftwareItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveSoftwareItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveSoftwareItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of [[SoftLayer_Product_Item_Price]] objects for pay-as-you-go usage. func (r Product_Package) GetActiveUsagePrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsagePrices", nil, &r.Options, &resp) return } -func (r Product_Package) GetActiveUsagePricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsagePrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsagePrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns a collection of active usage rate [[SoftLayer_Product_Item_Price]] objects for the current package and specified datacenter. Optionally you can retrieve the active usage rate prices for a particular [[SoftLayer_Product_Item_Category]] by specifying a category code as the first parameter. This information is useful so that you can see "pay as you go" rates (if any) for the current package, location and optionally category. func (r Product_Package) GetActiveUsageRatePrices(locationId *int, categoryCode *string) (resp []datatypes.Product_Item_Price, err error) { params := []interface{}{ @@ -3008,34 +1564,6 @@ func (r Product_Package) GetActiveUsageRatePrices(locationId *int, categoryCode return } -func (r Product_Package) GetActiveUsageRatePricesIter(locationId *int, categoryCode *string) (resp []datatypes.Product_Item_Price, err error) { - params := []interface{}{ - locationId, - categoryCode, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsageRatePrices", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getActiveUsageRatePrices", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This flag indicates that the package is an additional service. func (r Product_Package) GetAdditionalServiceFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAdditionalServiceFlag", nil, &r.Options, &resp) @@ -3048,90 +1576,18 @@ func (r Product_Package) GetAllObjects() (resp []datatypes.Product_Package, err return } -func (r Product_Package) GetAllObjectsIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Product_Package) GetAttributes() (resp []datatypes.Product_Package_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAttributes", nil, &r.Options, &resp) return } -func (r Product_Package) GetAttributesIter() (resp []datatypes.Product_Package_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of valid locations for this package. (Deprecated - Use [[SoftLayer_Product_Package/getRegions|getRegions]]) func (r Product_Package) GetAvailableLocations() (resp []datatypes.Product_Package_Locations, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableLocations", nil, &r.Options, &resp) return } -func (r Product_Package) GetAvailableLocationsIter() (resp []datatypes.Product_Package_Locations, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Locations{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Package) GetAvailablePackagesForImageTemplate(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Package, err error) { params := []interface{}{ @@ -3141,33 +1597,6 @@ func (r Product_Package) GetAvailablePackagesForImageTemplate(imageTemplate *dat return } -func (r Product_Package) GetAvailablePackagesForImageTemplateIter(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Package, err error) { - params := []interface{}{ - imageTemplate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailablePackagesForImageTemplate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailablePackagesForImageTemplate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The maximum number of available disk storage units associated with the servers in a package. func (r Product_Package) GetAvailableStorageUnits() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getAvailableStorageUnits", nil, &r.Options, &resp) @@ -3180,60 +1609,12 @@ func (r Product_Package) GetCategories() (resp []datatypes.Product_Item_Category return } -func (r Product_Package) GetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Package) GetCdnItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getCdnItems", nil, &r.Options, &resp) return } -func (r Product_Package) GetCdnItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getCdnItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getCdnItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Package) GetCloudStorageItems(provider *int) (resp []datatypes.Product_Item, err error) { params := []interface{}{ @@ -3243,60 +1624,9 @@ func (r Product_Package) GetCloudStorageItems(provider *int) (resp []datatypes.P return } -func (r Product_Package) GetCloudStorageItemsIter(provider *int) (resp []datatypes.Product_Item, err error) { - params := []interface{}{ - provider, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getCloudStorageItems", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getCloudStorageItems", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The item categories associated with a package, including information detailing which item categories are required as part of a SoftLayer product order. -func (r Product_Package) GetConfiguration() (resp []datatypes.Product_Package_Order_Configuration, err error) { - err = r.Session.DoRequest("SoftLayer_Product_Package", "getConfiguration", nil, &r.Options, &resp) - return -} - -func (r Product_Package) GetConfigurationIter() (resp []datatypes.Product_Package_Order_Configuration, err error) { - limit := r.Options.ValidateLimit() +func (r Product_Package) GetConfiguration() (resp []datatypes.Product_Package_Order_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getConfiguration", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Order_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getConfiguration", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -3312,30 +1642,6 @@ func (r Product_Package) GetDefaultRamItems() (resp []datatypes.Product_Item, er return } -func (r Product_Package) GetDefaultRamItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getDefaultRamItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getDefaultRamItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The node type for a package in a solution deployment. func (r Product_Package) GetDeploymentNodeType() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentNodeType", nil, &r.Options, &resp) @@ -3348,30 +1654,6 @@ func (r Product_Package) GetDeploymentPackages() (resp []datatypes.Product_Packa return } -func (r Product_Package) GetDeploymentPackagesIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentPackages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentPackages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The solution deployment type. func (r Product_Package) GetDeploymentType() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeploymentType", nil, &r.Options, &resp) @@ -3384,30 +1666,6 @@ func (r Product_Package) GetDeployments() (resp []datatypes.Product_Package, err return } -func (r Product_Package) GetDeploymentsIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeployments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getDeployments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This flag indicates the package does not allow custom disk partitions. func (r Product_Package) GetDisallowCustomDiskPartitions() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getDisallowCustomDiskPartitions", nil, &r.Options, &resp) @@ -3450,150 +1708,30 @@ func (r Product_Package) GetItemAvailabilityTypes() (resp []datatypes.Product_It return } -func (r Product_Package) GetItemAvailabilityTypesIter() (resp []datatypes.Product_Item_Attribute_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemAvailabilityTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Attribute_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemAvailabilityTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The item-item conflicts associated with a package. func (r Product_Package) GetItemConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemConflicts", nil, &r.Options, &resp) return } -func (r Product_Package) GetItemConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemConflicts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Resource_Conflict{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemConflicts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The item-location conflicts associated with a package. func (r Product_Package) GetItemLocationConflicts() (resp []datatypes.Product_Item_Resource_Conflict, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemLocationConflicts", nil, &r.Options, &resp) return } -func (r Product_Package) GetItemLocationConflictsIter() (resp []datatypes.Product_Item_Resource_Conflict, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemLocationConflicts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Resource_Conflict{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemLocationConflicts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve cross reference for item prices func (r Product_Package) GetItemPriceReferences() (resp []datatypes.Product_Package_Item_Prices, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPriceReferences", nil, &r.Options, &resp) return } -func (r Product_Package) GetItemPriceReferencesIter() (resp []datatypes.Product_Package_Item_Prices, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPriceReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Item_Prices{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPriceReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of SoftLayer_Product_Item_Prices that are valid for this package. func (r Product_Package) GetItemPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPrices", nil, &r.Options, &resp) return } -func (r Product_Package) GetItemPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Return a collection of SoftLayer_Item_Price objects from a collection of SoftLayer_Software_Description func (r Product_Package) GetItemPricesFromSoftwareDescriptions(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item_Price, err error) { params := []interface{}{ @@ -3605,65 +1743,12 @@ func (r Product_Package) GetItemPricesFromSoftwareDescriptions(softwareDescripti return } -func (r Product_Package) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item_Price, err error) { - params := []interface{}{ - softwareDescriptions, - includeTranslationsFlag, - returnAllPricesFlag, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of valid items available for purchase in this package. func (r Product_Package) GetItems() (resp []datatypes.Product_Item, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getItems", nil, &r.Options, &resp) return } -func (r Product_Package) GetItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Return a collection of [[SoftLayer_Product_Item]] objects from a [[SoftLayer_Virtual_Guest_Block_Device_Template_Group]] object func (r Product_Package) GetItemsFromImageTemplate(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Item, err error) { params := []interface{}{ @@ -3673,63 +1758,12 @@ func (r Product_Package) GetItemsFromImageTemplate(imageTemplate *datatypes.Virt return } -func (r Product_Package) GetItemsFromImageTemplateIter(imageTemplate *datatypes.Virtual_Guest_Block_Device_Template_Group) (resp []datatypes.Product_Item, err error) { - params := []interface{}{ - imageTemplate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemsFromImageTemplate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getItemsFromImageTemplate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A collection of valid locations for this package. (Deprecated - Use [[SoftLayer_Product_Package/getRegions|getRegions]]) func (r Product_Package) GetLocations() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getLocations", nil, &r.Options, &resp) return } -func (r Product_Package) GetLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The lowest server [[SoftLayer_Product_Item_Price]] related to this package. func (r Product_Package) GetLowestServerPrice() (resp datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getLowestServerPrice", nil, &r.Options, &resp) @@ -3748,30 +1782,6 @@ func (r Product_Package) GetMessageQueueItems() (resp []datatypes.Product_Item, return } -func (r Product_Package) GetMessageQueueItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getMessageQueueItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getMessageQueueItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The minimum available network speed associated with the package. func (r Product_Package) GetMinimumPortSpeed() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getMinimumPortSpeed", nil, &r.Options, &resp) @@ -3808,90 +1818,18 @@ func (r Product_Package) GetObjectStorageDatacenters() (resp []datatypes.Contain return } -func (r Product_Package) GetObjectStorageDatacentersIter() (resp []datatypes.Container_Product_Order_Network_Storage_Hub_Datacenter, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Product_Order_Network_Storage_Hub_Datacenter{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return a collection of [[SoftLayer_Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup]] objects which contain a location group and all the associated active usage rate prices where object storage is available. This method is really only applicable to the object storage additional service package which has a [[SoftLayer_Product_Package_Type]] of ”'ADDITIONAL_SERVICES_OBJECT_STORAGE”'. This information is useful so that you can see the "pay as you go" rates per location group. func (r Product_Package) GetObjectStorageLocationGroups() (resp []datatypes.Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageLocationGroups", nil, &r.Options, &resp) return } -func (r Product_Package) GetObjectStorageLocationGroupsIter() (resp []datatypes.Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageLocationGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageLocationGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The premium price modifiers associated with the [[SoftLayer_Product_Item_Price]] and [[SoftLayer_Location]] objects in a package. func (r Product_Package) GetOrderPremiums() (resp []datatypes.Product_Item_Price_Premium, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getOrderPremiums", nil, &r.Options, &resp) return } -func (r Product_Package) GetOrderPremiumsIter() (resp []datatypes.Product_Item_Price_Premium, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getOrderPremiums", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price_Premium{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getOrderPremiums", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This flag indicates if the package may be available in PoP locations in addition to Datacenters. func (r Product_Package) GetPopLocationAvailabilityFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getPopLocationAvailabilityFlag", nil, &r.Options, &resp) @@ -3958,60 +1896,12 @@ func (r Product_Package) GetRegions() (resp []datatypes.Location_Region, err err return } -func (r Product_Package) GetRegionsIter() (resp []datatypes.Location_Region, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getRegions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location_Region{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getRegions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This call is similar to [[SoftLayer_Product_Package/getCategories|getCategories]], except that it does not include account-restricted pricing. Not all accounts have restricted pricing. func (r Product_Package) GetStandardCategories() (resp []datatypes.Product_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getStandardCategories", nil, &r.Options, &resp) return } -func (r Product_Package) GetStandardCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package", "getStandardCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package", "getStandardCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The top level category code for this service offering. func (r Product_Package) GetTopLevelItemCategoryCode() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getTopLevelItemCategoryCode", nil, &r.Options, &resp) @@ -4072,30 +1962,6 @@ func (r Product_Package_Preset) GetAllObjects() (resp []datatypes.Product_Packag return } -func (r Product_Package_Preset) GetAllObjectsIter() (resp []datatypes.Product_Package_Preset, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Preset{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Product_Package_Preset) GetAvailableStorageUnits() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getAvailableStorageUnits", nil, &r.Options, &resp) @@ -4114,30 +1980,6 @@ func (r Product_Package_Preset) GetCategories() (resp []datatypes.Product_Item_C return } -func (r Product_Package_Preset) GetCategoriesIter() (resp []datatypes.Product_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The compute family this configuration belongs to. func (r Product_Package_Preset) GetComputeGroup() (resp datatypes.Product_Item_Server_Group, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getComputeGroup", nil, &r.Options, &resp) @@ -4150,30 +1992,6 @@ func (r Product_Package_Preset) GetConfiguration() (resp []datatypes.Product_Pac return } -func (r Product_Package_Preset) GetConfigurationIter() (resp []datatypes.Product_Package_Preset_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getConfiguration", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Preset_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getConfiguration", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve When true this preset is only allowed to upgrade/downgrade to other presets in the same compute family. func (r Product_Package_Preset) GetDisallowedComputeGroupUpgradeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getDisallowedComputeGroupUpgradeFlag", nil, &r.Options, &resp) @@ -4192,30 +2010,6 @@ func (r Product_Package_Preset) GetLocations() (resp []datatypes.Location, err e return } -func (r Product_Package_Preset) GetLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The lowest server prices related to this package preset. func (r Product_Package_Preset) GetLowestPresetServerPrice() (resp datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getLowestPresetServerPrice", nil, &r.Options, &resp) @@ -4240,90 +2034,18 @@ func (r Product_Package_Preset) GetPackageConfiguration() (resp []datatypes.Prod return } -func (r Product_Package_Preset) GetPackageConfigurationIter() (resp []datatypes.Product_Package_Order_Configuration, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPackageConfiguration", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Order_Configuration{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPackageConfiguration", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The item prices that are included in this package preset configuration. func (r Product_Package_Preset) GetPrices() (resp []datatypes.Product_Item_Price, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPrices", nil, &r.Options, &resp) return } -func (r Product_Package_Preset) GetPricesIter() (resp []datatypes.Product_Item_Price, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPrices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getPrices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Describes how all disks in this preset will be configured. func (r Product_Package_Preset) GetStorageGroupTemplateArrays() (resp []datatypes.Configuration_Storage_Group_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getStorageGroupTemplateArrays", nil, &r.Options, &resp) return } -func (r Product_Package_Preset) GetStorageGroupTemplateArraysIter() (resp []datatypes.Configuration_Storage_Group_Template_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getStorageGroupTemplateArrays", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getStorageGroupTemplateArrays", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The starting hourly price for this configuration. Additional options not defined in the preset may increase the cost. func (r Product_Package_Preset) GetTotalMinimumHourlyFee() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Preset", "getTotalMinimumHourlyFee", nil, &r.Options, &resp) @@ -4382,30 +2104,6 @@ func (r Product_Package_Server) GetAllObjects() (resp []datatypes.Product_Packag return } -func (r Product_Package_Server) GetAllObjectsIter() (resp []datatypes.Product_Package_Server, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Server{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Product_Package_Server) GetCatalog() (resp datatypes.Product_Catalog, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Server", "getCatalog", nil, &r.Options, &resp) @@ -4488,30 +2186,6 @@ func (r Product_Package_Server_Option) GetAllOptions() (resp []datatypes.Product return } -func (r Product_Package_Server_Option) GetAllOptionsIter() (resp []datatypes.Product_Package_Server_Option, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getAllOptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Server_Option{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getAllOptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Package_Server_Option) GetObject() (resp datatypes.Product_Package_Server_Option, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getObject", nil, &r.Options, &resp) @@ -4527,33 +2201,6 @@ func (r Product_Package_Server_Option) GetOptions(typ *string) (resp []datatypes return } -func (r Product_Package_Server_Option) GetOptionsIter(typ *string) (resp []datatypes.Product_Package_Server_Option, err error) { - params := []interface{}{ - typ, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getOptions", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Server_Option{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Server_Option", "getOptions", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The [[SoftLayer_Product_Package_Type]] object indicates the type for a service offering (package). The type can be used to filter packages. For example, if you are looking for the package representing virtual servers, you can filter on the type's key name of ”'VIRTUAL_SERVER_INSTANCE”'. For bare metal servers by core or CPU, filter on ”'BARE_METAL_CORE”' or ”'BARE_METAL_CPU”', respectively. type Product_Package_Type struct { Session session.SLSession @@ -4600,30 +2247,6 @@ func (r Product_Package_Type) GetAllObjects() (resp []datatypes.Product_Package_ return } -func (r Product_Package_Type) GetAllObjectsIter() (resp []datatypes.Product_Package_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Product_Package_Type) GetObject() (resp datatypes.Product_Package_Type, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getObject", nil, &r.Options, &resp) @@ -4636,30 +2259,6 @@ func (r Product_Package_Type) GetPackages() (resp []datatypes.Product_Package, e return } -func (r Product_Package_Type) GetPackagesIter() (resp []datatypes.Product_Package, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getPackages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Package{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Product_Package_Type", "getPackages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Product_Promotion struct { Session session.SLSession diff --git a/services/provisioning.go b/services/provisioning.go index cda79bb..d0861ba 100644 --- a/services/provisioning.go +++ b/services/provisioning.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -151,30 +150,6 @@ func (r Provisioning_Hook_Type) GetAllHookTypes() (resp []datatypes.Provisioning return } -func (r Provisioning_Hook_Type) GetAllHookTypesIter() (resp []datatypes.Provisioning_Hook_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Hook_Type", "getAllHookTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Hook_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Hook_Type", "getAllHookTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Provisioning_Hook_Type) GetObject() (resp datatypes.Provisioning_Hook_Type, err error) { err = r.Session.DoRequest("SoftLayer_Provisioning_Hook_Type", "getObject", nil, &r.Options, &resp) @@ -227,30 +202,6 @@ func (r Provisioning_Maintenance_Classification) GetItemCategories() (resp []dat return } -func (r Provisioning_Maintenance_Classification) GetItemCategoriesIter() (resp []datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getItemCategories", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Maintenance_Classification_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getItemCategories", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve an array of SoftLayer_Provisioning_Maintenance_Classification data types, which contain all maintenance classifications. func (r Provisioning_Maintenance_Classification) GetMaintenanceClassification(maintenanceClassificationId *int) (resp []datatypes.Provisioning_Maintenance_Classification, err error) { params := []interface{}{ @@ -260,63 +211,12 @@ func (r Provisioning_Maintenance_Classification) GetMaintenanceClassification(ma return } -func (r Provisioning_Maintenance_Classification) GetMaintenanceClassificationIter(maintenanceClassificationId *int) (resp []datatypes.Provisioning_Maintenance_Classification, err error) { - params := []interface{}{ - maintenanceClassificationId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassification", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Maintenance_Classification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassification", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve an array of SoftLayer_Provisioning_Maintenance_Classification data types, which contain all maintenance classifications. func (r Provisioning_Maintenance_Classification) GetMaintenanceClassificationsByItemCategory() (resp []datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) { err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassificationsByItemCategory", nil, &r.Options, &resp) return } -func (r Provisioning_Maintenance_Classification) GetMaintenanceClassificationsByItemCategoryIter() (resp []datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassificationsByItemCategory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Maintenance_Classification_Item_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassificationsByItemCategory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Provisioning_Maintenance_Classification) GetObject() (resp datatypes.Provisioning_Maintenance_Classification, err error) { err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getObject", nil, &r.Options, &resp) @@ -540,30 +440,6 @@ func (r Provisioning_Maintenance_Window) GetMaintenanceClassifications() (resp [ return } -func (r Provisioning_Maintenance_Window) GetMaintenanceClassificationsIter() (resp []datatypes.Provisioning_Maintenance_Classification, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceClassifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Maintenance_Classification{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceClassifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getMaintenanceStartEndTime() returns a specific maintenance window func (r Provisioning_Maintenance_Window) GetMaintenanceStartEndTime(ticketId *int) (resp datatypes.Provisioning_Maintenance_Window, err error) { params := []interface{}{ @@ -591,33 +467,6 @@ func (r Provisioning_Maintenance_Window) GetMaintenanceWindowTicketsByTicketId(t return } -func (r Provisioning_Maintenance_Window) GetMaintenanceWindowTicketsByTicketIdIter(ticketId *int) (resp []datatypes.Provisioning_Maintenance_Ticket, err error) { - params := []interface{}{ - ticketId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindowTicketsByTicketId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Maintenance_Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindowTicketsByTicketId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns a list of available maintenance windows func (r Provisioning_Maintenance_Window) GetMaintenanceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) { params := []interface{}{ @@ -630,36 +479,6 @@ func (r Provisioning_Maintenance_Window) GetMaintenanceWindows(beginDate *dataty return } -func (r Provisioning_Maintenance_Window) GetMaintenanceWindowsIter(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) { - params := []interface{}{ - beginDate, - endDate, - locationId, - slotsNeeded, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindows", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Maintenance_Window{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindows", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // (DEPRECATED) Use [[SoftLayer_Provisioning_Maintenance_Window::getMaintenanceWindows|getMaintenanceWindows]] method. // Deprecated: This function has been marked as deprecated. func (r Provisioning_Maintenance_Window) GetMaintenceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) { @@ -673,36 +492,6 @@ func (r Provisioning_Maintenance_Window) GetMaintenceWindows(beginDate *datatype return } -func (r Provisioning_Maintenance_Window) GetMaintenceWindowsIter(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) { - params := []interface{}{ - beginDate, - endDate, - locationId, - slotsNeeded, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenceWindows", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Maintenance_Window{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenceWindows", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Provisioning_Version1_Transaction_Group data type contains general information relating to a single SoftLayer hardware transaction group. // // SoftLayer customers are unable to change their hardware transactions or the hardware transaction group. @@ -751,30 +540,6 @@ func (r Provisioning_Version1_Transaction_Group) GetAllObjects() (resp []datatyp return } -func (r Provisioning_Version1_Transaction_Group) GetAllObjectsIter() (resp []datatypes.Provisioning_Version1_Transaction_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Provisioning_Version1_Transaction_Group", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Provisioning_Version1_Transaction_Group", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_Provisioning_Version1_Transaction_Group object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Provisioning_Version1_Transaction_Group service. func (r Provisioning_Version1_Transaction_Group) GetObject() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) { err = r.Session.DoRequest("SoftLayer_Provisioning_Version1_Transaction_Group", "getObject", nil, &r.Options, &resp) diff --git a/services/resource.go b/services/resource.go index e7b914a..c4de181 100644 --- a/services/resource.go +++ b/services/resource.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -127,120 +126,24 @@ func (r Resource_Group) GetAncestorGroups() (resp []datatypes.Resource_Group, er return } -func (r Resource_Group) GetAncestorGroupsIter() (resp []datatypes.Resource_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAncestorGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAncestorGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A resource group's associated attributes. func (r Resource_Group) GetAttributes() (resp []datatypes.Resource_Group_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAttributes", nil, &r.Options, &resp) return } -func (r Resource_Group) GetAttributesIter() (resp []datatypes.Resource_Group_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A resource group's associated hardware members. func (r Resource_Group) GetHardwareMembers() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getHardwareMembers", nil, &r.Options, &resp) return } -func (r Resource_Group) GetHardwareMembersIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getHardwareMembers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getHardwareMembers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A resource group's associated members. func (r Resource_Group) GetMembers() (resp []datatypes.Resource_Group_Member, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getMembers", nil, &r.Options, &resp) return } -func (r Resource_Group) GetMembersIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getMembers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getMembers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Resource_Group) GetObject() (resp datatypes.Resource_Group, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getObject", nil, &r.Options, &resp) @@ -259,30 +162,6 @@ func (r Resource_Group) GetSubnetMembers() (resp []datatypes.Resource_Group_Memb return } -func (r Resource_Group) GetSubnetMembersIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getSubnetMembers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getSubnetMembers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A resource group's associated template. func (r Resource_Group) GetTemplate() (resp datatypes.Resource_Group_Template, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group", "getTemplate", nil, &r.Options, &resp) @@ -295,30 +174,6 @@ func (r Resource_Group) GetVlanMembers() (resp []datatypes.Resource_Group_Member return } -func (r Resource_Group) GetVlanMembersIter() (resp []datatypes.Resource_Group_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getVlanMembers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group", "getVlanMembers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Resource_Group_Template struct { Session session.SLSession @@ -365,90 +220,18 @@ func (r Resource_Group_Template) GetAllObjects() (resp []datatypes.Resource_Grou return } -func (r Resource_Group_Template) GetAllObjectsIter() (resp []datatypes.Resource_Group_Template, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Template{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Resource_Group_Template) GetChildren() (resp []datatypes.Resource_Group_Template, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getChildren", nil, &r.Options, &resp) return } -func (r Resource_Group_Template) GetChildrenIter() (resp []datatypes.Resource_Group_Template, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Template{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Resource_Group_Template) GetMembers() (resp []datatypes.Resource_Group_Template_Member, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getMembers", nil, &r.Options, &resp) return } -func (r Resource_Group_Template) GetMembersIter() (resp []datatypes.Resource_Group_Template_Member, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getMembers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Resource_Group_Template_Member{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getMembers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Resource_Group_Template) GetObject() (resp datatypes.Resource_Group_Template, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getObject", nil, &r.Options, &resp) @@ -507,30 +290,6 @@ func (r Resource_Metadata) GetBackendMacAddresses() (resp []string, err error) { return } -func (r Resource_Metadata) GetBackendMacAddressesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getBackendMacAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getBackendMacAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The getDatacenter method retrieves the name of the datacenter in which the resource is located. func (r Resource_Metadata) GetDatacenter() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getDatacenter", nil, &r.Options, &resp) @@ -555,30 +314,6 @@ func (r Resource_Metadata) GetFrontendMacAddresses() (resp []string, err error) return } -func (r Resource_Metadata) GetFrontendMacAddressesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getFrontendMacAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getFrontendMacAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The getFullyQualifiedDomainName method provides the user with a combined return which includes the hostname and domain for the resource. Because this method returns multiple pieces of information, it avoids the need to use multiple methods to return the desired information. func (r Resource_Metadata) GetFullyQualifiedDomainName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getFullyQualifiedDomainName", nil, &r.Options, &resp) @@ -646,60 +381,12 @@ func (r Resource_Metadata) GetServiceResources() (resp []datatypes.Container_Res return } -func (r Resource_Metadata) GetServiceResourcesIter() (resp []datatypes.Container_Resource_Metadata_ServiceResource, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getServiceResources", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Resource_Metadata_ServiceResource{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getServiceResources", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The getTags method retrieves all tags associated with the resource. Tags are single keywords assigned to a resource that assist the user in identifying the resource and its roles when performing a simple search. Tags are assigned by any user with access to the resource. func (r Resource_Metadata) GetTags() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getTags", nil, &r.Options, &resp) return } -func (r Resource_Metadata) GetTagsIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getTags", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getTags", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The getUserMetadata method retrieves metadata completed by users who interact with the resource. Metadata gathered using this method is unique to parameters set using the ”'setUserMetadata”' method, which must be executed prior to completing this method. User metadata may also be provided while placing an order for a resource. func (r Resource_Metadata) GetUserMetadata() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getUserMetadata", nil, &r.Options, &resp) @@ -715,33 +402,6 @@ func (r Resource_Metadata) GetVlanIds(macAddress *string) (resp []int, err error return } -func (r Resource_Metadata) GetVlanIdsIter(macAddress *string) (resp []int, err error) { - params := []interface{}{ - macAddress, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlanIds", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlanIds", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The getVlans method returns a list of VLAN numbers for the network component matching the provided MAC address associated with the resource. For each return, the native VLAN will appear first, followed by any trunked VLANs associated with the network component. func (r Resource_Metadata) GetVlans(macAddress *string) (resp []int, err error) { params := []interface{}{ @@ -750,30 +410,3 @@ func (r Resource_Metadata) GetVlans(macAddress *string) (resp []int, err error) err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlans", params, &r.Options, &resp) return } - -func (r Resource_Metadata) GetVlansIter(macAddress *string) (resp []int, err error) { - params := []interface{}{ - macAddress, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlans", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlans", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} diff --git a/services/sales.go b/services/sales.go index 43c488a..fc3a899 100644 --- a/services/sales.go +++ b/services/sales.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -75,30 +74,6 @@ func (r Sales_Presale_Event) GetAllObjects() (resp []datatypes.Sales_Presale_Eve return } -func (r Sales_Presale_Event) GetAllObjectsIter() (resp []datatypes.Sales_Presale_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Sales_Presale_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A flag to indicate that the presale event is expired. A presale event is expired if the current time is after the end date. func (r Sales_Presale_Event) GetExpiredFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getExpiredFlag", nil, &r.Options, &resp) @@ -128,27 +103,3 @@ func (r Sales_Presale_Event) GetOrders() (resp []datatypes.Billing_Order, err er err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getOrders", nil, &r.Options, &resp) return } - -func (r Sales_Presale_Event) GetOrdersIter() (resp []datatypes.Billing_Order, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getOrders", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Order{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getOrders", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} diff --git a/services/search.go b/services/search.go index cd76998..91fc982 100644 --- a/services/search.go +++ b/services/search.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -93,33 +92,6 @@ func (r Search) AdvancedSearch(searchString *string) (resp []datatypes.Container return } -func (r Search) AdvancedSearchIter(searchString *string) (resp []datatypes.Container_Search_Result, err error) { - params := []interface{}{ - searchString, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Search", "advancedSearch", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Search_Result{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Search", "advancedSearch", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns a collection of [[SoftLayer_Container_Search_ObjectType]] containers that specify which indexed object types and properties are exposed for the current user. These object types can be used to discover searchable data and to create or validate object index search strings. // // Refer to the [[SoftLayer_Search/search]] and [[SoftLayer_Search/advancedSearch]] methods for information on using object types and properties in search strings. @@ -128,30 +100,6 @@ func (r Search) GetObjectTypes() (resp []datatypes.Container_Search_ObjectType, return } -func (r Search) GetObjectTypesIter() (resp []datatypes.Container_Search_ObjectType, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Search", "getObjectTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Search_ObjectType{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Search", "getObjectTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method allows for searching for SoftLayer resources by simple phrase. It returns a collection or array of [[SoftLayer_Container_Search_Result]] objects that have search metadata for each result and the resulting resource found. // // This method recognizes the special _objectType: quantifier in search strings. This quantifier can be used to restrict a search to specific object types. Example usage: @@ -183,30 +131,3 @@ func (r Search) Search(searchString *string) (resp []datatypes.Container_Search_ err = r.Session.DoRequest("SoftLayer_Search", "search", params, &r.Options, &resp) return } - -func (r Search) SearchIter(searchString *string) (resp []datatypes.Container_Search_Result, err error) { - params := []interface{}{ - searchString, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Search", "search", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Search_Result{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Search", "search", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} diff --git a/services/security.go b/services/security.go index 3fc3107..0ffca50 100644 --- a/services/security.go +++ b/services/security.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -98,33 +97,6 @@ func (r Security_Certificate) FindByCommonName(commonName *string) (resp []datat return } -func (r Security_Certificate) FindByCommonNameIter(commonName *string) (resp []datatypes.Security_Certificate, err error) { - params := []interface{}{ - commonName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Certificate", "findByCommonName", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Certificate{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Certificate", "findByCommonName", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The number of services currently associated with the certificate. func (r Security_Certificate) GetAssociatedServiceCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getAssociatedServiceCount", nil, &r.Options, &resp) @@ -137,60 +109,12 @@ func (r Security_Certificate) GetLbaasListeners() (resp []datatypes.Network_LBaa return } -func (r Security_Certificate) GetLbaasListenersIter() (resp []datatypes.Network_LBaaS_Listener, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLbaasListeners", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_LBaaS_Listener{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLbaasListeners", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The load balancers virtual IP addresses currently associated with the certificate. func (r Security_Certificate) GetLoadBalancerVirtualIpAddresses() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLoadBalancerVirtualIpAddresses", nil, &r.Options, &resp) return } -func (r Security_Certificate) GetLoadBalancerVirtualIpAddressesIter() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLoadBalancerVirtualIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLoadBalancerVirtualIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Security_Certificate) GetObject() (resp datatypes.Security_Certificate, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getObject", nil, &r.Options, &resp) @@ -264,63 +188,12 @@ func (r Security_Certificate_Request) GetAdministratorEmailDomains(commonName *s return } -func (r Security_Certificate_Request) GetAdministratorEmailDomainsIter(commonName *string) (resp []string, err error) { - params := []interface{}{ - commonName, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailDomains", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailDomains", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Gets the email accounts that can be used to validate a certificate to a domain. func (r Security_Certificate_Request) GetAdministratorEmailPrefixes() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailPrefixes", nil, &r.Options, &resp) return } -func (r Security_Certificate_Request) GetAdministratorEmailPrefixesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailPrefixes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailPrefixes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Security_Certificate_Request) GetObject() (resp datatypes.Security_Certificate_Request, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getObject", nil, &r.Options, &resp) @@ -354,33 +227,6 @@ func (r Security_Certificate_Request) GetSslCertificateRequests(accountId *int) return } -func (r Security_Certificate_Request) GetSslCertificateRequestsIter(accountId *int) (resp []datatypes.Security_Certificate_Request, err error) { - params := []interface{}{ - accountId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getSslCertificateRequests", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Certificate_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getSslCertificateRequests", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of a SSL certificate request. func (r Security_Certificate_Request) GetStatus() (resp datatypes.Security_Certificate_Request_Status, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getStatus", nil, &r.Options, &resp) @@ -456,30 +302,6 @@ func (r Security_Certificate_Request_ServerType) GetAllObjects() (resp []datatyp return } -func (r Security_Certificate_Request_ServerType) GetAllObjectsIter() (resp []datatypes.Security_Certificate_Request_ServerType, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_ServerType", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Certificate_Request_ServerType{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_ServerType", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Security_Certificate_Request_ServerType) GetObject() (resp datatypes.Security_Certificate_Request_ServerType, err error) { err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_ServerType", "getObject", nil, &r.Options, &resp) @@ -538,30 +360,6 @@ func (r Security_Certificate_Request_Status) GetSslRequestStatuses() (resp []dat return } -func (r Security_Certificate_Request_Status) GetSslRequestStatusesIter() (resp []datatypes.Security_Certificate_Request_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_Status", "getSslRequestStatuses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Certificate_Request_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_Status", "getSslRequestStatuses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Security_Ssh_Key struct { Session session.SLSession @@ -638,30 +436,6 @@ func (r Security_Ssh_Key) GetBlockDeviceTemplateGroups() (resp []datatypes.Virtu return } -func (r Security_Ssh_Key) GetBlockDeviceTemplateGroupsIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getBlockDeviceTemplateGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getBlockDeviceTemplateGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Security_Ssh_Key) GetObject() (resp datatypes.Security_Ssh_Key, err error) { err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getObject", nil, &r.Options, &resp) @@ -673,27 +447,3 @@ func (r Security_Ssh_Key) GetSoftwarePasswords() (resp []datatypes.Software_Comp err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getSoftwarePasswords", nil, &r.Options, &resp) return } - -func (r Security_Ssh_Key) GetSoftwarePasswordsIter() (resp []datatypes.Software_Component_Password, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getSoftwarePasswords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getSoftwarePasswords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} diff --git a/services/software.go b/services/software.go index 591ba47..9a3e3d2 100644 --- a/services/software.go +++ b/services/software.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -75,30 +74,6 @@ func (r Software_AccountLicense) GetAllObjects() (resp []datatypes.Software_Acco return } -func (r Software_AccountLicense) GetAllObjectsIter() (resp []datatypes.Software_AccountLicense, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_AccountLicense{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item for a software account license. func (r Software_AccountLicense) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getBillingItem", nil, &r.Options, &resp) @@ -199,60 +174,12 @@ func (r Software_Component) GetPasswordHistory() (resp []datatypes.Software_Comp return } -func (r Software_Component) GetPasswordHistoryIter() (resp []datatypes.Software_Component_Password_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswordHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswordHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Username/Password pairs used for access to this Software Installation. func (r Software_Component) GetPasswords() (resp []datatypes.Software_Component_Password, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswords", nil, &r.Options, &resp) return } -func (r Software_Component) GetPasswordsIter() (resp []datatypes.Software_Component_Password, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Software Description of this Software Component. func (r Software_Component) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component", "getSoftwareDescription", nil, &r.Options, &resp) @@ -353,60 +280,12 @@ func (r Software_Component_AntivirusSpyware) GetPasswordHistory() (resp []dataty return } -func (r Software_Component_AntivirusSpyware) GetPasswordHistoryIter() (resp []datatypes.Software_Component_Password_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswordHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswordHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Username/Password pairs used for access to this Software Installation. func (r Software_Component_AntivirusSpyware) GetPasswords() (resp []datatypes.Software_Component_Password, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswords", nil, &r.Options, &resp) return } -func (r Software_Component_AntivirusSpyware) GetPasswordsIter() (resp []datatypes.Software_Component_Password, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Software Description of this Software Component. func (r Software_Component_AntivirusSpyware) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getSoftwareDescription", nil, &r.Options, &resp) @@ -504,30 +383,6 @@ func (r Software_Component_HostIps) GetCurrentHostIpsPolicies() (resp []datatype return } -func (r Software_Component_HostIps) GetCurrentHostIpsPoliciesIter() (resp []datatypes.Container_Software_Component_HostIps_Policy, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getCurrentHostIpsPolicies", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Software_Component_HostIps_Policy{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getCurrentHostIpsPolicies", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware this Software Component is installed upon. func (r Software_Component_HostIps) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getHardware", nil, &r.Options, &resp) @@ -552,60 +407,12 @@ func (r Software_Component_HostIps) GetPasswordHistory() (resp []datatypes.Softw return } -func (r Software_Component_HostIps) GetPasswordHistoryIter() (resp []datatypes.Software_Component_Password_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswordHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswordHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Username/Password pairs used for access to this Software Installation. func (r Software_Component_HostIps) GetPasswords() (resp []datatypes.Software_Component_Password, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswords", nil, &r.Options, &resp) return } -func (r Software_Component_HostIps) GetPasswordsIter() (resp []datatypes.Software_Component_Password, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Software Description of this Software Component. func (r Software_Component_HostIps) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getSoftwareDescription", nil, &r.Options, &resp) @@ -754,30 +561,6 @@ func (r Software_Component_Password) GetSshKeys() (resp []datatypes.Security_Ssh return } -func (r Software_Component_Password) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This object specifies a specific type of Software Component: An Trellix instance. Trellix installations have specific properties and methods such as SoftLayer_Software_Component_Trellix::updateTrellixPolicy. Defaults are initiated by this object. type Software_Component_Trellix struct { Session session.SLSession @@ -836,30 +619,6 @@ func (r Software_Component_Trellix) GetCurrentHostIpsPolicies() (resp []datatype return } -func (r Software_Component_Trellix) GetCurrentHostIpsPoliciesIter() (resp []datatypes.Container_Software_Component_HostIps_Policy, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getCurrentHostIpsPolicies", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Software_Component_HostIps_Policy{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getCurrentHostIpsPolicies", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware this Software Component is installed upon. func (r Software_Component_Trellix) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getHardware", nil, &r.Options, &resp) @@ -884,60 +643,12 @@ func (r Software_Component_Trellix) GetPasswordHistory() (resp []datatypes.Softw return } -func (r Software_Component_Trellix) GetPasswordHistoryIter() (resp []datatypes.Software_Component_Password_History, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswordHistory", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password_History{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswordHistory", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Username/Password pairs used for access to this Software Installation. func (r Software_Component_Trellix) GetPasswords() (resp []datatypes.Software_Component_Password, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswords", nil, &r.Options, &resp) return } -func (r Software_Component_Trellix) GetPasswordsIter() (resp []datatypes.Software_Component_Password, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component_Password{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getPasswords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Software Description of this Software Component. func (r Software_Component_Trellix) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Component_Trellix", "getSoftwareDescription", nil, &r.Options, &resp) @@ -1042,60 +753,12 @@ func (r Software_Description) GetAllObjects() (resp []datatypes.Software_Descrip return } -func (r Software_Description) GetAllObjectsIter() (resp []datatypes.Software_Description, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Description{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Software_Description) GetAttributes() (resp []datatypes.Software_Description_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getAttributes", nil, &r.Options, &resp) return } -func (r Software_Description) GetAttributesIter() (resp []datatypes.Software_Description_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Description_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The average amount of time that a software description takes to install. func (r Software_Description) GetAverageInstallationDuration() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getAverageInstallationDuration", nil, &r.Options, &resp) @@ -1108,120 +771,24 @@ func (r Software_Description) GetCompatibleSoftwareDescriptions() (resp []dataty return } -func (r Software_Description) GetCompatibleSoftwareDescriptionsIter() (resp []datatypes.Software_Description, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getCompatibleSoftwareDescriptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Description{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getCompatibleSoftwareDescriptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Software_Description) GetCustomerOwnedLicenseDescriptions() (resp []datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getCustomerOwnedLicenseDescriptions", nil, &r.Options, &resp) return } -func (r Software_Description) GetCustomerOwnedLicenseDescriptionsIter() (resp []datatypes.Software_Description, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getCustomerOwnedLicenseDescriptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Description{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getCustomerOwnedLicenseDescriptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The feature attributes of a software description. func (r Software_Description) GetFeatures() (resp []datatypes.Software_Description_Feature, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &r.Options, &resp) return } -func (r Software_Description) GetFeaturesIter() (resp []datatypes.Software_Description_Feature, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Description_Feature{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The latest version of a software description. func (r Software_Description) GetLatestVersion() (resp []datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getLatestVersion", nil, &r.Options, &resp) return } -func (r Software_Description) GetLatestVersionIter() (resp []datatypes.Software_Description, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getLatestVersion", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Description{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getLatestVersion", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Software_Description) GetObject() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getObject", nil, &r.Options, &resp) @@ -1234,30 +801,6 @@ func (r Software_Description) GetProductItems() (resp []datatypes.Product_Item, return } -func (r Software_Description) GetProductItemsIter() (resp []datatypes.Product_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getProductItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getProductItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve This details the provisioning transaction group for this software. This is only valid for Operating System software. func (r Software_Description) GetProvisionTransactionGroup() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getProvisionTransactionGroup", nil, &r.Options, &resp) @@ -1282,30 +825,6 @@ func (r Software_Description) GetSoftwareLicenses() (resp []datatypes.Software_L return } -func (r Software_Description) GetSoftwareLicensesIter() (resp []datatypes.Software_License, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getSoftwareLicenses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_License{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getSoftwareLicenses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A suggestion for an upgrade path from this Software Description func (r Software_Description) GetUpgradeSoftwareDescription() (resp datatypes.Software_Description, err error) { err = r.Session.DoRequest("SoftLayer_Software_Description", "getUpgradeSoftwareDescription", nil, &r.Options, &resp) @@ -1324,30 +843,6 @@ func (r Software_Description) GetValidFilesystemTypes() (resp []datatypes.Config return } -func (r Software_Description) GetValidFilesystemTypesIter() (resp []datatypes.Configuration_Storage_Filesystem_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Software_Description", "getValidFilesystemTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Filesystem_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Software_Description", "getValidFilesystemTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // SoftLayer_Software_VirtualLicense is the application class that handles a special type of Software License. Most software licenses are licensed to a specific hardware ID; virtual licenses are designed for virtual machines and therefore are assigned to an IP Address. Not all software packages can be "virtual licensed". type Software_VirtualLicense struct { Session session.SLSession diff --git a/services/survey.go b/services/survey.go index 9cc02ef..faea144 100644 --- a/services/survey.go +++ b/services/survey.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -84,30 +83,6 @@ func (r Survey) GetQuestions() (resp []datatypes.Survey_Question, err error) { return } -func (r Survey) GetQuestionsIter() (resp []datatypes.Survey_Question, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Survey", "getQuestions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Survey_Question{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Survey", "getQuestions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The status of the survey func (r Survey) GetStatus() (resp datatypes.Survey_Status, err error) { err = r.Session.DoRequest("SoftLayer_Survey", "getStatus", nil, &r.Options, &resp) diff --git a/services/tag.go b/services/tag.go index 7ac6588..bccad6f 100644 --- a/services/tag.go +++ b/services/tag.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -72,33 +71,6 @@ func (r Tag) AutoComplete(tag *string) (resp []datatypes.Tag, err error) { return } -func (r Tag) AutoCompleteIter(tag *string) (resp []datatypes.Tag, err error) { - params := []interface{}{ - tag, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Tag", "autoComplete", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Tag", "autoComplete", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Delete a tag for an object. func (r Tag) DeleteTag(tagName *string) (resp bool, err error) { params := []interface{}{ @@ -120,60 +92,12 @@ func (r Tag) GetAllTagTypes() (resp []datatypes.Tag_Type, err error) { return } -func (r Tag) GetAllTagTypesIter() (resp []datatypes.Tag_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Tag", "getAllTagTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Tag", "getAllTagTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get all tags with at least one reference attached to it for the current account. The total items header for this method contains the total number of attached tags even if a result limit is applied. func (r Tag) GetAttachedTagsForCurrentUser() (resp []datatypes.Tag, err error) { err = r.Session.DoRequest("SoftLayer_Tag", "getAttachedTagsForCurrentUser", nil, &r.Options, &resp) return } -func (r Tag) GetAttachedTagsForCurrentUserIter() (resp []datatypes.Tag, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Tag", "getAttachedTagsForCurrentUser", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Tag", "getAttachedTagsForCurrentUser", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Tag) GetObject() (resp datatypes.Tag, err error) { err = r.Session.DoRequest("SoftLayer_Tag", "getObject", nil, &r.Options, &resp) @@ -186,30 +110,6 @@ func (r Tag) GetReferences() (resp []datatypes.Tag_Reference, err error) { return } -func (r Tag) GetReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Tag", "getReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Tag", "getReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns the Tag object with a given name. The user types in the tag name and this method returns the tag with that name. func (r Tag) GetTagByTagName(tagList *string) (resp []datatypes.Tag, err error) { params := []interface{}{ @@ -219,63 +119,12 @@ func (r Tag) GetTagByTagName(tagList *string) (resp []datatypes.Tag, err error) return } -func (r Tag) GetTagByTagNameIter(tagList *string) (resp []datatypes.Tag, err error) { - params := []interface{}{ - tagList, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Tag", "getTagByTagName", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Tag", "getTagByTagName", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get all tags with no references attached to it for the current account. The total items header for this method contains the total number of unattached tags even if a result limit is applied. func (r Tag) GetUnattachedTagsForCurrentUser() (resp []datatypes.Tag, err error) { err = r.Session.DoRequest("SoftLayer_Tag", "getUnattachedTagsForCurrentUser", nil, &r.Options, &resp) return } -func (r Tag) GetUnattachedTagsForCurrentUserIter() (resp []datatypes.Tag, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Tag", "getUnattachedTagsForCurrentUser", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Tag", "getUnattachedTagsForCurrentUser", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Tag an object by passing in one or more tags separated by a comma. Tag references are cleared out every time this method is called. If your object is already tagged you will need to pass the current tags along with any new ones. To remove all tag references pass an empty string. To remove one or more tags omit them from the tag list. The characters permitted are A-Z, 0-9, whitespace, _ (underscore), - (hypen), . (period), and : (colon). All other characters will be stripped away. You must pass 3 string arguments into this method or you will receive an exception. func (r Tag) SetTags(tags *string, keyName *string, resourceTableId *int) (resp bool, err error) { params := []interface{}{ diff --git a/services/ticket.go b/services/ticket.go index 776eb91..8d5254c 100644 --- a/services/ticket.go +++ b/services/ticket.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -159,34 +158,6 @@ func (r Ticket) AddUpdate(templateObject *datatypes.Ticket_Update, attachedFiles return } -func (r Ticket) AddUpdateIter(templateObject *datatypes.Ticket_Update, attachedFiles []datatypes.Container_Utility_File_Attachment) (resp []datatypes.Ticket_Update, err error) { - params := []interface{}{ - templateObject, - attachedFiles, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "addUpdate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Update{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "addUpdate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Create an administrative support ticket. Use an administrative ticket if you require SoftLayer's assistance managing your server or content. If you are experiencing an issue with SoftLayer's hardware, network, or services then please open a standard support ticket. // // Support tickets may only be created in the open state. The SoftLayer API defaults new ticket properties ”userEditableFlag” to true, ”accountId” to the id of the account that your API user belongs to, and ”statusId” to 1001 (or "open"). You may not assign your new to ticket to users that your API user does not have access to. @@ -323,30 +294,6 @@ func (r Ticket) GetAllTicketGroups() (resp []datatypes.Ticket_Group, err error) return } -func (r Ticket) GetAllTicketGroupsIter() (resp []datatypes.Ticket_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAllTicketGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAllTicketGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getAllTicketStatuses() retrieves a list of all statuses that a ticket may exist in. Ticket status represent the current state of a ticket, usually "open", "assigned", and "closed". // // Every SoftLayer ticket has statusId and status properties that correspond to one of the statuses returned by getAllTicketStatuses(). @@ -355,60 +302,12 @@ func (r Ticket) GetAllTicketStatuses() (resp []datatypes.Ticket_Status, err erro return } -func (r Ticket) GetAllTicketStatusesIter() (resp []datatypes.Ticket_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAllTicketStatuses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAllTicketStatuses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Ticket) GetAssignedAgents() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAssignedAgents", nil, &r.Options, &resp) return } -func (r Ticket) GetAssignedAgentsIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAssignedAgents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAssignedAgents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The portal user that a ticket is assigned to. func (r Ticket) GetAssignedUser() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAssignedUser", nil, &r.Options, &resp) @@ -421,60 +320,12 @@ func (r Ticket) GetAttachedAdditionalEmails() (resp []datatypes.User_Customer_Ad return } -func (r Ticket) GetAttachedAdditionalEmailsIter() (resp []datatypes.User_Customer_AdditionalEmail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedAdditionalEmails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_AdditionalEmail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedAdditionalEmails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The Dedicated Hosts associated with a ticket. This is used in cases where a ticket is directly associated with one or more Dedicated Hosts. func (r Ticket) GetAttachedDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedDedicatedHosts", nil, &r.Options, &resp) return } -func (r Ticket) GetAttachedDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedDedicatedHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_DedicatedHost{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedDedicatedHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the file attached to a SoftLayer ticket by it's given identifier. To retrieve a list of files attached to a ticket either call the SoftLayer_Ticket::getAttachedFiles method or call SoftLayer_Ticket::getObject with ”attachedFiles” defined in an object mask. func (r Ticket) GetAttachedFile(attachmentId *int) (resp []byte, err error) { params := []interface{}{ @@ -490,60 +341,12 @@ func (r Ticket) GetAttachedFiles() (resp []datatypes.Ticket_Attachment_File, err return } -func (r Ticket) GetAttachedFilesIter() (resp []datatypes.Ticket_Attachment_File, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedFiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Attachment_File{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedFiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware associated with a ticket. This is used in cases where a ticket is directly associated with one or more pieces of hardware. func (r Ticket) GetAttachedHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedHardware", nil, &r.Options, &resp) return } -func (r Ticket) GetAttachedHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Ticket) GetAttachedHardwareCount() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedHardwareCount", nil, &r.Options, &resp) @@ -556,60 +359,12 @@ func (r Ticket) GetAttachedResources() (resp []datatypes.Ticket_Attachment, err return } -func (r Ticket) GetAttachedResourcesIter() (resp []datatypes.Ticket_Attachment, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedResources", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Attachment{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedResources", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The virtual guests associated with a ticket. This is used in cases where a ticket is directly associated with one or more virtualized guests installations or Virtual Servers. func (r Ticket) GetAttachedVirtualGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedVirtualGuests", nil, &r.Options, &resp) return } -func (r Ticket) GetAttachedVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getAttachedVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Ticket is waiting on a response from a customer flag. func (r Ticket) GetAwaitingUserResponseFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getAwaitingUserResponseFlag", nil, &r.Options, &resp) @@ -634,30 +389,6 @@ func (r Ticket) GetEmployeeAttachments() (resp []datatypes.User_Employee, err er return } -func (r Ticket) GetEmployeeAttachmentsIter() (resp []datatypes.User_Employee, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getEmployeeAttachments", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Employee{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getEmployeeAttachments", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A ticket's associated EU compliant record func (r Ticket) GetEuSupportedFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getEuSupportedFlag", nil, &r.Options, &resp) @@ -694,30 +425,6 @@ func (r Ticket) GetInvoiceItems() (resp []datatypes.Billing_Invoice_Item, err er return } -func (r Ticket) GetInvoiceItemsIter() (resp []datatypes.Billing_Invoice_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getInvoiceItems", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Invoice_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getInvoiceItems", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Ticket) GetLastActivity() (resp datatypes.Ticket_Activity, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getLastActivity", nil, &r.Options, &resp) @@ -760,30 +467,6 @@ func (r Ticket) GetScheduledActions() (resp []datatypes.Provisioning_Version1_Tr return } -func (r Ticket) GetScheduledActionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getScheduledActions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getScheduledActions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The invoice associated with a ticket. Only tickets with an associated administrative charge have an invoice. func (r Ticket) GetServerAdministrationBillingInvoice() (resp datatypes.Billing_Invoice, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getServerAdministrationBillingInvoice", nil, &r.Options, &resp) @@ -808,30 +491,6 @@ func (r Ticket) GetState() (resp []datatypes.Ticket_State, err error) { return } -func (r Ticket) GetStateIter() (resp []datatypes.Ticket_State, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getState", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_State{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getState", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A ticket's status. func (r Ticket) GetStatus() (resp datatypes.Ticket_Status, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getStatus", nil, &r.Options, &resp) @@ -850,30 +509,6 @@ func (r Ticket) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { return } -func (r Ticket) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve all tickets closed since a given date. func (r Ticket) GetTicketsClosedSinceDate(closeDate *datatypes.Time) (resp []datatypes.Ticket, err error) { params := []interface{}{ @@ -883,33 +518,6 @@ func (r Ticket) GetTicketsClosedSinceDate(closeDate *datatypes.Time) (resp []dat return } -func (r Ticket) GetTicketsClosedSinceDateIter(closeDate *datatypes.Time) (resp []datatypes.Ticket, err error) { - params := []interface{}{ - closeDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getTicketsClosedSinceDate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getTicketsClosedSinceDate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether employees' updates of this ticket could be rated by customer func (r Ticket) GetUpdateRatingFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Ticket", "getUpdateRatingFlag", nil, &r.Options, &resp) @@ -922,30 +530,6 @@ func (r Ticket) GetUpdates() (resp []datatypes.Ticket_Update, err error) { return } -func (r Ticket) GetUpdatesIter() (resp []datatypes.Ticket_Update, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket", "getUpdates", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Update{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket", "getUpdates", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Mark a ticket as viewed. All currently posted updates will be marked as viewed. The lastViewedDate property will be updated to the current time. func (r Ticket) MarkAsViewed() (err error) { var resp datatypes.Void @@ -1074,30 +658,6 @@ func (r Ticket_Attachment_File) GetExtensionWhitelist() (resp []string, err erro return } -func (r Ticket_Attachment_File) GetExtensionWhitelistIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File", "getExtensionWhitelist", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File", "getExtensionWhitelist", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Ticket_Attachment_File) GetObject() (resp datatypes.Ticket_Attachment_File, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File", "getObject", nil, &r.Options, &resp) @@ -1162,30 +722,6 @@ func (r Ticket_Attachment_File_ServiceNow) GetExtensionWhitelist() (resp []strin return } -func (r Ticket_Attachment_File_ServiceNow) GetExtensionWhitelistIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File_ServiceNow", "getExtensionWhitelist", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File_ServiceNow", "getExtensionWhitelist", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Ticket_Attachment_File_ServiceNow) GetObject() (resp datatypes.Ticket_Attachment_File_ServiceNow, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Attachment_File_ServiceNow", "getObject", nil, &r.Options, &resp) @@ -1250,30 +786,6 @@ func (r Ticket_Priority) GetPriorities() (resp []datatypes.Container_Ticket_Prio return } -func (r Ticket_Priority) GetPrioritiesIter() (resp []datatypes.Container_Ticket_Priority, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket_Priority", "getPriorities", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Ticket_Priority{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket_Priority", "getPriorities", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The SoftLayer_Ticket_Subject data type models one of the possible subjects that a standard support ticket may belong to. A basic support ticket's title matches it's corresponding subject's name. type Ticket_Subject struct { Session session.SLSession @@ -1320,30 +832,6 @@ func (r Ticket_Subject) GetAllObjects() (resp []datatypes.Ticket_Subject, err er return } -func (r Ticket_Subject) GetAllObjectsIter() (resp []datatypes.Ticket_Subject, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Subject{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Ticket_Subject) GetCategory() (resp datatypes.Ticket_Subject_Category, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getCategory", nil, &r.Options, &resp) @@ -1356,30 +844,6 @@ func (r Ticket_Subject) GetChildren() (resp []datatypes.Ticket_Subject, err erro return } -func (r Ticket_Subject) GetChildrenIter() (resp []datatypes.Ticket_Subject, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Subject{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Ticket_Subject) GetGroup() (resp datatypes.Ticket_Group, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getGroup", nil, &r.Options, &resp) @@ -1404,30 +868,6 @@ func (r Ticket_Subject) GetTopFiveKnowledgeLayerQuestions() (resp []datatypes.Co return } -func (r Ticket_Subject) GetTopFiveKnowledgeLayerQuestionsIter() (resp []datatypes.Container_KnowledgeLayer_QuestionAnswer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getTopFiveKnowledgeLayerQuestions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_KnowledgeLayer_QuestionAnswer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket_Subject", "getTopFiveKnowledgeLayerQuestions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // SoftLayer_Ticket_Subject_Category groups ticket subjects into logical group. type Ticket_Subject_Category struct { Session session.SLSession @@ -1474,30 +914,6 @@ func (r Ticket_Subject_Category) GetAllObjects() (resp []datatypes.Ticket_Subjec return } -func (r Ticket_Subject_Category) GetAllObjectsIter() (resp []datatypes.Ticket_Subject_Category, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Subject_Category{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Ticket_Subject_Category) GetObject() (resp datatypes.Ticket_Subject_Category, err error) { err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getObject", nil, &r.Options, &resp) @@ -1510,30 +926,6 @@ func (r Ticket_Subject_Category) GetSubjects() (resp []datatypes.Ticket_Subject, return } -func (r Ticket_Subject_Category) GetSubjectsIter() (resp []datatypes.Ticket_Subject, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getSubjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket_Subject{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Ticket_Subject_Category", "getSubjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet type Ticket_Survey struct { Session session.SLSession diff --git a/services/user.go b/services/user.go index 81b32bf..a411f49 100644 --- a/services/user.go +++ b/services/user.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -236,34 +235,6 @@ func (r User_Customer) ChangePreference(preferenceTypeKeyName *string, value *st return } -func (r User_Customer) ChangePreferenceIter(preferenceTypeKeyName *string, value *string) (resp []datatypes.User_Preference, err error) { - params := []interface{}{ - preferenceTypeKeyName, - value, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "changePreference", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "changePreference", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Create a new subscriber for a given resource. func (r User_Customer) CreateNotificationSubscriber(keyName *string, resourceTableId *int) (resp bool, err error) { params := []interface{}{ @@ -356,35 +327,6 @@ func (r User_Customer) FindUserPreference(profileName *string, containerKeyname return } -func (r User_Customer) FindUserPreferenceIter(profileName *string, containerKeyname *string, preferenceKeyname *string) (resp []datatypes.Layout_Profile, err error) { - params := []interface{}{ - profileName, - containerKeyname, - preferenceKeyname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "findUserPreference", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "findUserPreference", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The customer account that a user belongs to. func (r User_Customer) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAccount", nil, &r.Options, &resp) @@ -397,90 +339,18 @@ func (r User_Customer) GetActions() (resp []datatypes.User_Permission_Action, er return } -func (r User_Customer) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getActions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Action{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getActions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The getActiveExternalAuthenticationVendors method will return a list of available external vendors that a SoftLayer user can authenticate against. The list will only contain vendors for which the user has at least one active external binding. func (r User_Customer) GetActiveExternalAuthenticationVendors() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) return } -func (r User_Customer) GetActiveExternalAuthenticationVendorsIter() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_User_Customer_External_Binding_Vendor{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getActiveExternalAuthenticationVendors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's additional email addresses. These email addresses are contacted when updates are made to support tickets. func (r User_Customer) GetAdditionalEmails() (resp []datatypes.User_Customer_AdditionalEmail, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAdditionalEmails", nil, &r.Options, &resp) return } -func (r User_Customer) GetAdditionalEmailsIter() (resp []datatypes.User_Customer_AdditionalEmail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getAdditionalEmails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_AdditionalEmail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getAdditionalEmails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer) GetAgentImpersonationToken() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAgentImpersonationToken", nil, &r.Options, &resp) @@ -493,120 +363,24 @@ func (r User_Customer) GetAllowedDedicatedHostIds() (resp []int, err error) { return } -func (r User_Customer) GetAllowedDedicatedHostIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedDedicatedHostIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedDedicatedHostIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer) GetAllowedHardwareIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedHardwareIds", nil, &r.Options, &resp) return } -func (r User_Customer) GetAllowedHardwareIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedHardwareIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedHardwareIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer) GetAllowedVirtualGuestIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) return } -func (r User_Customer) GetAllowedVirtualGuestIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getAllowedVirtualGuestIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's API Authentication keys. There is a max limit of one API key per user. func (r User_Customer) GetApiAuthenticationKeys() (resp []datatypes.User_Customer_ApiAuthentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getApiAuthenticationKeys", nil, &r.Options, &resp) return } -func (r User_Customer) GetApiAuthenticationKeysIter() (resp []datatypes.User_Customer_ApiAuthentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getApiAuthenticationKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_ApiAuthentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getApiAuthenticationKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method generate user authentication token and return [[SoftLayer_Container_User_Authentication_Token]] object which will be used to authenticate user to login to SoftLayer customer portal. func (r User_Customer) GetAuthenticationToken(token *datatypes.Container_User_Authentication_Token) (resp datatypes.Container_User_Authentication_Token, err error) { params := []interface{}{ @@ -622,90 +396,18 @@ func (r User_Customer) GetChildUsers() (resp []datatypes.User_Customer, err erro return } -func (r User_Customer) GetChildUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getChildUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getChildUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An user's associated closed tickets. func (r User_Customer) GetClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getClosedTickets", nil, &r.Options, &resp) return } -func (r User_Customer) GetClosedTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getClosedTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getClosedTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The dedicated hosts to which the user has been granted access. func (r User_Customer) GetDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getDedicatedHosts", nil, &r.Options, &resp) return } -func (r User_Customer) GetDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getDedicatedHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_DedicatedHost{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getDedicatedHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method is not applicable to legacy SoftLayer-authenticated users and can only be invoked for IBMid-authenticated users. func (r User_Customer) GetDefaultAccount(providerType *string) (resp datatypes.Account, err error) { params := []interface{}{ @@ -721,60 +423,12 @@ func (r User_Customer) GetExternalBindings() (resp []datatypes.User_External_Bin return } -func (r User_Customer) GetExternalBindingsIter() (resp []datatypes.User_External_Binding, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getExternalBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getExternalBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's accessible hardware. These permissions control which hardware a user has access to in the SoftLayer customer portal. func (r User_Customer) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardware", nil, &r.Options, &resp) return } -func (r User_Customer) GetHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the number of servers that a portal user has access to. Portal users can have restrictions set to limit services for and to perform actions on hardware. You can set these permissions in the portal by clicking the "administrative" then "user admin" links. func (r User_Customer) GetHardwareCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardwareCount", nil, &r.Options, &resp) @@ -787,30 +441,6 @@ func (r User_Customer) GetHardwareNotifications() (resp []datatypes.User_Custome return } -func (r User_Customer) GetHardwareNotificationsIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardwareNotifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getHardwareNotifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user has acknowledged the support policy. func (r User_Customer) GetHasAcknowledgedSupportPolicyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getHasAcknowledgedSupportPolicyFlag", nil, &r.Options, &resp) @@ -853,30 +483,6 @@ func (r User_Customer) GetLayoutProfiles() (resp []datatypes.Layout_Profile, err return } -func (r User_Customer) GetLayoutProfilesIter() (resp []datatypes.Layout_Profile, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getLayoutProfiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getLayoutProfiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's locale. Locale holds user's language and region information. func (r User_Customer) GetLocale() (resp datatypes.Locale, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getLocale", nil, &r.Options, &resp) @@ -889,30 +495,6 @@ func (r User_Customer) GetLoginAttempts() (resp []datatypes.User_Customer_Access return } -func (r User_Customer) GetLoginAttemptsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getLoginAttempts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getLoginAttempts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Attempt to authenticate a user to the SoftLayer customer portal using the provided authentication container. Depending on the specific type of authentication container that is used, this API will leverage the appropriate authentication protocol. If authentication is successful then the API returns a list of linked accounts for the user, a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer) GetLoginToken(request *datatypes.Container_Authentication_Request_Contract) (resp datatypes.Container_Authentication_Response_Common, err error) { params := []interface{}{ @@ -931,63 +513,12 @@ func (r User_Customer) GetMappedAccounts(providerType *string) (resp []datatypes return } -func (r User_Customer) GetMappedAccountsIter(providerType *string) (resp []datatypes.Account, err error) { - params := []interface{}{ - providerType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getMappedAccounts", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getMappedAccounts", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Notification subscription records for the user. func (r User_Customer) GetNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getNotificationSubscribers", nil, &r.Options, &resp) return } -func (r User_Customer) GetNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getNotificationSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getNotificationSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_User_Customer object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_User_Customer service. You can only retrieve users that are assigned to the customer account belonging to the user making the API call. func (r User_Customer) GetObject() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getObject", nil, &r.Options, &resp) @@ -1006,60 +537,12 @@ func (r User_Customer) GetOpenTickets() (resp []datatypes.Ticket, err error) { return } -func (r User_Customer) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getOpenTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getOpenTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's vpn accessible subnets. func (r User_Customer) GetOverrides() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getOverrides", nil, &r.Options, &resp) return } -func (r User_Customer) GetOverridesIter() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getOverrides", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Service_Vpn_Overrides{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getOverrides", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's parent user. If a SoftLayer_User_Customer has a null parentId property then it doesn't have a parent user. func (r User_Customer) GetParent() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getParent", nil, &r.Options, &resp) @@ -1081,30 +564,6 @@ func (r User_Customer) GetPermissions() (resp []datatypes.User_Customer_Customer return } -func (r User_Customer) GetPermissionsIter() (resp []datatypes.User_Customer_CustomerPermission_Permission, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getPermissions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_CustomerPermission_Permission{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getPermissions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Attempt to authenticate a username and password to the SoftLayer customer portal. Many portal user accounts are configured to require answering a security question on login. In this case getPortalLoginToken() also verifies the given security question ID and answer. If authentication is successful then the API returns a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer) GetPortalLoginToken(username *string, password *string, securityQuestionId *int, securityQuestionAnswer *string) (resp datatypes.Container_User_Customer_Portal_Token, err error) { params := []interface{}{ @@ -1132,60 +591,12 @@ func (r User_Customer) GetPreferenceTypes() (resp []datatypes.User_Preference_Ty return } -func (r User_Customer) GetPreferenceTypesIter() (resp []datatypes.User_Preference_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferenceTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferenceTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Data type contains a single user preference to a specific preference type. func (r User_Customer) GetPreferences() (resp []datatypes.User_Preference, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferences", nil, &r.Options, &resp) return } -func (r User_Customer) GetPreferencesIter() (resp []datatypes.User_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the authentication requirements for an outstanding password set/reset request. The requirements returned in the same SoftLayer_Container_User_Customer_PasswordSet container which is provided as a parameter into this request. The SoftLayer_Container_User_Customer_PasswordSet::authenticationMethods array will contain an entry for each authentication method required for the user. See SoftLayer_Container_User_Customer_PasswordSet for more details. // // If the user has required authentication methods, then authentication information will be supplied to the SoftLayer_User_Customer::processPasswordSetRequest method within this same SoftLayer_Container_User_Customer_PasswordSet container. All existing information in the container must continue to exist in the container to complete the password set/reset process. @@ -1203,120 +614,24 @@ func (r User_Customer) GetRoles() (resp []datatypes.User_Permission_Role, err er return } -func (r User_Customer) GetRolesIter() (resp []datatypes.User_Permission_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's security question answers. Some portal users may not have security answers or may not be configured to require answering a security question on login. func (r User_Customer) GetSecurityAnswers() (resp []datatypes.User_Customer_Security_Answer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSecurityAnswers", nil, &r.Options, &resp) return } -func (r User_Customer) GetSecurityAnswersIter() (resp []datatypes.User_Customer_Security_Answer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSecurityAnswers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Security_Answer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSecurityAnswers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's notification subscription records. func (r User_Customer) GetSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSubscribers", nil, &r.Options, &resp) return } -func (r User_Customer) GetSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's successful attempts to log into the SoftLayer customer portal. func (r User_Customer) GetSuccessfulLogins() (resp []datatypes.User_Customer_Access_Authentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSuccessfulLogins", nil, &r.Options, &resp) return } -func (r User_Customer) GetSuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSuccessfulLogins", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSuccessfulLogins", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user is required to acknowledge the support policy for portal access. func (r User_Customer) GetSupportPolicyAcknowledgementRequiredFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSupportPolicyAcknowledgementRequiredFlag", nil, &r.Options, &resp) @@ -1341,30 +656,6 @@ func (r User_Customer) GetSupportedLocales() (resp []datatypes.Locale, err error return } -func (r User_Customer) GetSupportedLocalesIter() (resp []datatypes.Locale, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSupportedLocales", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Locale{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSupportedLocales", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user must take a brief survey the next time they log into the SoftLayer customer portal. func (r User_Customer) GetSurveyRequiredFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getSurveyRequiredFlag", nil, &r.Options, &resp) @@ -1377,60 +668,12 @@ func (r User_Customer) GetSurveys() (resp []datatypes.Survey, err error) { return } -func (r User_Customer) GetSurveysIter() (resp []datatypes.Survey, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSurveys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Survey{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getSurveys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An user's associated tickets. func (r User_Customer) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getTickets", nil, &r.Options, &resp) return } -func (r User_Customer) GetTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's time zone. func (r User_Customer) GetTimezone() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getTimezone", nil, &r.Options, &resp) @@ -1443,30 +686,6 @@ func (r User_Customer) GetUnsuccessfulLogins() (resp []datatypes.User_Customer_A return } -func (r User_Customer) GetUnsuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getUnsuccessfulLogins", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getUnsuccessfulLogins", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a user id using a password token provided to the user in an email generated by the SoftLayer_User_Customer::initiatePortalPasswordChange request. Password recovery keys are valid for 24 hours after they're generated. // // When a new user is created or when a user has requested a password change using initiatePortalPasswordChange, they will have received an email that contains a url with a token. That token is used as the parameter for getUserIdForPasswordSet. Once the user id is known, then the SoftLayer_User_Customer object can be retrieved which is necessary to complete the process to set or reset a user's password. @@ -1484,30 +703,6 @@ func (r User_Customer) GetUserLinks() (resp []datatypes.User_Customer_Link, err return } -func (r User_Customer) GetUserLinksIter() (resp []datatypes.User_Customer_Link, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserLinks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Link{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserLinks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer) GetUserPreferences(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { params := []interface{}{ @@ -1518,34 +713,6 @@ func (r User_Customer) GetUserPreferences(profileName *string, containerKeyname return } -func (r User_Customer) GetUserPreferencesIter(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { - params := []interface{}{ - profileName, - containerKeyname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserPreferences", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserPreferences", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's status, which controls overall access to the SoftLayer customer portal and VPN access to the private network. func (r User_Customer) GetUserStatus() (resp datatypes.User_Customer_Status, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "getUserStatus", nil, &r.Options, &resp) @@ -1564,30 +731,6 @@ func (r User_Customer) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err e return } -func (r User_Customer) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer) InTerminalStatus() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer", "inTerminalStatus", nil, &r.Options, &resp) @@ -2124,30 +1267,6 @@ func (r User_Customer_CustomerPermission_Permission) GetAllObjects() (resp []dat return } -func (r User_Customer_CustomerPermission_Permission) GetAllObjectsIter() (resp []datatypes.User_Customer_CustomerPermission_Permission, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_CustomerPermission_Permission", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_CustomerPermission_Permission{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_CustomerPermission_Permission", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_User_Customer_CustomerPermission_Permission object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_User_Customer_CustomerPermission_Permission service. func (r User_Customer_CustomerPermission_Permission) GetObject() (resp datatypes.User_Customer_CustomerPermission_Permission, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_CustomerPermission_Permission", "getObject", nil, &r.Options, &resp) @@ -2229,30 +1348,6 @@ func (r User_Customer_External_Binding) GetAttributes() (resp []datatypes.User_E return } -func (r User_Customer_External_Binding) GetAttributesIter() (resp []datatypes.User_External_Binding_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the billing item for external authentication. func (r User_Customer_External_Binding) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding", "getBillingItem", nil, &r.Options, &resp) @@ -2399,30 +1494,6 @@ func (r User_Customer_External_Binding_Totp) GetAttributes() (resp []datatypes.U return } -func (r User_Customer_External_Binding_Totp) GetAttributesIter() (resp []datatypes.User_External_Binding_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Totp", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Totp", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the billing item for external authentication. func (r User_Customer_External_Binding_Totp) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Totp", "getBillingItem", nil, &r.Options, &resp) @@ -2514,30 +1585,6 @@ func (r User_Customer_External_Binding_Vendor) GetAllObjects() (resp []datatypes return } -func (r User_Customer_External_Binding_Vendor) GetAllObjectsIter() (resp []datatypes.User_External_Binding_Vendor, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Vendor", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding_Vendor{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Vendor", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_External_Binding_Vendor) GetObject() (resp datatypes.User_Customer_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Vendor", "getObject", nil, &r.Options, &resp) @@ -2638,30 +1685,6 @@ func (r User_Customer_External_Binding_Verisign) GetAttributes() (resp []datatyp return } -func (r User_Customer_External_Binding_Verisign) GetAttributesIter() (resp []datatypes.User_External_Binding_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Verisign", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Verisign", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the billing item for external authentication. func (r User_Customer_External_Binding_Verisign) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_External_Binding_Verisign", "getBillingItem", nil, &r.Options, &resp) @@ -2860,33 +1883,6 @@ func (r User_Customer_Notification_Hardware) CreateObjects(templateObjects []dat return } -func (r User_Customer_Notification_Hardware) CreateObjectsIter(templateObjects []datatypes.User_Customer_Notification_Hardware) (resp []datatypes.User_Customer_Notification_Hardware, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Like any other API object, the customer notification objects can be deleted by passing an instance of them into this function. The ID on the object must be set. func (r User_Customer_Notification_Hardware) DeleteObjects(templateObjects []datatypes.User_Customer_Notification_Hardware) (resp bool, err error) { params := []interface{}{ @@ -2907,33 +1903,6 @@ func (r User_Customer_Notification_Hardware) FindByHardwareId(hardwareId *int) ( return } -func (r User_Customer_Notification_Hardware) FindByHardwareIdIter(hardwareId *int) (resp []datatypes.User_Customer_Notification_Hardware, err error) { - params := []interface{}{ - hardwareId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "findByHardwareId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "findByHardwareId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The hardware object that will be monitored. func (r User_Customer_Notification_Hardware) GetHardware() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Hardware", "getHardware", nil, &r.Options, &resp) @@ -3010,33 +1979,6 @@ func (r User_Customer_Notification_Virtual_Guest) CreateObjects(templateObjects return } -func (r User_Customer_Notification_Virtual_Guest) CreateObjectsIter(templateObjects []datatypes.User_Customer_Notification_Virtual_Guest) (resp []datatypes.User_Customer_Notification_Virtual_Guest, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Like any other API object, the customer notification objects can be deleted by passing an instance of them into this function. The ID on the object must be set. func (r User_Customer_Notification_Virtual_Guest) DeleteObjects(templateObjects []datatypes.User_Customer_Notification_Virtual_Guest) (resp bool, err error) { params := []interface{}{ @@ -3057,33 +1999,6 @@ func (r User_Customer_Notification_Virtual_Guest) FindByGuestId(id *int) (resp [ return } -func (r User_Customer_Notification_Virtual_Guest) FindByGuestIdIter(id *int) (resp []datatypes.User_Customer_Notification_Virtual_Guest, err error) { - params := []interface{}{ - id, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "findByGuestId", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "findByGuestId", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The virtual guest object that will be monitored. func (r User_Customer_Notification_Virtual_Guest) GetGuest() (resp datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_Notification_Virtual_Guest", "getGuest", nil, &r.Options, &resp) @@ -3327,34 +2242,6 @@ func (r User_Customer_OpenIdConnect) ChangePreference(preferenceTypeKeyName *str return } -func (r User_Customer_OpenIdConnect) ChangePreferenceIter(preferenceTypeKeyName *string, value *string) (resp []datatypes.User_Preference, err error) { - params := []interface{}{ - preferenceTypeKeyName, - value, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "changePreference", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "changePreference", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect) CompleteInvitationAfterLogin(providerType *string, accessToken *string, emailRegistrationCode *string) (err error) { var resp datatypes.Void @@ -3483,35 +2370,6 @@ func (r User_Customer_OpenIdConnect) FindUserPreference(profileName *string, con return } -func (r User_Customer_OpenIdConnect) FindUserPreferenceIter(profileName *string, containerKeyname *string, preferenceKeyname *string) (resp []datatypes.Layout_Profile, err error) { - params := []interface{}{ - profileName, - containerKeyname, - preferenceKeyname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "findUserPreference", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "findUserPreference", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The customer account that a user belongs to. func (r User_Customer_OpenIdConnect) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAccount", nil, &r.Options, &resp) @@ -3524,90 +2382,18 @@ func (r User_Customer_OpenIdConnect) GetActions() (resp []datatypes.User_Permiss return } -func (r User_Customer_OpenIdConnect) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Action{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The getActiveExternalAuthenticationVendors method will return a list of available external vendors that a SoftLayer user can authenticate against. The list will only contain vendors for which the user has at least one active external binding. func (r User_Customer_OpenIdConnect) GetActiveExternalAuthenticationVendors() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetActiveExternalAuthenticationVendorsIter() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_User_Customer_External_Binding_Vendor{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getActiveExternalAuthenticationVendors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's additional email addresses. These email addresses are contacted when updates are made to support tickets. func (r User_Customer_OpenIdConnect) GetAdditionalEmails() (resp []datatypes.User_Customer_AdditionalEmail, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAdditionalEmails", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetAdditionalEmailsIter() (resp []datatypes.User_Customer_AdditionalEmail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAdditionalEmails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_AdditionalEmail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAdditionalEmails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect) GetAgentImpersonationToken() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAgentImpersonationToken", nil, &r.Options, &resp) @@ -3620,120 +2406,24 @@ func (r User_Customer_OpenIdConnect) GetAllowedDedicatedHostIds() (resp []int, e return } -func (r User_Customer_OpenIdConnect) GetAllowedDedicatedHostIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedDedicatedHostIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedDedicatedHostIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect) GetAllowedHardwareIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedHardwareIds", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetAllowedHardwareIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedHardwareIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedHardwareIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect) GetAllowedVirtualGuestIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetAllowedVirtualGuestIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getAllowedVirtualGuestIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's API Authentication keys. There is a max limit of one API key per user. func (r User_Customer_OpenIdConnect) GetApiAuthenticationKeys() (resp []datatypes.User_Customer_ApiAuthentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getApiAuthenticationKeys", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetApiAuthenticationKeysIter() (resp []datatypes.User_Customer_ApiAuthentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getApiAuthenticationKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_ApiAuthentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getApiAuthenticationKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method generate user authentication token and return [[SoftLayer_Container_User_Authentication_Token]] object which will be used to authenticate user to login to SoftLayer customer portal. func (r User_Customer_OpenIdConnect) GetAuthenticationToken(token *datatypes.Container_User_Authentication_Token) (resp datatypes.Container_User_Authentication_Token, err error) { params := []interface{}{ @@ -3749,90 +2439,18 @@ func (r User_Customer_OpenIdConnect) GetChildUsers() (resp []datatypes.User_Cust return } -func (r User_Customer_OpenIdConnect) GetChildUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getChildUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getChildUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An user's associated closed tickets. func (r User_Customer_OpenIdConnect) GetClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getClosedTickets", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetClosedTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getClosedTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getClosedTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The dedicated hosts to which the user has been granted access. func (r User_Customer_OpenIdConnect) GetDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getDedicatedHosts", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getDedicatedHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_DedicatedHost{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getDedicatedHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This API gets the account associated with the default user for the OpenIdConnect identity that is linked to the current active SoftLayer user identity. When a single active user is found for that IAMid, it becomes the default user and the associated account is returned. When multiple default users are found only the first is preserved and the associated account is returned (remaining defaults see their default flag unset). If the current SoftLayer user identity isn't linked to any OpenIdConnect identity, or if none of the linked users were found as defaults, the API returns null. Invoke this only on IAMid-authenticated users. func (r User_Customer_OpenIdConnect) GetDefaultAccount(providerType *string) (resp datatypes.Account, err error) { params := []interface{}{ @@ -3848,60 +2466,12 @@ func (r User_Customer_OpenIdConnect) GetExternalBindings() (resp []datatypes.Use return } -func (r User_Customer_OpenIdConnect) GetExternalBindingsIter() (resp []datatypes.User_External_Binding, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getExternalBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getExternalBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's accessible hardware. These permissions control which hardware a user has access to in the SoftLayer customer portal. func (r User_Customer_OpenIdConnect) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardware", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the number of servers that a portal user has access to. Portal users can have restrictions set to limit services for and to perform actions on hardware. You can set these permissions in the portal by clicking the "administrative" then "user admin" links. func (r User_Customer_OpenIdConnect) GetHardwareCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardwareCount", nil, &r.Options, &resp) @@ -3914,30 +2484,6 @@ func (r User_Customer_OpenIdConnect) GetHardwareNotifications() (resp []datatype return } -func (r User_Customer_OpenIdConnect) GetHardwareNotificationsIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardwareNotifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHardwareNotifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user has acknowledged the support policy. func (r User_Customer_OpenIdConnect) GetHasAcknowledgedSupportPolicyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getHasAcknowledgedSupportPolicyFlag", nil, &r.Options, &resp) @@ -3980,30 +2526,6 @@ func (r User_Customer_OpenIdConnect) GetLayoutProfiles() (resp []datatypes.Layou return } -func (r User_Customer_OpenIdConnect) GetLayoutProfilesIter() (resp []datatypes.Layout_Profile, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLayoutProfiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLayoutProfiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's locale. Locale holds user's language and region information. func (r User_Customer_OpenIdConnect) GetLocale() (resp datatypes.Locale, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLocale", nil, &r.Options, &resp) @@ -4026,30 +2548,6 @@ func (r User_Customer_OpenIdConnect) GetLoginAttempts() (resp []datatypes.User_C return } -func (r User_Customer_OpenIdConnect) GetLoginAttemptsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLoginAttempts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getLoginAttempts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Attempt to authenticate a user to the SoftLayer customer portal using the provided authentication container. Depending on the specific type of authentication container that is used, this API will leverage the appropriate authentication protocol. If authentication is successful then the API returns a list of linked accounts for the user, a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer_OpenIdConnect) GetLoginToken(request *datatypes.Container_Authentication_Request_Contract) (resp datatypes.Container_Authentication_Response_Common, err error) { params := []interface{}{ @@ -4068,63 +2566,12 @@ func (r User_Customer_OpenIdConnect) GetMappedAccounts(providerType *string) (re return } -func (r User_Customer_OpenIdConnect) GetMappedAccountsIter(providerType *string) (resp []datatypes.Account, err error) { - params := []interface{}{ - providerType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getMappedAccounts", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getMappedAccounts", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Notification subscription records for the user. func (r User_Customer_OpenIdConnect) GetNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getNotificationSubscribers", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getNotificationSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getNotificationSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect) GetObject() (resp datatypes.User_Customer_OpenIdConnect, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getObject", nil, &r.Options, &resp) @@ -4153,60 +2600,12 @@ func (r User_Customer_OpenIdConnect) GetOpenTickets() (resp []datatypes.Ticket, return } -func (r User_Customer_OpenIdConnect) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOpenTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOpenTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's vpn accessible subnets. func (r User_Customer_OpenIdConnect) GetOverrides() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOverrides", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetOverridesIter() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOverrides", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Service_Vpn_Overrides{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getOverrides", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's parent user. If a SoftLayer_User_Customer has a null parentId property then it doesn't have a parent user. func (r User_Customer_OpenIdConnect) GetParent() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getParent", nil, &r.Options, &resp) @@ -4228,30 +2627,6 @@ func (r User_Customer_OpenIdConnect) GetPermissions() (resp []datatypes.User_Cus return } -func (r User_Customer_OpenIdConnect) GetPermissionsIter() (resp []datatypes.User_Customer_CustomerPermission_Permission, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPermissions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_CustomerPermission_Permission{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPermissions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Attempt to authenticate a username and password to the SoftLayer customer portal. Many portal user accounts are configured to require answering a security question on login. In this case getPortalLoginToken() also verifies the given security question ID and answer. If authentication is successful then the API returns a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer_OpenIdConnect) GetPortalLoginToken(username *string, password *string, securityQuestionId *int, securityQuestionAnswer *string) (resp datatypes.Container_User_Customer_Portal_Token, err error) { params := []interface{}{ @@ -4293,60 +2668,12 @@ func (r User_Customer_OpenIdConnect) GetPreferenceTypes() (resp []datatypes.User return } -func (r User_Customer_OpenIdConnect) GetPreferenceTypesIter() (resp []datatypes.User_Preference_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferenceTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferenceTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Data type contains a single user preference to a specific preference type. func (r User_Customer_OpenIdConnect) GetPreferences() (resp []datatypes.User_Preference, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferences", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetPreferencesIter() (resp []datatypes.User_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the authentication requirements for an outstanding password set/reset request. The requirements returned in the same SoftLayer_Container_User_Customer_PasswordSet container which is provided as a parameter into this request. The SoftLayer_Container_User_Customer_PasswordSet::authenticationMethods array will contain an entry for each authentication method required for the user. See SoftLayer_Container_User_Customer_PasswordSet for more details. // // If the user has required authentication methods, then authentication information will be supplied to the SoftLayer_User_Customer::processPasswordSetRequest method within this same SoftLayer_Container_User_Customer_PasswordSet container. All existing information in the container must continue to exist in the container to complete the password set/reset process. @@ -4364,120 +2691,24 @@ func (r User_Customer_OpenIdConnect) GetRoles() (resp []datatypes.User_Permissio return } -func (r User_Customer_OpenIdConnect) GetRolesIter() (resp []datatypes.User_Permission_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's security question answers. Some portal users may not have security answers or may not be configured to require answering a security question on login. func (r User_Customer_OpenIdConnect) GetSecurityAnswers() (resp []datatypes.User_Customer_Security_Answer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSecurityAnswers", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetSecurityAnswersIter() (resp []datatypes.User_Customer_Security_Answer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSecurityAnswers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Security_Answer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSecurityAnswers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's notification subscription records. func (r User_Customer_OpenIdConnect) GetSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSubscribers", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's successful attempts to log into the SoftLayer customer portal. func (r User_Customer_OpenIdConnect) GetSuccessfulLogins() (resp []datatypes.User_Customer_Access_Authentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSuccessfulLogins", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetSuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSuccessfulLogins", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSuccessfulLogins", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user is required to acknowledge the support policy for portal access. func (r User_Customer_OpenIdConnect) GetSupportPolicyAcknowledgementRequiredFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSupportPolicyAcknowledgementRequiredFlag", nil, &r.Options, &resp) @@ -4502,30 +2733,6 @@ func (r User_Customer_OpenIdConnect) GetSupportedLocales() (resp []datatypes.Loc return } -func (r User_Customer_OpenIdConnect) GetSupportedLocalesIter() (resp []datatypes.Locale, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSupportedLocales", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Locale{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSupportedLocales", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user must take a brief survey the next time they log into the SoftLayer customer portal. func (r User_Customer_OpenIdConnect) GetSurveyRequiredFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSurveyRequiredFlag", nil, &r.Options, &resp) @@ -4538,60 +2745,12 @@ func (r User_Customer_OpenIdConnect) GetSurveys() (resp []datatypes.Survey, err return } -func (r User_Customer_OpenIdConnect) GetSurveysIter() (resp []datatypes.Survey, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSurveys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Survey{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getSurveys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An user's associated tickets. func (r User_Customer_OpenIdConnect) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getTickets", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect) GetTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's time zone. func (r User_Customer_OpenIdConnect) GetTimezone() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getTimezone", nil, &r.Options, &resp) @@ -4604,30 +2763,6 @@ func (r User_Customer_OpenIdConnect) GetUnsuccessfulLogins() (resp []datatypes.U return } -func (r User_Customer_OpenIdConnect) GetUnsuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUnsuccessfulLogins", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUnsuccessfulLogins", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns an IMS User Object from the provided OpenIdConnect User ID or IBMid Unique Identifier for the Account of the active user. Enforces the User Management permissions for the Active User. An exception will be thrown if no matching IMS User is found. NOTE that providing IBMid Unique Identifier is optional, but it will be preferred over OpenIdConnect User ID if provided. func (r User_Customer_OpenIdConnect) GetUserForUnifiedInvitation(openIdConnectUserId *string, uniqueIdentifier *string, searchInvitationsNotLinksFlag *string, accountId *string) (resp datatypes.User_Customer_OpenIdConnect, err error) { params := []interface{}{ @@ -4657,30 +2792,6 @@ func (r User_Customer_OpenIdConnect) GetUserLinks() (resp []datatypes.User_Custo return } -func (r User_Customer_OpenIdConnect) GetUserLinksIter() (resp []datatypes.User_Customer_Link, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserLinks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Link{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserLinks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect) GetUserPreferences(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { params := []interface{}{ @@ -4691,34 +2802,6 @@ func (r User_Customer_OpenIdConnect) GetUserPreferences(profileName *string, con return } -func (r User_Customer_OpenIdConnect) GetUserPreferencesIter(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { - params := []interface{}{ - profileName, - containerKeyname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserPreferences", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserPreferences", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's status, which controls overall access to the SoftLayer customer portal and VPN access to the private network. func (r User_Customer_OpenIdConnect) GetUserStatus() (resp datatypes.User_Customer_Status, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getUserStatus", nil, &r.Options, &resp) @@ -4737,30 +2820,6 @@ func (r User_Customer_OpenIdConnect) GetVirtualGuests() (resp []datatypes.Virtua return } -func (r User_Customer_OpenIdConnect) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect) InTerminalStatus() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "inTerminalStatus", nil, &r.Options, &resp) @@ -5414,34 +3473,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) ChangePreference(preferenceT return } -func (r User_Customer_OpenIdConnect_TrustedProfile) ChangePreferenceIter(preferenceTypeKeyName *string, value *string) (resp []datatypes.User_Preference, err error) { - params := []interface{}{ - preferenceTypeKeyName, - value, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "changePreference", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "changePreference", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) CompleteInvitationAfterLogin(providerType *string, accessToken *string, emailRegistrationCode *string) (err error) { var resp datatypes.Void @@ -5548,35 +3579,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) FindUserPreference(profileNa return } -func (r User_Customer_OpenIdConnect_TrustedProfile) FindUserPreferenceIter(profileName *string, containerKeyname *string, preferenceKeyname *string) (resp []datatypes.Layout_Profile, err error) { - params := []interface{}{ - profileName, - containerKeyname, - preferenceKeyname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "findUserPreference", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "findUserPreference", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The customer account that a user belongs to. func (r User_Customer_OpenIdConnect_TrustedProfile) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAccount", nil, &r.Options, &resp) @@ -5589,123 +3591,27 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetActions() (resp []datatyp return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Action{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // The getActiveExternalAuthenticationVendors method will return a list of available external vendors that a SoftLayer user can authenticate against. The list will only contain vendors for which the user has at least one active external binding. func (r User_Customer_OpenIdConnect_TrustedProfile) GetActiveExternalAuthenticationVendors() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetActiveExternalAuthenticationVendorsIter() (resp []datatypes.Container_User_Customer_External_Binding_Vendor, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActiveExternalAuthenticationVendors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_User_Customer_External_Binding_Vendor{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getActiveExternalAuthenticationVendors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's additional email addresses. These email addresses are contacted when updates are made to support tickets. func (r User_Customer_OpenIdConnect_TrustedProfile) GetAdditionalEmails() (resp []datatypes.User_Customer_AdditionalEmail, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAdditionalEmails", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetAdditionalEmailsIter() (resp []datatypes.User_Customer_AdditionalEmail, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAdditionalEmails", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_AdditionalEmail{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAdditionalEmails", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) GetAgentImpersonationToken() (resp string, err error) { - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAgentImpersonationToken", nil, &r.Options, &resp) - return -} - -// no documentation yet -func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedDedicatedHostIds() (resp []int, err error) { - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedDedicatedHostIds", nil, &r.Options, &resp) + err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAgentImpersonationToken", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedDedicatedHostIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() +// no documentation yet +func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedDedicatedHostIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedDedicatedHostIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedDedicatedHostIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -5715,90 +3621,18 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedHardwareIds() (res return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedHardwareIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedHardwareIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedHardwareIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedVirtualGuestIds() (resp []int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetAllowedVirtualGuestIdsIter() (resp []int, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedVirtualGuestIds", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []int{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getAllowedVirtualGuestIds", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's API Authentication keys. There is a max limit of one API key per user. func (r User_Customer_OpenIdConnect_TrustedProfile) GetApiAuthenticationKeys() (resp []datatypes.User_Customer_ApiAuthentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getApiAuthenticationKeys", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetApiAuthenticationKeysIter() (resp []datatypes.User_Customer_ApiAuthentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getApiAuthenticationKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_ApiAuthentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getApiAuthenticationKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method generate user authentication token and return [[SoftLayer_Container_User_Authentication_Token]] object which will be used to authenticate user to login to SoftLayer customer portal. func (r User_Customer_OpenIdConnect_TrustedProfile) GetAuthenticationToken(token *datatypes.Container_User_Authentication_Token) (resp datatypes.Container_User_Authentication_Token, err error) { params := []interface{}{ @@ -5814,90 +3648,18 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetChildUsers() (resp []data return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetChildUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getChildUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getChildUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An user's associated closed tickets. func (r User_Customer_OpenIdConnect_TrustedProfile) GetClosedTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getClosedTickets", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetClosedTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getClosedTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getClosedTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The dedicated hosts to which the user has been granted access. func (r User_Customer_OpenIdConnect_TrustedProfile) GetDedicatedHosts() (resp []datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getDedicatedHosts", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetDedicatedHostsIter() (resp []datatypes.Virtual_DedicatedHost, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getDedicatedHosts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_DedicatedHost{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getDedicatedHosts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This API gets the account associated with the default user for the OpenIdConnect identity that is linked to the current active SoftLayer user identity. When a single active user is found for that IAMid, it becomes the default user and the associated account is returned. When multiple default users are found only the first is preserved and the associated account is returned (remaining defaults see their default flag unset). If the current SoftLayer user identity isn't linked to any OpenIdConnect identity, or if none of the linked users were found as defaults, the API returns null. Invoke this only on IAMid-authenticated users. func (r User_Customer_OpenIdConnect_TrustedProfile) GetDefaultAccount(providerType *string) (resp datatypes.Account, err error) { params := []interface{}{ @@ -5913,60 +3675,12 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetExternalBindings() (resp return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetExternalBindingsIter() (resp []datatypes.User_External_Binding, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getExternalBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getExternalBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's accessible hardware. These permissions control which hardware a user has access to in the SoftLayer customer portal. func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardware() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardware", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardwareIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardware", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardware", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the number of servers that a portal user has access to. Portal users can have restrictions set to limit services for and to perform actions on hardware. You can set these permissions in the portal by clicking the "administrative" then "user admin" links. func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardwareCount() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardwareCount", nil, &r.Options, &resp) @@ -5979,30 +3693,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardwareNotifications() ( return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetHardwareNotificationsIter() (resp []datatypes.User_Customer_Notification_Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardwareNotifications", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHardwareNotifications", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user has acknowledged the support policy. func (r User_Customer_OpenIdConnect_TrustedProfile) GetHasAcknowledgedSupportPolicyFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getHasAcknowledgedSupportPolicyFlag", nil, &r.Options, &resp) @@ -6045,30 +3735,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetLayoutProfiles() (resp [] return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetLayoutProfilesIter() (resp []datatypes.Layout_Profile, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLayoutProfiles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLayoutProfiles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's locale. Locale holds user's language and region information. func (r User_Customer_OpenIdConnect_TrustedProfile) GetLocale() (resp datatypes.Locale, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLocale", nil, &r.Options, &resp) @@ -6091,30 +3757,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetLoginAttempts() (resp []d return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetLoginAttemptsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLoginAttempts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getLoginAttempts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Attempt to authenticate a user to the SoftLayer customer portal using the provided authentication container. Depending on the specific type of authentication container that is used, this API will leverage the appropriate authentication protocol. If authentication is successful then the API returns a list of linked accounts for the user, a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer_OpenIdConnect_TrustedProfile) GetLoginToken(request *datatypes.Container_Authentication_Request_Contract) (resp datatypes.Container_Authentication_Response_Common, err error) { params := []interface{}{ @@ -6133,63 +3775,12 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetMappedAccounts(providerTy return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetMappedAccountsIter(providerType *string) (resp []datatypes.Account, err error) { - params := []interface{}{ - providerType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getMappedAccounts", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getMappedAccounts", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Notification subscription records for the user. func (r User_Customer_OpenIdConnect_TrustedProfile) GetNotificationSubscribers() (resp []datatypes.Notification_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getNotificationSubscribers", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetNotificationSubscribersIter() (resp []datatypes.Notification_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getNotificationSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getNotificationSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) GetObject() (resp datatypes.User_Customer_OpenIdConnect_TrustedProfile, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getObject", nil, &r.Options, &resp) @@ -6218,60 +3809,12 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetOpenTickets() (resp []dat return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetOpenTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOpenTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOpenTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's vpn accessible subnets. func (r User_Customer_OpenIdConnect_TrustedProfile) GetOverrides() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOverrides", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetOverridesIter() (resp []datatypes.Network_Service_Vpn_Overrides, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOverrides", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Service_Vpn_Overrides{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getOverrides", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's parent user. If a SoftLayer_User_Customer has a null parentId property then it doesn't have a parent user. func (r User_Customer_OpenIdConnect_TrustedProfile) GetParent() (resp datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getParent", nil, &r.Options, &resp) @@ -6293,30 +3836,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetPermissions() (resp []dat return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetPermissionsIter() (resp []datatypes.User_Customer_CustomerPermission_Permission, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPermissions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_CustomerPermission_Permission{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPermissions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Attempt to authenticate a username and password to the SoftLayer customer portal. Many portal user accounts are configured to require answering a security question on login. In this case getPortalLoginToken() also verifies the given security question ID and answer. If authentication is successful then the API returns a token containing the ID of the authenticated user and a hash key used by the SoftLayer customer portal to maintain authentication. func (r User_Customer_OpenIdConnect_TrustedProfile) GetPortalLoginToken(username *string, password *string, securityQuestionId *int, securityQuestionAnswer *string) (resp datatypes.Container_User_Customer_Portal_Token, err error) { params := []interface{}{ @@ -6358,60 +3877,12 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetPreferenceTypes() (resp [ return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetPreferenceTypesIter() (resp []datatypes.User_Preference_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferenceTypes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferenceTypes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Data type contains a single user preference to a specific preference type. func (r User_Customer_OpenIdConnect_TrustedProfile) GetPreferences() (resp []datatypes.User_Preference, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferences", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetPreferencesIter() (resp []datatypes.User_Preference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Preference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getPreferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve the authentication requirements for an outstanding password set/reset request. The requirements returned in the same SoftLayer_Container_User_Customer_PasswordSet container which is provided as a parameter into this request. The SoftLayer_Container_User_Customer_PasswordSet::authenticationMethods array will contain an entry for each authentication method required for the user. See SoftLayer_Container_User_Customer_PasswordSet for more details. // // If the user has required authentication methods, then authentication information will be supplied to the SoftLayer_User_Customer::processPasswordSetRequest method within this same SoftLayer_Container_User_Customer_PasswordSet container. All existing information in the container must continue to exist in the container to complete the password set/reset process. @@ -6429,120 +3900,24 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetRoles() (resp []datatypes return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetRolesIter() (resp []datatypes.User_Permission_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's security question answers. Some portal users may not have security answers or may not be configured to require answering a security question on login. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSecurityAnswers() (resp []datatypes.User_Customer_Security_Answer, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSecurityAnswers", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetSecurityAnswersIter() (resp []datatypes.User_Customer_Security_Answer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSecurityAnswers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Security_Answer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSecurityAnswers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's notification subscription records. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSubscribers", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetSubscribersIter() (resp []datatypes.Notification_User_Subscriber, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSubscribers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_User_Subscriber{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSubscribers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A user's successful attempts to log into the SoftLayer customer portal. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSuccessfulLogins() (resp []datatypes.User_Customer_Access_Authentication, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSuccessfulLogins", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetSuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSuccessfulLogins", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSuccessfulLogins", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user is required to acknowledge the support policy for portal access. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSupportPolicyAcknowledgementRequiredFlag() (resp int, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSupportPolicyAcknowledgementRequiredFlag", nil, &r.Options, &resp) @@ -6567,30 +3942,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetSupportedLocales() (resp return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetSupportedLocalesIter() (resp []datatypes.Locale, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSupportedLocales", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Locale{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSupportedLocales", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a user must take a brief survey the next time they log into the SoftLayer customer portal. func (r User_Customer_OpenIdConnect_TrustedProfile) GetSurveyRequiredFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSurveyRequiredFlag", nil, &r.Options, &resp) @@ -6603,60 +3954,12 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetSurveys() (resp []datatyp return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetSurveysIter() (resp []datatypes.Survey, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSurveys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Survey{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getSurveys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An user's associated tickets. func (r User_Customer_OpenIdConnect_TrustedProfile) GetTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getTickets", nil, &r.Options, &resp) return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's time zone. func (r User_Customer_OpenIdConnect_TrustedProfile) GetTimezone() (resp datatypes.Locale_Timezone, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getTimezone", nil, &r.Options, &resp) @@ -6669,30 +3972,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetUnsuccessfulLogins() (res return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetUnsuccessfulLoginsIter() (resp []datatypes.User_Customer_Access_Authentication, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUnsuccessfulLogins", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Access_Authentication{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUnsuccessfulLogins", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns an IMS User Object from the provided OpenIdConnect User ID or IBMid Unique Identifier for the Account of the active user. Enforces the User Management permissions for the Active User. An exception will be thrown if no matching IMS User is found. NOTE that providing IBMid Unique Identifier is optional, but it will be preferred over OpenIdConnect User ID if provided. func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserForUnifiedInvitation(openIdConnectUserId *string, uniqueIdentifier *string, searchInvitationsNotLinksFlag *string, accountId *string) (resp datatypes.User_Customer_OpenIdConnect, err error) { params := []interface{}{ @@ -6722,30 +4001,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserLinks() (resp []datat return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserLinksIter() (resp []datatypes.User_Customer_Link, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserLinks", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Link{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserLinks", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserPreferences(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { params := []interface{}{ @@ -6756,34 +4011,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserPreferences(profileNa return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserPreferencesIter(profileName *string, containerKeyname *string) (resp []datatypes.Layout_Profile, err error) { - params := []interface{}{ - profileName, - containerKeyname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserPreferences", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Layout_Profile{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserPreferences", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A portal user's status, which controls overall access to the SoftLayer customer portal and VPN access to the private network. func (r User_Customer_OpenIdConnect_TrustedProfile) GetUserStatus() (resp datatypes.User_Customer_Status, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getUserStatus", nil, &r.Options, &resp) @@ -6802,30 +4029,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) GetVirtualGuests() (resp []d return } -func (r User_Customer_OpenIdConnect_TrustedProfile) GetVirtualGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getVirtualGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "getVirtualGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Customer_OpenIdConnect_TrustedProfile) InTerminalStatus() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect_TrustedProfile", "inTerminalStatus", nil, &r.Options, &resp) @@ -7470,30 +4673,6 @@ func (r User_Customer_Status) GetAllObjects() (resp []datatypes.User_Customer_St return } -func (r User_Customer_Status) GetAllObjectsIter() (resp []datatypes.User_Customer_Status, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Customer_Status", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Status{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Customer_Status", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getObject retrieves the SoftLayer_User_Customer_Status object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_User_Customer_Status service. func (r User_Customer_Status) GetObject() (resp datatypes.User_Customer_Status, err error) { err = r.Session.DoRequest("SoftLayer_User_Customer_Status", "getObject", nil, &r.Options, &resp) @@ -7552,30 +4731,6 @@ func (r User_External_Binding) GetAttributes() (resp []datatypes.User_External_B return } -func (r User_External_Binding) GetAttributesIter() (resp []datatypes.User_External_Binding_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_External_Binding", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_External_Binding", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Information regarding the billing item for external authentication. func (r User_External_Binding) GetBillingItem() (resp datatypes.Billing_Item, err error) { err = r.Session.DoRequest("SoftLayer_User_External_Binding", "getBillingItem", nil, &r.Options, &resp) @@ -7661,30 +4816,6 @@ func (r User_External_Binding_Vendor) GetAllObjects() (resp []datatypes.User_Ext return } -func (r User_External_Binding_Vendor) GetAllObjectsIter() (resp []datatypes.User_External_Binding_Vendor, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_External_Binding_Vendor", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_External_Binding_Vendor{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_External_Binding_Vendor", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_External_Binding_Vendor) GetObject() (resp datatypes.User_External_Binding_Vendor, err error) { err = r.Session.DoRequest("SoftLayer_User_External_Binding_Vendor", "getObject", nil, &r.Options, &resp) @@ -7739,30 +4870,6 @@ func (r User_Permission_Action) GetAllObjects() (resp []datatypes.User_Permissio return } -func (r User_Permission_Action) GetAllObjectsIter() (resp []datatypes.User_Permission_Action, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Permission_Action", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Action{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Permission_Action", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Permission_Action) GetObject() (resp datatypes.User_Permission_Action, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Action", "getObject", nil, &r.Options, &resp) @@ -7887,30 +4994,6 @@ func (r User_Permission_Group) GetActions() (resp []datatypes.User_Permission_Ac return } -func (r User_Permission_Group) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getActions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Action{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getActions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Permission_Group) GetObject() (resp datatypes.User_Permission_Group, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getObject", nil, &r.Options, &resp) @@ -7923,30 +5006,6 @@ func (r User_Permission_Group) GetRoles() (resp []datatypes.User_Permission_Role return } -func (r User_Permission_Group) GetRolesIter() (resp []datatypes.User_Permission_Role, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getRoles", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Role{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getRoles", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The type of the permission group. func (r User_Permission_Group) GetType() (resp datatypes.User_Permission_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "getType", nil, &r.Options, &resp) @@ -8061,30 +5120,6 @@ func (r User_Permission_Group_Type) GetGroups() (resp []datatypes.User_Permissio return } -func (r User_Permission_Group_Type) GetGroupsIter() (resp []datatypes.User_Permission_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Permission_Group_Type", "getGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Permission_Group_Type", "getGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Permission_Group_Type) GetObject() (resp datatypes.User_Permission_Group_Type, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Group_Type", "getObject", nil, &r.Options, &resp) @@ -8137,30 +5172,6 @@ func (r User_Permission_Resource_Type) GetAllObjects() (resp []datatypes.User_Pe return } -func (r User_Permission_Resource_Type) GetAllObjectsIter() (resp []datatypes.User_Permission_Resource_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Permission_Resource_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Resource_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Permission_Resource_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Permission_Resource_Type) GetObject() (resp datatypes.User_Permission_Resource_Type, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Resource_Type", "getObject", nil, &r.Options, &resp) @@ -8255,60 +5266,12 @@ func (r User_Permission_Role) GetActions() (resp []datatypes.User_Permission_Act return } -func (r User_Permission_Role) GetActionsIter() (resp []datatypes.User_Permission_Action, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getActions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Action{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getActions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r User_Permission_Role) GetGroups() (resp []datatypes.User_Permission_Group, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getGroups", nil, &r.Options, &resp) return } -func (r User_Permission_Role) GetGroupsIter() (resp []datatypes.User_Permission_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Permission_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r User_Permission_Role) GetObject() (resp datatypes.User_Permission_Role, err error) { err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getObject", nil, &r.Options, &resp) @@ -8321,30 +5284,6 @@ func (r User_Permission_Role) GetUsers() (resp []datatypes.User_Customer, err er return } -func (r User_Permission_Role) GetUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Permission_Role", "getUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Links a SoftLayer_User_Permission_Group object to the role. func (r User_Permission_Role) LinkGroup(group *datatypes.User_Permission_Group) (err error) { var resp datatypes.Void @@ -8421,30 +5360,6 @@ func (r User_Security_Question) GetAllObjects() (resp []datatypes.User_Security_ return } -func (r User_Security_Question) GetAllObjectsIter() (resp []datatypes.User_Security_Question, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_User_Security_Question", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Security_Question{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_User_Security_Question", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // getAllObjects retrieves all the SoftLayer_User_Security_Question objects where it is set to be viewable. func (r User_Security_Question) GetObject() (resp datatypes.User_Security_Question, err error) { err = r.Session.DoRequest("SoftLayer_User_Security_Question", "getObject", nil, &r.Options, &resp) diff --git a/services/verify.go b/services/verify.go index 349f831..a080b60 100644 --- a/services/verify.go +++ b/services/verify.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -84,30 +83,6 @@ func (r Verify_Api_HttpObj) GetAllObjects() (resp []datatypes.Verify_Api_HttpObj return } -func (r Verify_Api_HttpObj) GetAllObjectsIter() (resp []datatypes.Verify_Api_HttpObj, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Verify_Api_HttpObj{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Verify_Api_HttpObj) GetObject() (resp datatypes.Verify_Api_HttpObj, err error) { err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "getObject", nil, &r.Options, &resp) @@ -175,30 +150,6 @@ func (r Verify_Api_HttpsObj) GetAllObjects() (resp []datatypes.Verify_Api_HttpsO return } -func (r Verify_Api_HttpsObj) GetAllObjectsIter() (resp []datatypes.Verify_Api_HttpsObj, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Verify_Api_HttpsObj{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Verify_Api_HttpsObj) GetObject() (resp datatypes.Verify_Api_HttpsObj, err error) { err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "getObject", nil, &r.Options, &resp) diff --git a/services/virtual.go b/services/virtual.go index ea7ecf6..ab5b469 100644 --- a/services/virtual.go +++ b/services/virtual.go @@ -16,7 +16,6 @@ package services import ( "fmt" "strings" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/session" @@ -99,33 +98,6 @@ func (r Virtual_DedicatedHost) GetAvailableRouters(dedicatedHost *datatypes.Virt return } -func (r Virtual_DedicatedHost) GetAvailableRoutersIter(dedicatedHost *datatypes.Virtual_DedicatedHost) (resp []datatypes.Hardware, err error) { - params := []interface{}{ - dedicatedHost, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getAvailableRouters", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getAvailableRouters", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The backend router behind dedicated host's pool of resources. func (r Virtual_DedicatedHost) GetBackendRouter() (resp datatypes.Hardware_Router_Backend, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getBackendRouter", nil, &r.Options, &resp) @@ -150,60 +122,12 @@ func (r Virtual_DedicatedHost) GetGuests() (resp []datatypes.Virtual_Guest, err return } -func (r Virtual_DedicatedHost) GetGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Virtual_DedicatedHost) GetInternalTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getInternalTagReferences", nil, &r.Options, &resp) return } -func (r Virtual_DedicatedHost) GetInternalTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getInternalTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getInternalTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_DedicatedHost) GetObject() (resp datatypes.Virtual_DedicatedHost, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getObject", nil, &r.Options, &resp) @@ -222,60 +146,12 @@ func (r Virtual_DedicatedHost) GetPciDevices() (resp []datatypes.Virtual_Host_Pc return } -func (r Virtual_DedicatedHost) GetPciDevicesIter() (resp []datatypes.Virtual_Host_PciDevice, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDevices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Host_PciDevice{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getPciDevices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Virtual_DedicatedHost) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getTagReferences", nil, &r.Options, &resp) return } -func (r Virtual_DedicatedHost) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_DedicatedHost", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_DedicatedHost) SetTags(tags *string) (resp bool, err error) { params := []interface{}{ @@ -342,30 +218,6 @@ func (r Virtual_Disk_Image) GetAvailableBootModes() (resp []string, err error) { return } -func (r Virtual_Disk_Image) GetAvailableBootModesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getAvailableBootModes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getAvailableBootModes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The billing item for a virtual disk image. func (r Virtual_Disk_Image) GetBillingItem() (resp datatypes.Billing_Item_Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBillingItem", nil, &r.Options, &resp) @@ -378,30 +230,6 @@ func (r Virtual_Disk_Image) GetBlockDevices() (resp []datatypes.Virtual_Guest_Bl return } -func (r Virtual_Disk_Image) GetBlockDevicesIter() (resp []datatypes.Virtual_Guest_Block_Device, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBlockDevices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBlockDevices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Virtual_Disk_Image) GetBootableVolumeFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getBootableVolumeFlag", nil, &r.Options, &resp) @@ -420,30 +248,6 @@ func (r Virtual_Disk_Image) GetCoalescedDiskImages() (resp []datatypes.Virtual_D return } -func (r Virtual_Disk_Image) GetCoalescedDiskImagesIter() (resp []datatypes.Virtual_Disk_Image, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getCoalescedDiskImages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Disk_Image{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getCoalescedDiskImages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Virtual_Disk_Image) GetCopyOnWriteFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getCopyOnWriteFlag", nil, &r.Options, &resp) @@ -498,60 +302,12 @@ func (r Virtual_Disk_Image) GetPublicIsoImages() (resp []datatypes.Virtual_Disk_ return } -func (r Virtual_Disk_Image) GetPublicIsoImagesIter() (resp []datatypes.Virtual_Disk_Image, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getPublicIsoImages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Disk_Image{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getPublicIsoImages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve References to the software that resides on a disk image. func (r Virtual_Disk_Image) GetSoftwareReferences() (resp []datatypes.Virtual_Disk_Image_Software, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSoftwareReferences", nil, &r.Options, &resp) return } -func (r Virtual_Disk_Image) GetSoftwareReferencesIter() (resp []datatypes.Virtual_Disk_Image_Software, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSoftwareReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Disk_Image_Software{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSoftwareReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The original disk image that the current disk image was cloned from. func (r Virtual_Disk_Image) GetSourceDiskImage() (resp datatypes.Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getSourceDiskImage", nil, &r.Options, &resp) @@ -570,30 +326,6 @@ func (r Virtual_Disk_Image) GetStorageGroups() (resp []datatypes.Configuration_S return } -func (r Virtual_Disk_Image) GetStorageGroupsIter() (resp []datatypes.Configuration_Storage_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getStorageGroups", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Configuration_Storage_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getStorageGroups", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The storage repository that a disk image resides in. func (r Virtual_Disk_Image) GetStorageRepository() (resp datatypes.Virtual_Storage_Repository, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Disk_Image", "getStorageRepository", nil, &r.Options, &resp) @@ -1046,33 +778,6 @@ func (r Virtual_Guest) CreateObjects(templateObjects []datatypes.Virtual_Guest) return } -func (r Virtual_Guest) CreateObjectsIter(templateObjects []datatypes.Virtual_Guest) (resp []datatypes.Virtual_Guest, err error) { - params := []interface{}{ - templateObjects, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "createObjects", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "createObjects", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_Guest) CreatePostSoftwareInstallTransaction(data *string, returnBoolean *bool) (resp bool, err error) { params := []interface{}{ @@ -1162,33 +867,6 @@ func (r Virtual_Guest) FindByHostname(hostname *string) (resp []datatypes.Virtua return } -func (r Virtual_Guest) FindByHostnameIter(hostname *string) (resp []datatypes.Virtual_Guest, err error) { - params := []interface{}{ - hostname, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "findByHostname", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "findByHostname", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Find CCI by only its primary public or private IP address. IP addresses within secondary subnets tied to the CCI will not return the CCI. If no CCI is found, no errors are generated and no data is returned. func (r Virtual_Guest) FindByIpAddress(ipAddress *string) (resp datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -1229,60 +907,12 @@ func (r Virtual_Guest) GetActiveNetworkMonitorIncident() (resp []datatypes.Netwo return } -func (r Virtual_Guest) GetActiveNetworkMonitorIncidentIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveNetworkMonitorIncident", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveNetworkMonitorIncident", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Virtual_Guest) GetActiveTickets() (resp []datatypes.Ticket, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTickets", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetActiveTicketsIter() (resp []datatypes.Ticket, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTickets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Ticket{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTickets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A transaction that is still be performed on a cloud server. func (r Virtual_Guest) GetActiveTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTransaction", nil, &r.Options, &resp) @@ -1295,30 +925,6 @@ func (r Virtual_Guest) GetActiveTransactions() (resp []datatypes.Provisioning_Ve return } -func (r Virtual_Guest) GetActiveTransactionsIter() (resp []datatypes.Provisioning_Version1_Transaction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTransactions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Provisioning_Version1_Transaction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getActiveTransactions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Return a collection of SoftLayer_Item_Price objects for an OS reload func (r Virtual_Guest) GetAdditionalRequiredPricesForOsReload(config *datatypes.Container_Hardware_Server_Configuration) (resp []datatypes.Product_Item_Price, err error) { params := []interface{}{ @@ -1328,33 +934,6 @@ func (r Virtual_Guest) GetAdditionalRequiredPricesForOsReload(config *datatypes. return } -func (r Virtual_Guest) GetAdditionalRequiredPricesForOsReloadIter(config *datatypes.Container_Hardware_Server_Configuration) (resp []datatypes.Product_Item_Price, err error) { - params := []interface{}{ - config, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAdditionalRequiredPricesForOsReload", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAdditionalRequiredPricesForOsReload", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage_Allowed_Host information to connect this Virtual Guest to Network Storage volumes that require access control lists. func (r Virtual_Guest) GetAllowedHost() (resp datatypes.Network_Storage_Allowed_Host, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedHost", nil, &r.Options, &resp) @@ -1367,60 +946,12 @@ func (r Virtual_Guest) GetAllowedNetworkStorage() (resp []datatypes.Network_Stor return } -func (r Virtual_Guest) GetAllowedNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The SoftLayer_Network_Storage objects whose Replica that this SoftLayer_Virtual_Guest has access to. func (r Virtual_Guest) GetAllowedNetworkStorageReplicas() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetAllowedNetworkStorageReplicasIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorageReplicas", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAllowedNetworkStorageReplicas", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A antivirus / spyware software component object. func (r Virtual_Guest) GetAntivirusSpywareSoftwareComponent() (resp datatypes.Software_Component, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAntivirusSpywareSoftwareComponent", nil, &r.Options, &resp) @@ -1442,123 +973,24 @@ func (r Virtual_Guest) GetAttachedNetworkStorages(nasType *string) (resp []datat return } -func (r Virtual_Guest) GetAttachedNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttachedNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttachedNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Virtual_Guest) GetAttributes() (resp []datatypes.Virtual_Guest_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttributes", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetAttributesIter() (resp []datatypes.Virtual_Guest_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_Guest) GetAvailableBlockDevicePositions() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableBlockDevicePositions", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetAvailableBlockDevicePositionsIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableBlockDevicePositions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableBlockDevicePositions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve An object that stores the maximum level for the monitoring query types and response types. func (r Virtual_Guest) GetAvailableMonitoring() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableMonitoring", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetAvailableMonitoringIter() (resp []datatypes.Network_Monitor_Version1_Query_Host_Stratum, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableMonitoring", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host_Stratum{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableMonitoring", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method retrieves a list of SoftLayer_Network_Storage volumes that can be authorized to this SoftLayer_Virtual_Guest. func (r Virtual_Guest) GetAvailableNetworkStorages(nasType *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ @@ -1568,33 +1000,6 @@ func (r Virtual_Guest) GetAvailableNetworkStorages(nasType *string) (resp []data return } -func (r Virtual_Guest) GetAvailableNetworkStoragesIter(nasType *string) (resp []datatypes.Network_Storage, err error) { - params := []interface{}{ - nasType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableNetworkStorages", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAvailableNetworkStorages", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The average daily private bandwidth usage for the current billing cycle. func (r Virtual_Guest) GetAverageDailyPrivateBandwidthUsage() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getAverageDailyPrivateBandwidthUsage", nil, &r.Options, &resp) @@ -1613,60 +1018,12 @@ func (r Virtual_Guest) GetBackendNetworkComponents() (resp []datatypes.Virtual_G return } -func (r Virtual_Guest) GetBackendNetworkComponentsIter() (resp []datatypes.Virtual_Guest_Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A guest's backend or private router. func (r Virtual_Guest) GetBackendRouters() (resp []datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendRouters", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetBackendRoutersIter() (resp []datatypes.Hardware, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendRouters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBackendRouters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A computing instance's allotted bandwidth (measured in GB). func (r Virtual_Guest) GetBandwidthAllocation() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthAllocation", nil, &r.Options, &resp) @@ -1690,35 +1047,6 @@ func (r Virtual_Guest) GetBandwidthDataByDate(startDateTime *datatypes.Time, end return } -func (r Virtual_Guest) GetBandwidthDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, networkType *string) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - networkType, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthDataByDate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthDataByDate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve a collection of bandwidth data from an individual public or private network tracking object. Data is ideal if you with to employ your own traffic storage and graphing systems. func (r Virtual_Guest) GetBandwidthForDateRange(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ @@ -1729,34 +1057,6 @@ func (r Virtual_Guest) GetBandwidthForDateRange(startDate *datatypes.Time, endDa return } -func (r Virtual_Guest) GetBandwidthForDateRangeIter(startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDate, - endDate, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthForDateRange", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBandwidthForDateRange", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method when needing a bandwidth image for a single guest. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. func (r Virtual_Guest) GetBandwidthImage(networkType *string, snapshotRange *string, dateSpecified *datatypes.Time, dateSpecifiedEnd *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -1798,30 +1098,6 @@ func (r Virtual_Guest) GetBillingCycleBandwidthUsage() (resp []datatypes.Network return } -func (r Virtual_Guest) GetBillingCycleBandwidthUsageIter() (resp []datatypes.Network_Bandwidth_Usage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBillingCycleBandwidthUsage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Bandwidth_Usage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBillingCycleBandwidthUsage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The raw private bandwidth usage data for the current billing cycle. func (r Virtual_Guest) GetBillingCyclePrivateBandwidthUsage() (resp datatypes.Network_Bandwidth_Usage, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBillingCyclePrivateBandwidthUsage", nil, &r.Options, &resp) @@ -1858,30 +1134,6 @@ func (r Virtual_Guest) GetBlockDevices() (resp []datatypes.Virtual_Guest_Block_D return } -func (r Virtual_Guest) GetBlockDevicesIter() (resp []datatypes.Virtual_Guest_Block_Device, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBlockDevices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBlockDevices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieves the boot mode of the VSI. func (r Virtual_Guest) GetBootMode() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBootMode", nil, &r.Options, &resp) @@ -1900,60 +1152,12 @@ func (r Virtual_Guest) GetBrowserConsoleAccessLogs() (resp []datatypes.Virtual_B return } -func (r Virtual_Guest) GetBrowserConsoleAccessLogsIter() (resp []datatypes.Virtual_BrowserConsoleAccessLog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBrowserConsoleAccessLogs", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_BrowserConsoleAccessLog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getBrowserConsoleAccessLogs", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Gets the console access logs for a computing instance func (r Virtual_Guest) GetConsoleAccessLog() (resp []datatypes.Network_Logging_Syslog, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleAccessLog", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetConsoleAccessLogIter() (resp []datatypes.Network_Logging_Syslog, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleAccessLog", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Logging_Syslog{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleAccessLog", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A container for a guest's console data func (r Virtual_Guest) GetConsoleData() (resp datatypes.Container_Virtual_ConsoleData, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleData", nil, &r.Options, &resp) @@ -2001,35 +1205,6 @@ func (r Virtual_Guest) GetCpuMetricDataByDate(startDateTime *datatypes.Time, end return } -func (r Virtual_Guest) GetCpuMetricDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time, cpuIndexes []int) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - cpuIndexes, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCpuMetricDataByDate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCpuMetricDataByDate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method when needing a cpu usage image for a single guest. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. func (r Virtual_Guest) GetCpuMetricImage(snapshotRange *string, dateSpecified *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -2071,30 +1246,6 @@ func (r Virtual_Guest) GetCurrentBillingDetail() (resp []datatypes.Billing_Item, return } -func (r Virtual_Guest) GetCurrentBillingDetailIter() (resp []datatypes.Billing_Item, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCurrentBillingDetail", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Billing_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCurrentBillingDetail", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the total bill amount in US Dollars ($) for this instance in the current billing period. This includes all bandwidth used up to the point this method is called on the instance. func (r Virtual_Guest) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCurrentBillingTotal", nil, &r.Options, &resp) @@ -2131,60 +1282,12 @@ func (r Virtual_Guest) GetEvaultNetworkStorage() (resp []datatypes.Network_Stora return } -func (r Virtual_Guest) GetEvaultNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getEvaultNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getEvaultNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the subnets associated with this CloudLayer computing instance that are protectable by a network component firewall. func (r Virtual_Guest) GetFirewallProtectableSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFirewallProtectableSubnets", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetFirewallProtectableSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFirewallProtectableSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFirewallProtectableSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A computing instance's hardware firewall services. func (r Virtual_Guest) GetFirewallServiceComponent() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFirewallServiceComponent", nil, &r.Options, &resp) @@ -2203,30 +1306,6 @@ func (r Virtual_Guest) GetFrontendNetworkComponents() (resp []datatypes.Virtual_ return } -func (r Virtual_Guest) GetFrontendNetworkComponentsIter() (resp []datatypes.Virtual_Guest_Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFrontendNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFrontendNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A guest's frontend or public router. func (r Virtual_Guest) GetFrontendRouters() (resp datatypes.Hardware, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getFrontendRouters", nil, &r.Options, &resp) @@ -2299,30 +1378,6 @@ func (r Virtual_Guest) GetInternalTagReferences() (resp []datatypes.Tag_Referenc return } -func (r Virtual_Guest) GetInternalTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getInternalTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getInternalTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_Guest) GetIsoBootImage() (resp datatypes.Virtual_Disk_Image, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getIsoBootImage", nil, &r.Options, &resp) @@ -2340,35 +1395,6 @@ func (r Virtual_Guest) GetItemPricesFromSoftwareDescriptions(softwareDescription return } -func (r Virtual_Guest) GetItemPricesFromSoftwareDescriptionsIter(softwareDescriptions []datatypes.Software_Description, includeTranslationsFlag *bool, returnAllPricesFlag *bool) (resp []datatypes.Product_Item, err error) { - params := []interface{}{ - softwareDescriptions, - includeTranslationsFlag, - returnAllPricesFlag, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getItemPricesFromSoftwareDescriptions", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getItemPricesFromSoftwareDescriptions", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The last known power state of a virtual guest in the event the guest is turned off outside of IMS or has gone offline. func (r Virtual_Guest) GetLastKnownPowerState() (resp datatypes.Virtual_Guest_Power_State, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getLastKnownPowerState", nil, &r.Options, &resp) @@ -2421,34 +1447,6 @@ func (r Virtual_Guest) GetMemoryMetricDataByDate(startDateTime *datatypes.Time, return } -func (r Virtual_Guest) GetMemoryMetricDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricDataByDate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMemoryMetricDataByDate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Use this method when needing a memory usage image for a single guest. It will gather the correct input parameters for the generic graphing utility automatically based on the snapshot specified. func (r Virtual_Guest) GetMemoryMetricImage(snapshotRange *string, dateSpecified *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ @@ -2505,210 +1503,42 @@ func (r Virtual_Guest) GetMonitoringUserNotification() (resp []datatypes.User_Cu return } -func (r Virtual_Guest) GetMonitoringUserNotificationIter() (resp []datatypes.User_Customer_Notification_Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMonitoringUserNotification", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer_Notification_Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getMonitoringUserNotification", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get the IP addresses associated with this CloudLayer computing instance that are protectable by a network component firewall. Note, this may not return all values for IPv6 subnets for this CloudLayer computing instance. Please use getFirewallProtectableSubnets to get all protectable subnets. func (r Virtual_Guest) GetNetworkComponentFirewallProtectableIpAddresses() (resp []datatypes.Network_Subnet_IpAddress, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetNetworkComponentFirewallProtectableIpAddressesIter() (resp []datatypes.Network_Subnet_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponentFirewallProtectableIpAddresses", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponentFirewallProtectableIpAddresses", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A guests's network components. func (r Virtual_Guest) GetNetworkComponents() (resp []datatypes.Virtual_Guest_Network_Component, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponents", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetNetworkComponentsIter() (resp []datatypes.Virtual_Guest_Network_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Network_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve All of a virtual guest's network monitoring incidents. func (r Virtual_Guest) GetNetworkMonitorIncidents() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitorIncidents", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetNetworkMonitorIncidentsIter() (resp []datatypes.Network_Monitor_Version1_Incident, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitorIncidents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Incident{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitorIncidents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A guests's network monitors. func (r Virtual_Guest) GetNetworkMonitors() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitors", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetNetworkMonitorsIter() (resp []datatypes.Network_Monitor_Version1_Query_Host, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitors", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Monitor_Version1_Query_Host{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkMonitors", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A guest's associated network storage accounts. func (r Virtual_Guest) GetNetworkStorage() (resp []datatypes.Network_Storage, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkStorage", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetNetworkStorageIter() (resp []datatypes.Network_Storage, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkStorage", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Storage{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkStorage", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The network Vlans that a guest's network components are associated with. func (r Virtual_Guest) GetNetworkVlans() (resp []datatypes.Network_Vlan, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkVlans", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetNetworkVlansIter() (resp []datatypes.Network_Vlan, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkVlans", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Vlan{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getNetworkVlans", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_Guest) GetObject() (resp datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getObject", nil, &r.Options, &resp) @@ -2773,30 +1603,6 @@ func (r Virtual_Guest) GetPendingMaintenanceActions() (resp []datatypes.Containe return } -func (r Virtual_Guest) GetPendingMaintenanceActionsIter() (resp []datatypes.Container_Virtual_Guest_PendingMaintenanceAction, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getPendingMaintenanceActions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Container_Virtual_Guest_PendingMaintenanceAction{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getPendingMaintenanceActions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve When true this virtual guest must be migrated using SoftLayer_Virtual_Guest::migrate. func (r Virtual_Guest) GetPendingMigrationFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getPendingMigrationFlag", nil, &r.Options, &resp) @@ -2869,30 +1675,6 @@ func (r Virtual_Guest) GetRecentEvents() (resp []datatypes.Notification_Occurren return } -func (r Virtual_Guest) GetRecentEventsIter() (resp []datatypes.Notification_Occurrence_Event, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentEvents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Notification_Occurrence_Event{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentEvents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Recent metric data for a guest func (r Virtual_Guest) GetRecentMetricData(time *uint) (resp []datatypes.Metric_Tracking_Object, err error) { params := []interface{}{ @@ -2902,33 +1684,6 @@ func (r Virtual_Guest) GetRecentMetricData(time *uint) (resp []datatypes.Metric_ return } -func (r Virtual_Guest) GetRecentMetricDataIter(time *uint) (resp []datatypes.Metric_Tracking_Object, err error) { - params := []interface{}{ - time, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentMetricData", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRecentMetricData", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The regional group this guest is in. func (r Virtual_Guest) GetRegionalGroup() (resp datatypes.Location_Group_Regional, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getRegionalGroup", nil, &r.Options, &resp) @@ -2961,61 +1716,13 @@ func (r Virtual_Guest) GetReservedCapacityGroupInstance() (resp datatypes.Virtua // Retrieve the reverse domain records associated with this server. func (r Virtual_Guest) GetReverseDomainRecords() (resp []datatypes.Dns_Domain, err error) { - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getReverseDomainRecords", nil, &r.Options, &resp) - return -} - -func (r Virtual_Guest) GetReverseDomainRecordsIter() (resp []datatypes.Dns_Domain, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getReverseDomainRecords", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Dns_Domain{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getReverseDomainRecords", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - -// Retrieve A guest's vulnerability scan requests. -func (r Virtual_Guest) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSecurityScanRequests", nil, &r.Options, &resp) + err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getReverseDomainRecords", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetSecurityScanRequestsIter() (resp []datatypes.Network_Security_Scanner_Request, err error) { - limit := r.Options.ValidateLimit() +// Retrieve A guest's vulnerability scan requests. +func (r Virtual_Guest) GetSecurityScanRequests() (resp []datatypes.Network_Security_Scanner_Request, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSecurityScanRequests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Security_Scanner_Request{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSecurityScanRequests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() return } @@ -3031,60 +1738,12 @@ func (r Virtual_Guest) GetSoftwareComponents() (resp []datatypes.Software_Compon return } -func (r Virtual_Guest) GetSoftwareComponentsIter() (resp []datatypes.Software_Component, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSoftwareComponents", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Component{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSoftwareComponents", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve SSH keys to be installed on the server during provisioning or an OS reload. func (r Virtual_Guest) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSshKeys", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A computing instance's status. func (r Virtual_Guest) GetStatus() (resp datatypes.Virtual_Guest_Status, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getStatus", nil, &r.Options, &resp) @@ -3097,30 +1756,6 @@ func (r Virtual_Guest) GetTagReferences() (resp []datatypes.Tag_Reference, err e return } -func (r Virtual_Guest) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve Whether or not a computing instance is a Transient Instance. func (r Virtual_Guest) GetTransientGuestFlag() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getTransientGuestFlag", nil, &r.Options, &resp) @@ -3150,33 +1785,6 @@ func (r Virtual_Guest) GetUpgradeItemPrices(includeDowngradeItemPrices *bool) (r return } -func (r Virtual_Guest) GetUpgradeItemPricesIter(includeDowngradeItemPrices *bool) (resp []datatypes.Product_Item_Price, err error) { - params := []interface{}{ - includeDowngradeItemPrices, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUpgradeItemPrices", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Product_Item_Price{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUpgradeItemPrices", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A computing instance's associated upgrade request object if any. func (r Virtual_Guest) GetUpgradeRequest() (resp datatypes.Product_Upgrade_Request, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUpgradeRequest", nil, &r.Options, &resp) @@ -3189,60 +1797,12 @@ func (r Virtual_Guest) GetUserData() (resp []datatypes.Virtual_Guest_Attribute, return } -func (r Virtual_Guest) GetUserDataIter() (resp []datatypes.Virtual_Guest_Attribute, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUserData", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Attribute{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUserData", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A list of users that have access to this computing instance. func (r Virtual_Guest) GetUsers() (resp []datatypes.User_Customer, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUsers", nil, &r.Options, &resp) return } -func (r Virtual_Guest) GetUsersIter() (resp []datatypes.User_Customer, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUsers", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.User_Customer{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getUsers", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method will return the list of block device template groups that are valid to the host. For instance, it will validate that the template groups returned are compatible with the size and number of disks on the host. func (r Virtual_Guest) GetValidBlockDeviceTemplateGroups(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { params := []interface{}{ @@ -3252,33 +1812,6 @@ func (r Virtual_Guest) GetValidBlockDeviceTemplateGroups(visibility *string) (re return } -func (r Virtual_Guest) GetValidBlockDeviceTemplateGroupsIter(visibility *string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - params := []interface{}{ - visibility, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getValidBlockDeviceTemplateGroups", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getValidBlockDeviceTemplateGroups", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The name of the bandwidth allotment that a hardware belongs too. func (r Virtual_Guest) GetVirtualRack() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getVirtualRack", nil, &r.Options, &resp) @@ -3710,34 +2243,6 @@ func (r Virtual_Guest_Block_Device_Template_Group) FindGcImagesByCurrentUser(dat return } -func (r Virtual_Guest_Block_Device_Template_Group) FindGcImagesByCurrentUserIter(dataCenters []string, regions []string) (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - params := []interface{}{ - dataCenters, - regions, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "findGcImagesByCurrentUser", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "findGcImagesByCurrentUser", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A block device template group's [[SoftLayer_Account|account]]. func (r Virtual_Guest_Block_Device_Template_Group) GetAccount() (resp datatypes.Account, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccount", nil, &r.Options, &resp) @@ -3750,120 +2255,24 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetAccountContacts() (resp [] return } -func (r Virtual_Guest_Block_Device_Template_Group) GetAccountContactsIter() (resp []datatypes.Account_Contact, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountContacts", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Account_Contact{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountContacts", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The accounts which may have read-only access to an image template group. Will only be populated for parent template group objects. func (r Virtual_Guest_Block_Device_Template_Group) GetAccountReferences() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group_Accounts, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountReferences", nil, &r.Options, &resp) return } -func (r Virtual_Guest_Block_Device_Template_Group) GetAccountReferencesIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group_Accounts, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group_Accounts{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAccountReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get all available compatible platform names that can be added to a template group. func (r Virtual_Guest_Block_Device_Template_Group) GetAllAvailableCompatiblePlatformNames() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAllAvailableCompatiblePlatformNames", nil, &r.Options, &resp) return } -func (r Virtual_Guest_Block_Device_Template_Group) GetAllAvailableCompatiblePlatformNamesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAllAvailableCompatiblePlatformNames", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getAllAvailableCompatiblePlatformNames", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The block devices that are part of an image template group func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevices() (resp []datatypes.Virtual_Guest_Block_Device_Template, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevices", nil, &r.Options, &resp) return } -func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevicesIter() (resp []datatypes.Virtual_Guest_Block_Device_Template, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The total disk space of all images in a image template group. func (r Virtual_Guest_Block_Device_Template_Group) GetBlockDevicesDiskSpaceTotal() (resp datatypes.Float64, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getBlockDevicesDiskSpaceTotal", nil, &r.Options, &resp) @@ -3888,60 +2297,12 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetChildren() (resp []datatyp return } -func (r Virtual_Guest_Block_Device_Template_Group) GetChildrenIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getChildren", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getChildren", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Get compatible platform names currently set on the template group. func (r Virtual_Guest_Block_Device_Template_Group) GetCurrentCompatiblePlatformNames() (resp []string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getCurrentCompatiblePlatformNames", nil, &r.Options, &resp) return } -func (r Virtual_Guest_Block_Device_Template_Group) GetCurrentCompatiblePlatformNamesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getCurrentCompatiblePlatformNames", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getCurrentCompatiblePlatformNames", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The location containing this image template group. Will only be populated for child template group objects. func (r Virtual_Guest_Block_Device_Template_Group) GetDatacenter() (resp datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getDatacenter", nil, &r.Options, &resp) @@ -3954,30 +2315,6 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetDatacenters() (resp []data return } -func (r Virtual_Guest_Block_Device_Template_Group) GetDatacentersIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getDatacenters", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getDatacenters", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method returns the default boot mode set by the software description func (r Virtual_Guest_Block_Device_Template_Group) GetDefaultBootMode() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getDefaultBootMode", nil, &r.Options, &resp) @@ -3990,30 +2327,6 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetEncryptionAttributes() (re return } -func (r Virtual_Guest_Block_Device_Template_Group) GetEncryptionAttributesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getEncryptionAttributes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getEncryptionAttributes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The first clone of the image template group func (r Virtual_Guest_Block_Device_Template_Group) GetFirstChild() (resp datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getFirstChild", nil, &r.Options, &resp) @@ -4068,60 +2381,12 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetPublicCustomerOwnedImages( return } -func (r Virtual_Guest_Block_Device_Template_Group) GetPublicCustomerOwnedImagesIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicCustomerOwnedImages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicCustomerOwnedImages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method gets all public image templates that the user is allowed to see. func (r Virtual_Guest_Block_Device_Template_Group) GetPublicImages() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicImages", nil, &r.Options, &resp) return } -func (r Virtual_Guest_Block_Device_Template_Group) GetPublicImagesIter() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicImages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Block_Device_Template_Group{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getPublicImages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Virtual_Guest_Block_Device_Template_Group) GetRegion() (resp datatypes.Network_Service_Resource, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getRegion", nil, &r.Options, &resp) @@ -4134,30 +2399,6 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetRegions() (resp []datatype return } -func (r Virtual_Guest_Block_Device_Template_Group) GetRegionsIter() (resp []datatypes.Network_Service_Resource, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getRegions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Service_Resource{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getRegions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_Guest_Block_Device_Template_Group) GetRiasAccount(secret *string) (resp datatypes.Container_Virtual_Guest_Block_Device_Template_Group_RiasAccount, err error) { params := []interface{}{ @@ -4173,30 +2414,6 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetSshKeys() (resp []datatype return } -func (r Virtual_Guest_Block_Device_Template_Group) GetSshKeysIter() (resp []datatypes.Security_Ssh_Key, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getSshKeys", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Security_Ssh_Key{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getSshKeys", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A template group's status. func (r Virtual_Guest_Block_Device_Template_Group) GetStatus() (resp datatypes.Virtual_Guest_Block_Device_Template_Group_Status, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStatus", nil, &r.Options, &resp) @@ -4209,30 +2426,6 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetStorageLocations() (resp [ return } -func (r Virtual_Guest_Block_Device_Template_Group) GetStorageLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStorageLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStorageLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The storage repository that an image template group resides on. func (r Virtual_Guest_Block_Device_Template_Group) GetStorageRepository() (resp datatypes.Virtual_Storage_Repository, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStorageRepository", nil, &r.Options, &resp) @@ -4245,60 +2438,12 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetSupportedBootModes() (resp return } -func (r Virtual_Guest_Block_Device_Template_Group) GetSupportedBootModesIter() (resp []string, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getSupportedBootModes", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []string{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getSupportedBootModes", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The tags associated with this image template group. func (r Virtual_Guest_Block_Device_Template_Group) GetTagReferences() (resp []datatypes.Tag_Reference, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTagReferences", nil, &r.Options, &resp) return } -func (r Virtual_Guest_Block_Device_Template_Group) GetTagReferencesIter() (resp []datatypes.Tag_Reference, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTagReferences", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Tag_Reference{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTagReferences", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method allows you to grab the first data center that the image(s) reside on so we can pull it from there. func (r Virtual_Guest_Block_Device_Template_Group) GetTemplateDataCenterName() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getTemplateDataCenterName", nil, &r.Options, &resp) @@ -4317,30 +2462,6 @@ func (r Virtual_Guest_Block_Device_Template_Group) GetVhdImportSoftwareDescripti return } -func (r Virtual_Guest_Block_Device_Template_Group) GetVhdImportSoftwareDescriptionsIter() (resp []datatypes.Software_Description, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getVhdImportSoftwareDescriptions", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Software_Description{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getVhdImportSoftwareDescriptions", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This method indicates whether or not this image is a customer supplied license image. func (r Virtual_Guest_Block_Device_Template_Group) IsByol() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "isByol", nil, &r.Options, &resp) @@ -4577,30 +2698,6 @@ func (r Virtual_Guest_Boot_Parameter_Type) GetAllObjects() (resp []datatypes.Vir return } -func (r Virtual_Guest_Boot_Parameter_Type) GetAllObjectsIter() (resp []datatypes.Virtual_Guest_Boot_Parameter_Type, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Boot_Parameter_Type", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Boot_Parameter_Type{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Boot_Parameter_Type", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_Guest_Boot_Parameter_Type) GetObject() (resp datatypes.Virtual_Guest_Boot_Parameter_Type, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Boot_Parameter_Type", "getObject", nil, &r.Options, &resp) @@ -4685,30 +2782,6 @@ func (r Virtual_Guest_Network_Component) GetIpAddressBindings() (resp []datatype return } -func (r Virtual_Guest_Network_Component) GetIpAddressBindingsIter() (resp []datatypes.Virtual_Guest_Network_Component_IpAddress, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getIpAddressBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest_Network_Component_IpAddress{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getIpAddressBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The upstream network component firewall. func (r Virtual_Guest_Network_Component) GetNetworkComponentFirewall() (resp datatypes.Network_Component_Firewall, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getNetworkComponentFirewall", nil, &r.Options, &resp) @@ -4763,60 +2836,12 @@ func (r Virtual_Guest_Network_Component) GetSecurityGroupBindings() (resp []data return } -func (r Virtual_Guest_Network_Component) GetSecurityGroupBindingsIter() (resp []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSecurityGroupBindings", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Network_SecurityGroup_NetworkComponentBinding{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSecurityGroupBindings", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A network component's subnets. A subnet is a group of IP addresses func (r Virtual_Guest_Network_Component) GetSubnets() (resp []datatypes.Network_Subnet, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSubnets", nil, &r.Options, &resp) return } -func (r Virtual_Guest_Network_Component) GetSubnetsIter() (resp []datatypes.Network_Subnet, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSubnets", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Network_Subnet{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "getSubnets", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Issues a ping command and returns the success (true) or failure (false) of the ping command. func (r Virtual_Guest_Network_Component) IsPingable() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Network_Component", "isPingable", nil, &r.Options, &resp) @@ -4899,30 +2924,6 @@ func (r Virtual_Host) GetPciDevices() (resp []datatypes.Virtual_Host_PciDevice, return } -func (r Virtual_Host) GetPciDevicesIter() (resp []datatypes.Virtual_Host_PciDevice, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getPciDevices", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Host_PciDevice{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Host", "getPciDevices", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This data type presents the structure for a virtual guest placement group. The data type contains relational properties to the virtual guest placement group rule class. type Virtual_PlacementGroup struct { Session session.SLSession @@ -5002,33 +3003,6 @@ func (r Virtual_PlacementGroup) GetAvailableRouters(datacenterId *int) (resp []d return } -func (r Virtual_PlacementGroup) GetAvailableRoutersIter(datacenterId *int) (resp []datatypes.Hardware, err error) { - params := []interface{}{ - datacenterId, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getAvailableRouters", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Hardware{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getAvailableRouters", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The router the placement group is implemented on. func (r Virtual_PlacementGroup) GetBackendRouter() (resp datatypes.Hardware_Router_Backend, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getBackendRouter", nil, &r.Options, &resp) @@ -5041,30 +3015,6 @@ func (r Virtual_PlacementGroup) GetGuests() (resp []datatypes.Virtual_Guest, err return } -func (r Virtual_PlacementGroup) GetGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_PlacementGroup) GetObject() (resp datatypes.Virtual_PlacementGroup, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup", "getObject", nil, &r.Options, &resp) @@ -5123,30 +3073,6 @@ func (r Virtual_PlacementGroup_Rule) GetAllObjects() (resp []datatypes.Virtual_P return } -func (r Virtual_PlacementGroup_Rule) GetAllObjectsIter() (resp []datatypes.Virtual_PlacementGroup_Rule, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup_Rule", "getAllObjects", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_PlacementGroup_Rule{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup_Rule", "getAllObjects", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // no documentation yet func (r Virtual_PlacementGroup_Rule) GetObject() (resp datatypes.Virtual_PlacementGroup_Rule, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_PlacementGroup_Rule", "getObject", nil, &r.Options, &resp) @@ -5214,30 +3140,6 @@ func (r Virtual_ReservedCapacityGroup) GetAvailableInstances() (resp []datatypes return } -func (r Virtual_ReservedCapacityGroup) GetAvailableInstancesIter() (resp []datatypes.Virtual_ReservedCapacityGroup_Instance, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getAvailableInstances", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_ReservedCapacityGroup_Instance{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getAvailableInstances", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The router the reserved capacity group is implemented on. func (r Virtual_ReservedCapacityGroup) GetBackendRouter() (resp datatypes.Hardware_Router_Backend, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getBackendRouter", nil, &r.Options, &resp) @@ -5250,30 +3152,6 @@ func (r Virtual_ReservedCapacityGroup) GetInstances() (resp []datatypes.Virtual_ return } -func (r Virtual_ReservedCapacityGroup) GetInstancesIter() (resp []datatypes.Virtual_ReservedCapacityGroup_Instance, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getInstances", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_ReservedCapacityGroup_Instance{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getInstances", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The number of instances that are members of this reserved capacity group. func (r Virtual_ReservedCapacityGroup) GetInstancesCount() (resp uint, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getInstancesCount", nil, &r.Options, &resp) @@ -5292,30 +3170,6 @@ func (r Virtual_ReservedCapacityGroup) GetOccupiedInstances() (resp []datatypes. return } -func (r Virtual_ReservedCapacityGroup) GetOccupiedInstancesIter() (resp []datatypes.Virtual_ReservedCapacityGroup_Instance, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getOccupiedInstances", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_ReservedCapacityGroup_Instance{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_ReservedCapacityGroup", "getOccupiedInstances", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // This data type presents the structure for a virtual reserved capacity group instance. type Virtual_ReservedCapacityGroup_Instance struct { Session session.SLSession @@ -5476,60 +3330,12 @@ func (r Virtual_Storage_Repository) GetDiskImages() (resp []datatypes.Virtual_Di return } -func (r Virtual_Storage_Repository) GetDiskImagesIter() (resp []datatypes.Virtual_Disk_Image, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getDiskImages", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Disk_Image{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getDiskImages", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve The computing instances that have disk images in a storage repository. func (r Virtual_Storage_Repository) GetGuests() (resp []datatypes.Virtual_Guest, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getGuests", nil, &r.Options, &resp) return } -func (r Virtual_Storage_Repository) GetGuestsIter() (resp []datatypes.Virtual_Guest, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getGuests", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Virtual_Guest{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getGuests", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve func (r Virtual_Storage_Repository) GetMetricTrackingObject() (resp datatypes.Metric_Tracking_Object_Virtual_Storage_Repository, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getMetricTrackingObject", nil, &r.Options, &resp) @@ -5560,30 +3366,6 @@ func (r Virtual_Storage_Repository) GetStorageLocations() (resp []datatypes.Loca return } -func (r Virtual_Storage_Repository) GetStorageLocationsIter() (resp []datatypes.Location, err error) { - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getStorageLocations", nil, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Location{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getStorageLocations", nil, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Retrieve A storage repository's [[SoftLayer_Virtual_Storage_Repository_Type|type]]. func (r Virtual_Storage_Repository) GetType() (resp datatypes.Virtual_Storage_Repository_Type, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getType", nil, &r.Options, &resp) @@ -5600,34 +3382,6 @@ func (r Virtual_Storage_Repository) GetUsageMetricDataByDate(startDateTime *data return } -func (r Virtual_Storage_Repository) GetUsageMetricDataByDateIter(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - startDateTime, - endDateTime, - } - limit := r.Options.ValidateLimit() - err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getUsageMetricDataByDate", params, &r.Options, &resp) - if err != nil { - return - } - apicalls := r.Options.GetRemainingAPICalls() - var wg sync.WaitGroup - for x := 1; x <= apicalls; x++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - offset := i * limit - this_resp := []datatypes.Metric_Tracking_Object_Data{} - options := r.Options - options.Offset = &offset - err = r.Session.DoRequest("SoftLayer_Virtual_Storage_Repository", "getUsageMetricDataByDate", params, &options, &this_resp) - resp = append(resp, this_resp...) - }(x) - } - wg.Wait() - return -} - // Returns a disk usage image based on disk usage specified by the input parameters. func (r Virtual_Storage_Repository) GetUsageMetricImageByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) { params := []interface{}{ From b996da4c414e157401ddb68975c8c5cda1d90e87 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Wed, 14 Feb 2024 17:06:22 -0600 Subject: [PATCH 4/7] Created an Iter helper for virtual guests, moved some iter related functions around and expanded the Options Setters to make using them outside of a service a bit more manageable --- examples/cmd/virtual_iter.go | 15 ++++++++++----- helpers/virtual/virtual.go | 18 ++++++++++++------ helpers/virtual/virtual_test.go | 15 +++++++++++---- session/rest.go | 4 +++- sl/options.go | 12 ++++++++++++ 5 files changed, 48 insertions(+), 16 deletions(-) diff --git a/examples/cmd/virtual_iter.go b/examples/cmd/virtual_iter.go index dea05da..3363d8d 100644 --- a/examples/cmd/virtual_iter.go +++ b/examples/cmd/virtual_iter.go @@ -6,8 +6,9 @@ import ( "github.com/spf13/cobra" "github.com/softlayer/softlayer-go/filter" - "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/session" + "github.com/softlayer/softlayer-go/helpers/virtual" + "github.com/softlayer/softlayer-go/sl" ) func init() { @@ -37,11 +38,15 @@ func RunListVirtCmd(cmd *cobra.Command, args []string) error { // uncomment to output API calls as they are made. sess.Debug = true - // creates a reference to the service object (SoftLayer_Account) - service := services.GetAccountService(sess) - // Sets the mask, filter, result limit, and then makes the API call SoftLayer_Account::getHardware() - servers, err := service.Mask(objectMask).Filter(objectFilter).GetVirtualGuestsIter() + limit := 5 + options := sl.Options{ + Mask: objectMask, + Filter: objectFilter, + Limit: &limit, + } + + servers, err := virtual.GetVirtualGuestsIter(sess, &options) if err != nil { return err } diff --git a/helpers/virtual/virtual.go b/helpers/virtual/virtual.go index 9d1193a..069598f 100644 --- a/helpers/virtual/virtual.go +++ b/helpers/virtual/virtual.go @@ -19,6 +19,7 @@ package virtual import ( "time" "sync" + "fmt" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/helpers/product" "github.com/softlayer/softlayer-go/services" @@ -160,14 +161,17 @@ func UpgradeVirtualGuestWithPreset( return orderService.PlaceOrder(&order, sl.Bool(false)) } -func GetVirtualGuestsIter(service services.Account) (resp []datatypes.Virtual_Guest, err error) { +func GetVirtualGuestsIter(session session.SLSession, options *sl.Options) (resp []datatypes.Virtual_Guest, err error) { - resp, err = service.GetVirtualGuests() - limit := service.Options.ValidateLimit() + options.SetOffset(0) + limit := options.ValidateLimit() + + // Can't call service.GetVirtualGuests because it passes a copy of options, not the address to options sadly. + err = session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, options, &resp) if err != nil { return } - apicalls := service.Options.GetRemainingAPICalls() + apicalls := options.GetRemainingAPICalls() var wg sync.WaitGroup for x := 1; x <= apicalls; x++ { wg.Add(1) @@ -175,9 +179,11 @@ func GetVirtualGuestsIter(service services.Account) (resp []datatypes.Virtual_Gu defer wg.Done() offset := i * limit this_resp := []datatypes.Virtual_Guest{} - options := service.Options options.Offset = &offset - this_resp, err = service.GetVirtualGuests() + err = session.DoRequest("SoftLayer_Account", "getVirtualGuests", nil, options, &this_resp) + if err != nil { + fmt.Printf("[ERROR] %v\n", err) + } resp = append(resp, this_resp...) }(x) } diff --git a/helpers/virtual/virtual_test.go b/helpers/virtual/virtual_test.go index d8f68b3..fb9ab45 100644 --- a/helpers/virtual/virtual_test.go +++ b/helpers/virtual/virtual_test.go @@ -4,7 +4,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" // "github.com/softlayer/softlayer-go/datatypes" - "github.com/softlayer/softlayer-go/services" + + "github.com/softlayer/softlayer-go/sl" "github.com/softlayer/softlayer-go/helpers/virtual" "github.com/softlayer/softlayer-go/session/sessionfakes" "testing" @@ -17,15 +18,21 @@ func TestServices(t *testing.T) { var _ = Describe("Helper Virtual Tests", func() { var slsession *sessionfakes.FakeSLSession - var sl_service services.Account + var options *sl.Options BeforeEach(func() { + limit := 10 slsession = &sessionfakes.FakeSLSession{} - sl_service = services.GetAccountService(slsession) + options = &sl.Options{ + Mask: "mask[id,hostname]", + Filter: "", + Limit: &limit, + } }) Context("GetVirtualGuestsIter Tests", func() { + It("API call made properly", func() { - _, err := virtual.GetVirtualGuestsIter(sl_service) + _, err := virtual.GetVirtualGuestsIter(slsession, options) Expect(err).ToNot(HaveOccurred()) Expect(slsession.DoRequestCallCount()).To(Equal(1)) }) diff --git a/session/rest.go b/session/rest.go index a269f7b..7556fdc 100644 --- a/session/rest.go +++ b/session/rest.go @@ -289,10 +289,12 @@ func makeHTTPRequest( } if resp.Header["Softlayer-Total-Items"] != nil && len(resp.Header["Softlayer-Total-Items"]) == 1 { var str_err error - options.TotalItems, str_err = strconv.Atoi(resp.Header["Softlayer-Total-Items"][0]) + var total_items int + total_items, str_err = strconv.Atoi(resp.Header["Softlayer-Total-Items"][0]) if str_err != nil { log.Println("[Error] Unable to convert Softlayer-Total-Items to int: ", str_err) } + options.SetTotalItems(total_items) } if session.Debug { diff --git a/sl/options.go b/sl/options.go index 98beb48..ca1d5e3 100644 --- a/sl/options.go +++ b/sl/options.go @@ -45,4 +45,16 @@ func (opt *Options) ValidateLimit() int { opt.Limit = &defaultLimit } return *opt.Limit +} + +func (opt *Options) SetTotalItems(total int) { + opt.TotalItems = total +} + +func (opt *Options) SetOffset(offset int) { + opt.Offset = &offset +} + +func (opt *Options) SetLimit(limit int) { + opt.Limit = &limit } \ No newline at end of file From 4def7afd910fe4ed8787d689fe1a65e006713ca1 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Thu, 15 Feb 2024 15:41:03 -0600 Subject: [PATCH 5/7] Added a hardware Iter helper --- README.md | 4 ++-- examples/cmd/virtual_iter.go | 7 +++--- generator/templates.go | 2 +- helpers/hardware/hardware.go | 36 ++++++++++++++++++++++++++++- helpers/hardware/hardware_test.go | 38 +++++++++++++++++++++++++++++++ helpers/virtual/virtual.go | 9 +++++--- helpers/virtual/virtual_test.go | 10 ++++---- sl/options.go | 20 ++++++++-------- 8 files changed, 100 insertions(+), 26 deletions(-) create mode 100644 helpers/hardware/hardware_test.go diff --git a/README.md b/README.md index 23ea380..ed94977 100644 --- a/README.md +++ b/README.md @@ -375,8 +375,8 @@ make test ```bash gofmt -w `find . -name '*.go' | grep -v vendor` go vet -all $(go list ./... | grep -v datatypes) -go get -d -v -t ./... -go test $(go list ./... | grep -v '/vendor/') -timeout=30s -parallel=4 -coverprofile coverage.out +go mod vendor +go test $(go list ./... | grep -v '/vendor/') -timeout=30s -coverprofile coverage.out ``` ### Updating dependencies diff --git a/examples/cmd/virtual_iter.go b/examples/cmd/virtual_iter.go index 3363d8d..9cb018e 100644 --- a/examples/cmd/virtual_iter.go +++ b/examples/cmd/virtual_iter.go @@ -6,8 +6,8 @@ import ( "github.com/spf13/cobra" "github.com/softlayer/softlayer-go/filter" - "github.com/softlayer/softlayer-go/session" "github.com/softlayer/softlayer-go/helpers/virtual" + "github.com/softlayer/softlayer-go/session" "github.com/softlayer/softlayer-go/sl" ) @@ -41,9 +41,9 @@ func RunListVirtCmd(cmd *cobra.Command, args []string) error { // Sets the mask, filter, result limit, and then makes the API call SoftLayer_Account::getHardware() limit := 5 options := sl.Options{ - Mask: objectMask, + Mask: objectMask, Filter: objectFilter, - Limit: &limit, + Limit: &limit, } servers, err := virtual.GetVirtualGuestsIter(sess, &options) @@ -61,6 +61,5 @@ func RunListVirtCmd(cmd *cobra.Command, args []string) error { fmt.Printf("%v, %v, %v, %v\n", *server.Id, *server.Hostname, *server.Domain, ipAddress) } - return nil } diff --git a/generator/templates.go b/generator/templates.go index 5551c02..5f93600 100644 --- a/generator/templates.go +++ b/generator/templates.go @@ -219,4 +219,4 @@ var IterTemplate = `{{if .TypeArray}} return } {{end }} -` \ No newline at end of file +` diff --git a/helpers/hardware/hardware.go b/helpers/hardware/hardware.go index 2f1f095..2f52075 100644 --- a/helpers/hardware/hardware.go +++ b/helpers/hardware/hardware.go @@ -18,11 +18,12 @@ package hardware import ( "fmt" - + "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/helpers/location" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/session" + "github.com/softlayer/softlayer-go/sl" "regexp" ) @@ -59,3 +60,36 @@ func GetRouterByName(sess *session.Session, hostname string, args ...interface{} return datatypes.Hardware{}, fmt.Errorf("No routers found with hostname of %s", hostname) } + +// Use go-routines to iterate through all hardware results. +// options should be any Mask or Filter you need, and a Limit if the default is too large. +// Any error in the subsequent API calls will be logged, but largely ignored +func GetHardwareIter(session session.SLSession, options *sl.Options) (resp []datatypes.Hardware, err error) { + + options.SetOffset(0) + limit := options.ValidateLimit() + + // Can't call service.GetVirtualGuests because it passes a copy of options, not the address to options sadly. + err = session.DoRequest("SoftLayer_Account", "getHardware", nil, options, &resp) + if err != nil { + return + } + apicalls := options.GetRemainingAPICalls() + var wg sync.WaitGroup + for x := 1; x <= apicalls; x++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + offset := i * limit + this_resp := []datatypes.Hardware{} + options.Offset = &offset + err = session.DoRequest("SoftLayer_Account", "getHardware", nil, options, &this_resp) + if err != nil { + fmt.Printf("[ERROR] %v\n", err) + } + resp = append(resp, this_resp...) + }(x) + } + wg.Wait() + return resp, err +} diff --git a/helpers/hardware/hardware_test.go b/helpers/hardware/hardware_test.go new file mode 100644 index 0000000..8f1dd4b --- /dev/null +++ b/helpers/hardware/hardware_test.go @@ -0,0 +1,38 @@ +package hardware_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "github.com/softlayer/softlayer-go/helpers/hardware" + "github.com/softlayer/softlayer-go/session/sessionfakes" + "github.com/softlayer/softlayer-go/sl" + "testing" +) + +func TestServices(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Helper Hardware Tests") +} + +var _ = Describe("Helper Hardware Tests", func() { + var slsession *sessionfakes.FakeSLSession + var options *sl.Options + BeforeEach(func() { + limit := 10 + slsession = &sessionfakes.FakeSLSession{} + options = &sl.Options{ + Mask: "mask[id,hostname]", + Filter: "", + Limit: &limit, + } + }) + + Context("GetHardwareIter Tests", func() { + + It("API call made properly", func() { + _, err := hardware.GetHardwareIter(slsession, options) + Expect(err).ToNot(HaveOccurred()) + Expect(slsession.DoRequestCallCount()).To(Equal(1)) + }) + }) +}) diff --git a/helpers/virtual/virtual.go b/helpers/virtual/virtual.go index 069598f..cc51e3c 100644 --- a/helpers/virtual/virtual.go +++ b/helpers/virtual/virtual.go @@ -17,14 +17,14 @@ package virtual import ( - "time" - "sync" "fmt" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/helpers/product" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/session" "github.com/softlayer/softlayer-go/sl" + "sync" + "time" ) // Upgrade a virtual guest to a specified set of features (e.g. cpu, ram). @@ -161,6 +161,9 @@ func UpgradeVirtualGuestWithPreset( return orderService.PlaceOrder(&order, sl.Bool(false)) } +// Use go-routines to iterate through all virtual guest results. +// optoins should be any Mask or Filter you need, and a Limit if the default is too large. +// Any error in the subsequent API calls will be logged, but largely ignored func GetVirtualGuestsIter(session session.SLSession, options *sl.Options) (resp []datatypes.Virtual_Guest, err error) { options.SetOffset(0) @@ -189,4 +192,4 @@ func GetVirtualGuestsIter(session session.SLSession, options *sl.Options) (resp } wg.Wait() return resp, err -} \ No newline at end of file +} diff --git a/helpers/virtual/virtual_test.go b/helpers/virtual/virtual_test.go index fb9ab45..9f09dc5 100644 --- a/helpers/virtual/virtual_test.go +++ b/helpers/virtual/virtual_test.go @@ -4,10 +4,10 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" // "github.com/softlayer/softlayer-go/datatypes" - - "github.com/softlayer/softlayer-go/sl" + "github.com/softlayer/softlayer-go/helpers/virtual" "github.com/softlayer/softlayer-go/session/sessionfakes" + "github.com/softlayer/softlayer-go/sl" "testing" ) @@ -23,9 +23,9 @@ var _ = Describe("Helper Virtual Tests", func() { limit := 10 slsession = &sessionfakes.FakeSLSession{} options = &sl.Options{ - Mask: "mask[id,hostname]", + Mask: "mask[id,hostname]", Filter: "", - Limit: &limit, + Limit: &limit, } }) @@ -37,4 +37,4 @@ var _ = Describe("Helper Virtual Tests", func() { Expect(slsession.DoRequestCallCount()).To(Equal(1)) }) }) -}) \ No newline at end of file +}) diff --git a/sl/options.go b/sl/options.go index ca1d5e3..5b24b2e 100644 --- a/sl/options.go +++ b/sl/options.go @@ -20,14 +20,15 @@ import ( "math" ) -var defaultLimit = 2 +var defaultLimit = 50 + // Options contains the individual query parameters that can be applied to a request. type Options struct { - Id *int - Mask string - Filter string - Limit *int - Offset *int + Id *int + Mask string + Filter string + Limit *int + Offset *int TotalItems int } @@ -35,11 +36,10 @@ type Options struct { func (opt *Options) GetRemainingAPICalls() int { Total := float64(opt.TotalItems) Limit := float64(*opt.Limit) - return int(math.Ceil((Total - Limit) / Limit )) + return int(math.Ceil((Total - Limit) / Limit)) } - -//Makes sure the limit is set to something, not 0 or 1. Will set to default if no other limit is set. +// Makes sure the limit is set to something, not 0 or 1. Will set to default if no other limit is set. func (opt *Options) ValidateLimit() int { if opt.Limit == nil || *opt.Limit < 2 { opt.Limit = &defaultLimit @@ -57,4 +57,4 @@ func (opt *Options) SetOffset(offset int) { func (opt *Options) SetLimit(limit int) { opt.Limit = &limit -} \ No newline at end of file +} From f66f4726c27062fa050e6936060b9505e0803993 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Thu, 15 Feb 2024 15:42:59 -0600 Subject: [PATCH 6/7] ran make fmt --- helpers/hardware/hardware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/hardware/hardware.go b/helpers/hardware/hardware.go index 2f52075..d3caa0e 100644 --- a/helpers/hardware/hardware.go +++ b/helpers/hardware/hardware.go @@ -18,13 +18,13 @@ package hardware import ( "fmt" - "sync" "github.com/softlayer/softlayer-go/datatypes" "github.com/softlayer/softlayer-go/helpers/location" "github.com/softlayer/softlayer-go/services" "github.com/softlayer/softlayer-go/session" "github.com/softlayer/softlayer-go/sl" "regexp" + "sync" ) // GeRouterByName returns a Hardware that matches the provided hostname, From 0d5245189139c81b4e9d299e4317f0b60713505a Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Thu, 15 Feb 2024 17:18:43 -0600 Subject: [PATCH 7/7] added a few unit tests --- sl/errors_test.go | 37 +++++++++++++++++++++++++++ sl/options.go | 6 ++--- sl/options_test.go | 64 ++++++++++++++++++++++++++++++++++++++++++++++ sl/sl_test.go | 13 ++++++++++ sl/version_test.go | 29 +++++++++++++++++++++ 5 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 sl/errors_test.go create mode 100644 sl/options_test.go create mode 100644 sl/sl_test.go create mode 100644 sl/version_test.go diff --git a/sl/errors_test.go b/sl/errors_test.go new file mode 100644 index 0000000..a917b13 --- /dev/null +++ b/sl/errors_test.go @@ -0,0 +1,37 @@ +package sl_test + +import ( + "errors" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "github.com/softlayer/softlayer-go/sl" +) + +var _ = Describe("Error Tests", func() { + var sl_err sl.Error + var base_err error + Context("Error Tests", func() { + BeforeEach(func() { + base_err = errors.New("TTTTT") + sl_err = sl.Error{ + StatusCode: 0, + Exception: "", + Message: "", + Wrapped: base_err, + } + }) + It("Basic Error Tests", func() { + Expect(sl_err.Error()).To(Equal("TTTTT")) + sl_err.Wrapped = nil + Expect(sl_err.Error()).To(Equal("")) + sl_err.Exception = "AAA" + Expect(sl_err.Error()).To(Equal("AAA: ")) + sl_err.Message = "BBB" + Expect(sl_err.Error()).To(Equal("AAA: BBB ")) + sl_err.StatusCode = 99 + Expect(sl_err.Error()).To(Equal("AAA: BBB (HTTP 99)")) + }) + + }) +}) diff --git a/sl/options.go b/sl/options.go index 5b24b2e..d0d2b17 100644 --- a/sl/options.go +++ b/sl/options.go @@ -20,7 +20,7 @@ import ( "math" ) -var defaultLimit = 50 +var DefaultLimit = 50 // Options contains the individual query parameters that can be applied to a request. type Options struct { @@ -41,8 +41,8 @@ func (opt *Options) GetRemainingAPICalls() int { // Makes sure the limit is set to something, not 0 or 1. Will set to default if no other limit is set. func (opt *Options) ValidateLimit() int { - if opt.Limit == nil || *opt.Limit < 2 { - opt.Limit = &defaultLimit + if opt.Limit == nil || *opt.Limit < DefaultLimit { + opt.Limit = &DefaultLimit } return *opt.Limit } diff --git a/sl/options_test.go b/sl/options_test.go new file mode 100644 index 0000000..a19eb62 --- /dev/null +++ b/sl/options_test.go @@ -0,0 +1,64 @@ +package sl_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "github.com/softlayer/softlayer-go/sl" +) + +var _ = Describe("Options Tests", func() { + var sl_limit int + var sl_id int + var sl_mask string + var sl_filter string + var sl_offset int + var sl_totalItems int + Context("Option Setter Testing", func() { + BeforeEach(func() { + sl_limit = 10 + sl_id = 99999 + sl_mask = "mask[id, hostname]" + sl_filter = `{"test":{"operation":"ok"}}` + sl_offset = 0 + sl_totalItems = 0 + }) + It("Test GetRemainingAPICalls", func() { + options := sl.Options{ + TotalItems: 1000, + Limit: &sl_limit, + } + result := options.GetRemainingAPICalls() + Expect(result).To(Equal(99)) + }) + It("Test ValidateLimit", func() { + options := sl.Options{} + limit := options.ValidateLimit() + Expect(limit).To(Equal(sl.DefaultLimit)) + Expect(*options.Limit).To(Equal(sl.DefaultLimit)) + options.SetLimit(123) + Expect(*options.Limit).To(Equal(123)) + }) + It("Setter Tests", func() { + options := sl.Options{} + options.SetTotalItems(44) + Expect(options.TotalItems).To(Equal(44)) + options.SetOffset(33) + Expect(*options.Offset).To(Equal(33)) + options.SetLimit(22) + Expect(*options.Limit).To(Equal(22)) + }) + It("Basic Setting Tests", func() { + options := sl.Options{ + Id: &sl_id, + Mask: sl_mask, + Filter: sl_filter, + Limit: &sl_limit, + Offset: &sl_offset, + TotalItems: sl_totalItems, + } + Expect(options.Limit).To(Equal(&sl_limit)) + }) + + }) +}) diff --git a/sl/sl_test.go b/sl/sl_test.go new file mode 100644 index 0000000..a971cea --- /dev/null +++ b/sl/sl_test.go @@ -0,0 +1,13 @@ +package sl_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "testing" +) + +func TestServices(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "SL Package Tests") +} diff --git a/sl/version_test.go b/sl/version_test.go new file mode 100644 index 0000000..f1987f5 --- /dev/null +++ b/sl/version_test.go @@ -0,0 +1,29 @@ +package sl_test + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "github.com/softlayer/softlayer-go/sl" +) + +var _ = Describe("Version Tests", func() { + Context("Get Version Tests", func() { + It("Setting Version", func() { + version := sl.VersionInfo{ + Major: 1, Minor: 2, Patch: 3, Pre: "", + } + Expect(version.String()).To(Equal("v1.2.3")) + }) + It("Pre Version", func() { + version := sl.VersionInfo{ + Major: 1, Minor: 2, Patch: 3, Pre: "a", + } + Expect(version.String()).To(Equal("v1.2.3-a")) + }) + It("Base Version", func() { + version := sl.Version + Expect(version.String()).Should(HavePrefix("v")) + }) + }) +})