From dab376f012f6a96c262d5f2c317b1cfbd6941d4d Mon Sep 17 00:00:00 2001 From: HORIUCHI Akihiko <12ff5b8@gmail.com> Date: Fri, 24 May 2024 15:48:45 +0900 Subject: [PATCH] Fix Action in ecl/managed_load_balancer/v1/load_balancers/requests (#49) * Remove unnecessary comments from ecl/managed_load_balancer/v1 * Fix Action in ecl/managed_load_balancer/v1/load_balancers/requests * Remove error from return value of ToLoadBalancerActionMap * Update go version in test (1.12.x, 1.13.x -> 1.17.x, 1.18.x) * Add v3/go.mod --- .github/workflows/test.yml | 2 +- .../v1/certificates/doc.go | 2 - .../v1/certificates/requests.go | 3 - .../v1/certificates/results.go | 3 - .../v1/certificates/testing/doc.go | 2 - .../v1/certificates/testing/fixtures.go | 3 - .../v1/certificates/testing/requests_test.go | 3 - .../v1/certificates/urls.go | 3 - .../v1/health_monitors/doc.go | 2 - .../v1/health_monitors/requests.go | 3 - .../v1/health_monitors/results.go | 3 - .../v1/health_monitors/testing/doc.go | 2 - .../v1/health_monitors/testing/fixtures.go | 3 - .../health_monitors/testing/requests_test.go | 3 - .../v1/health_monitors/urls.go | 3 - .../managed_load_balancer/v1/listeners/doc.go | 2 - .../v1/listeners/requests.go | 3 - .../v1/listeners/results.go | 3 - .../v1/listeners/testing/doc.go | 2 - .../v1/listeners/testing/fixtures.go | 3 - .../v1/listeners/testing/requests_test.go | 3 - .../v1/listeners/urls.go | 3 - .../v1/load_balancers/doc.go | 31 ++++++++-- .../v1/load_balancers/requests.go | 60 ++++++++++--------- .../v1/load_balancers/results.go | 3 - .../v1/load_balancers/testing/doc.go | 2 - .../v1/load_balancers/testing/fixtures.go | 17 ++++-- .../load_balancers/testing/requests_test.go | 46 ++++++++++++-- .../v1/load_balancers/urls.go | 3 - .../v1/operations/doc.go | 2 - .../v1/operations/requests.go | 3 - .../v1/operations/results.go | 3 - .../v1/operations/testing/doc.go | 2 - .../v1/operations/testing/fixtures.go | 3 - .../v1/operations/testing/requests_test.go | 3 - .../v1/operations/urls.go | 3 - v2/ecl/managed_load_balancer/v1/plans/doc.go | 2 - .../v1/plans/requests.go | 3 - .../managed_load_balancer/v1/plans/results.go | 3 - .../v1/plans/testing/doc.go | 2 - .../v1/plans/testing/fixtures.go | 3 - .../v1/plans/testing/requests_test.go | 3 - v2/ecl/managed_load_balancer/v1/plans/urls.go | 3 - .../managed_load_balancer/v1/policies/doc.go | 2 - .../v1/policies/requests.go | 3 - .../v1/policies/results.go | 3 - .../v1/policies/testing/doc.go | 2 - .../v1/policies/testing/fixtures.go | 3 - .../v1/policies/testing/requests_test.go | 3 - .../managed_load_balancer/v1/policies/urls.go | 3 - v2/ecl/managed_load_balancer/v1/routes/doc.go | 2 - .../v1/routes/requests.go | 3 - .../v1/routes/results.go | 3 - .../v1/routes/testing/doc.go | 2 - .../v1/routes/testing/fixtures.go | 3 - .../v1/routes/testing/requests_test.go | 3 - .../managed_load_balancer/v1/routes/urls.go | 3 - v2/ecl/managed_load_balancer/v1/rules/doc.go | 2 - .../v1/rules/requests.go | 3 - .../managed_load_balancer/v1/rules/results.go | 3 - .../v1/rules/testing/doc.go | 2 - .../v1/rules/testing/fixtures.go | 3 - .../v1/rules/testing/requests_test.go | 3 - v2/ecl/managed_load_balancer/v1/rules/urls.go | 3 - .../v1/system_updates/doc.go | 2 - .../v1/system_updates/requests.go | 3 - .../v1/system_updates/results.go | 3 - .../v1/system_updates/testing/doc.go | 2 - .../v1/system_updates/testing/fixtures.go | 3 - .../system_updates/testing/requests_test.go | 3 - .../v1/system_updates/urls.go | 3 - .../v1/target_groups/doc.go | 2 - .../v1/target_groups/requests.go | 3 - .../v1/target_groups/results.go | 3 - .../v1/target_groups/testing/doc.go | 2 - .../v1/target_groups/testing/fixtures.go | 3 - .../v1/target_groups/testing/requests_test.go | 3 - .../v1/target_groups/urls.go | 3 - .../v1/tls_policies/doc.go | 2 - .../v1/tls_policies/requests.go | 3 - .../v1/tls_policies/results.go | 3 - .../v1/tls_policies/testing/doc.go | 2 - .../v1/tls_policies/testing/fixtures.go | 3 - .../v1/tls_policies/testing/requests_test.go | 3 - .../v1/tls_policies/urls.go | 3 - .../v1/certificates/doc.go | 2 - .../v1/certificates/requests.go | 3 - .../v1/certificates/results.go | 3 - .../v1/certificates/testing/doc.go | 2 - .../v1/certificates/testing/fixtures.go | 3 - .../v1/certificates/testing/requests_test.go | 3 - .../v1/certificates/urls.go | 3 - .../v1/health_monitors/doc.go | 2 - .../v1/health_monitors/requests.go | 3 - .../v1/health_monitors/results.go | 3 - .../v1/health_monitors/testing/doc.go | 2 - .../v1/health_monitors/testing/fixtures.go | 3 - .../health_monitors/testing/requests_test.go | 3 - .../v1/health_monitors/urls.go | 3 - .../managed_load_balancer/v1/listeners/doc.go | 2 - .../v1/listeners/requests.go | 3 - .../v1/listeners/results.go | 3 - .../v1/listeners/testing/doc.go | 2 - .../v1/listeners/testing/fixtures.go | 3 - .../v1/listeners/testing/requests_test.go | 3 - .../v1/listeners/urls.go | 3 - .../v1/load_balancers/doc.go | 31 ++++++++-- .../v1/load_balancers/requests.go | 60 ++++++++++--------- .../v1/load_balancers/results.go | 3 - .../v1/load_balancers/testing/doc.go | 2 - .../v1/load_balancers/testing/fixtures.go | 17 ++++-- .../load_balancers/testing/requests_test.go | 46 ++++++++++++-- .../v1/load_balancers/urls.go | 3 - .../v1/operations/doc.go | 2 - .../v1/operations/requests.go | 3 - .../v1/operations/results.go | 3 - .../v1/operations/testing/doc.go | 2 - .../v1/operations/testing/fixtures.go | 3 - .../v1/operations/testing/requests_test.go | 3 - .../v1/operations/urls.go | 3 - v3/ecl/managed_load_balancer/v1/plans/doc.go | 2 - .../v1/plans/requests.go | 3 - .../managed_load_balancer/v1/plans/results.go | 3 - .../v1/plans/testing/doc.go | 2 - .../v1/plans/testing/fixtures.go | 3 - .../v1/plans/testing/requests_test.go | 3 - v3/ecl/managed_load_balancer/v1/plans/urls.go | 3 - .../managed_load_balancer/v1/policies/doc.go | 2 - .../v1/policies/requests.go | 3 - .../v1/policies/results.go | 3 - .../v1/policies/testing/doc.go | 2 - .../v1/policies/testing/fixtures.go | 3 - .../v1/policies/testing/requests_test.go | 3 - .../managed_load_balancer/v1/policies/urls.go | 3 - v3/ecl/managed_load_balancer/v1/routes/doc.go | 2 - .../v1/routes/requests.go | 3 - .../v1/routes/results.go | 3 - .../v1/routes/testing/doc.go | 2 - .../v1/routes/testing/fixtures.go | 3 - .../v1/routes/testing/requests_test.go | 3 - .../managed_load_balancer/v1/routes/urls.go | 3 - v3/ecl/managed_load_balancer/v1/rules/doc.go | 2 - .../v1/rules/requests.go | 3 - .../managed_load_balancer/v1/rules/results.go | 3 - .../v1/rules/testing/doc.go | 2 - .../v1/rules/testing/fixtures.go | 3 - .../v1/rules/testing/requests_test.go | 3 - v3/ecl/managed_load_balancer/v1/rules/urls.go | 3 - .../v1/system_updates/doc.go | 2 - .../v1/system_updates/requests.go | 3 - .../v1/system_updates/results.go | 3 - .../v1/system_updates/testing/doc.go | 2 - .../v1/system_updates/testing/fixtures.go | 3 - .../system_updates/testing/requests_test.go | 3 - .../v1/system_updates/urls.go | 3 - .../v1/target_groups/doc.go | 2 - .../v1/target_groups/requests.go | 3 - .../v1/target_groups/results.go | 3 - .../v1/target_groups/testing/doc.go | 2 - .../v1/target_groups/testing/fixtures.go | 3 - .../v1/target_groups/testing/requests_test.go | 3 - .../v1/target_groups/urls.go | 3 - .../v1/tls_policies/doc.go | 2 - .../v1/tls_policies/requests.go | 3 - .../v1/tls_policies/results.go | 3 - .../v1/tls_policies/testing/doc.go | 2 - .../v1/tls_policies/testing/fixtures.go | 3 - .../v1/tls_policies/testing/requests_test.go | 3 - .../v1/tls_policies/urls.go | 3 - v3/go.mod | 3 + 170 files changed, 222 insertions(+), 525 deletions(-) create mode 100644 v3/go.mod diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d570b53..f6249d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ jobs: test: strategy: matrix: - go-version: [1.12.x, 1.13.x] + go-version: [1.17.x, 1.18.x] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} diff --git a/v2/ecl/managed_load_balancer/v1/certificates/doc.go b/v2/ecl/managed_load_balancer/v1/certificates/doc.go index a0cd9ff..02633bc 100644 --- a/v2/ecl/managed_load_balancer/v1/certificates/doc.go +++ b/v2/ecl/managed_load_balancer/v1/certificates/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package certificates contains functionality for working with ECL Managed Load Balancer resources. Example to list certificates diff --git a/v2/ecl/managed_load_balancer/v1/certificates/requests.go b/v2/ecl/managed_load_balancer/v1/certificates/requests.go index ff6d055..dd5946c 100644 --- a/v2/ecl/managed_load_balancer/v1/certificates/requests.go +++ b/v2/ecl/managed_load_balancer/v1/certificates/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package certificates import ( diff --git a/v2/ecl/managed_load_balancer/v1/certificates/results.go b/v2/ecl/managed_load_balancer/v1/certificates/results.go index 5e1a11a..2d3170a 100644 --- a/v2/ecl/managed_load_balancer/v1/certificates/results.go +++ b/v2/ecl/managed_load_balancer/v1/certificates/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package certificates import ( diff --git a/v2/ecl/managed_load_balancer/v1/certificates/testing/doc.go b/v2/ecl/managed_load_balancer/v1/certificates/testing/doc.go index a8c237c..5f40172 100644 --- a/v2/ecl/managed_load_balancer/v1/certificates/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/certificates/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains certificate unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/certificates/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/certificates/testing/fixtures.go index fe49f87..aa565e7 100644 --- a/v2/ecl/managed_load_balancer/v1/certificates/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/certificates/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/certificates/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/certificates/testing/requests_test.go index 6e1c891..b46bcbe 100644 --- a/v2/ecl/managed_load_balancer/v1/certificates/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/certificates/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/certificates/urls.go b/v2/ecl/managed_load_balancer/v1/certificates/urls.go index e2e21a4..874706b 100644 --- a/v2/ecl/managed_load_balancer/v1/certificates/urls.go +++ b/v2/ecl/managed_load_balancer/v1/certificates/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package certificates import ( diff --git a/v2/ecl/managed_load_balancer/v1/health_monitors/doc.go b/v2/ecl/managed_load_balancer/v1/health_monitors/doc.go index b7cfae6..8fb714c 100644 --- a/v2/ecl/managed_load_balancer/v1/health_monitors/doc.go +++ b/v2/ecl/managed_load_balancer/v1/health_monitors/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package health_monitors contains functionality for working with ECL Managed Load Balancer resources. Example to list health monitors diff --git a/v2/ecl/managed_load_balancer/v1/health_monitors/requests.go b/v2/ecl/managed_load_balancer/v1/health_monitors/requests.go index 39a33da..1992ae7 100644 --- a/v2/ecl/managed_load_balancer/v1/health_monitors/requests.go +++ b/v2/ecl/managed_load_balancer/v1/health_monitors/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package health_monitors import ( diff --git a/v2/ecl/managed_load_balancer/v1/health_monitors/results.go b/v2/ecl/managed_load_balancer/v1/health_monitors/results.go index 12af174..fc1b20f 100644 --- a/v2/ecl/managed_load_balancer/v1/health_monitors/results.go +++ b/v2/ecl/managed_load_balancer/v1/health_monitors/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package health_monitors import ( diff --git a/v2/ecl/managed_load_balancer/v1/health_monitors/testing/doc.go b/v2/ecl/managed_load_balancer/v1/health_monitors/testing/doc.go index cbb468d..a6f96d0 100644 --- a/v2/ecl/managed_load_balancer/v1/health_monitors/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/health_monitors/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains health monitor unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/health_monitors/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/health_monitors/testing/fixtures.go index 6b6a2aa..77df7cf 100644 --- a/v2/ecl/managed_load_balancer/v1/health_monitors/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/health_monitors/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/health_monitors/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/health_monitors/testing/requests_test.go index eb74197..1a89c2c 100644 --- a/v2/ecl/managed_load_balancer/v1/health_monitors/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/health_monitors/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/health_monitors/urls.go b/v2/ecl/managed_load_balancer/v1/health_monitors/urls.go index 106294e..c3a2c6f 100644 --- a/v2/ecl/managed_load_balancer/v1/health_monitors/urls.go +++ b/v2/ecl/managed_load_balancer/v1/health_monitors/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package health_monitors import ( diff --git a/v2/ecl/managed_load_balancer/v1/listeners/doc.go b/v2/ecl/managed_load_balancer/v1/listeners/doc.go index 3ac6c46..7682c62 100644 --- a/v2/ecl/managed_load_balancer/v1/listeners/doc.go +++ b/v2/ecl/managed_load_balancer/v1/listeners/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package listeners contains functionality for working with ECL Managed Load Balancer resources. Example to list listeners diff --git a/v2/ecl/managed_load_balancer/v1/listeners/requests.go b/v2/ecl/managed_load_balancer/v1/listeners/requests.go index 7be82b0..17201f3 100644 --- a/v2/ecl/managed_load_balancer/v1/listeners/requests.go +++ b/v2/ecl/managed_load_balancer/v1/listeners/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package listeners import ( diff --git a/v2/ecl/managed_load_balancer/v1/listeners/results.go b/v2/ecl/managed_load_balancer/v1/listeners/results.go index 9ac1068..5fa0657 100644 --- a/v2/ecl/managed_load_balancer/v1/listeners/results.go +++ b/v2/ecl/managed_load_balancer/v1/listeners/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package listeners import ( diff --git a/v2/ecl/managed_load_balancer/v1/listeners/testing/doc.go b/v2/ecl/managed_load_balancer/v1/listeners/testing/doc.go index 4be88a5..58b8f72 100644 --- a/v2/ecl/managed_load_balancer/v1/listeners/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/listeners/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains listener unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/listeners/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/listeners/testing/fixtures.go index 726dbb7..e5c832d 100644 --- a/v2/ecl/managed_load_balancer/v1/listeners/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/listeners/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/listeners/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/listeners/testing/requests_test.go index ce774c2..9afce17 100644 --- a/v2/ecl/managed_load_balancer/v1/listeners/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/listeners/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/listeners/urls.go b/v2/ecl/managed_load_balancer/v1/listeners/urls.go index c2aeed0..6e3e4ca 100644 --- a/v2/ecl/managed_load_balancer/v1/listeners/urls.go +++ b/v2/ecl/managed_load_balancer/v1/listeners/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package listeners import ( diff --git a/v2/ecl/managed_load_balancer/v1/load_balancers/doc.go b/v2/ecl/managed_load_balancer/v1/load_balancers/doc.go index 5c14377..2d40e69 100644 --- a/v2/ecl/managed_load_balancer/v1/load_balancers/doc.go +++ b/v2/ecl/managed_load_balancer/v1/load_balancers/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package load_balancers contains functionality for working with ECL Managed Load Balancer resources. Example to list load balancers @@ -117,20 +115,43 @@ Example to delete a load balancer Example to perform apply-configurations action on a load balancer + actionOpts := load_balancers.ActionOpts{ + ApplyConfigurations: true, + } + id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" - err := load_balancers.ApplyConfigurations(managedLoadBalancerClient, id).ExtractErr() + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() if err != nil { panic(err) } Example to perform system-update action on a load balancer - systemUpdateOpts := load_balancers.SystemUpdateOpts{ + systemUpdate := load_balancers.ActionOptsSystemUpdate{ + SystemUpdateID: "31746df7-92f9-4b5e-ad05-59f6684a54eb", + } + actionOpts := load_balancers.ActionOpts{ + SystemUpdate: &systemUpdate, + } + + id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() + if err != nil { + panic(err) + } + +Example to perform apply-configurations and system-update action on a load balancer + + systemUpdate := load_balancers.ActionOptsSystemUpdate{ SystemUpdateID: "31746df7-92f9-4b5e-ad05-59f6684a54eb", } + actionOpts := load_balancers.ActionOpts{ + ApplyConfigurations: true, + SystemUpdate: &systemUpdate, + } id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" - err := load_balancers.SystemUpdate(managedLoadBalancerClient, id, systemUpdateOpts).ExtractErr() + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() if err != nil { panic(err) } diff --git a/v2/ecl/managed_load_balancer/v1/load_balancers/requests.go b/v2/ecl/managed_load_balancer/v1/load_balancers/requests.go index 0c70e37..6809ae8 100644 --- a/v2/ecl/managed_load_balancer/v1/load_balancers/requests.go +++ b/v2/ecl/managed_load_balancer/v1/load_balancers/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package load_balancers import ( @@ -302,42 +299,49 @@ func Delete(c *eclcloud.ServiceClient, id string) (r DeleteResult) { Action Load Balancer */ -// ApplyConfigurations performs action on a existing load balancer. -func ApplyConfigurations(c *eclcloud.ServiceClient, id string) (r ActionResult) { - b := map[string]interface{}{"apply-configurations": nil} - _, r.Err = c.Post(actionURL(c, id), b, nil, &eclcloud.RequestOpts{ - OkCodes: []int{204}, - }) - - return -} - -// SystemUpdateOpts represents options used to perform action on a existing load balancer. -type SystemUpdateOpts struct { +// ActionOptsSystemUpdate represents system-update information in the load balancer action. +type ActionOptsSystemUpdate struct { // - ID of the system update that will be applied to the load balancer SystemUpdateID string `json:"system_update_id"` } -// ToLoadBalancerSystemUpdateMap builds a request body from SystemUpdateOpts. -func (opts SystemUpdateOpts) ToLoadBalancerSystemUpdateMap() (map[string]interface{}, error) { - return eclcloud.BuildRequestBody(opts, "system-update") -} +// ActionOpts represents options used to perform action on a existing load balancer. +type ActionOpts struct { + + // - Added or changed configurations of the load balancer and related resources will be applied + ApplyConfigurations bool `json:"apply-configurations,omitempty"` -// SystemUpdateOptsBuilder allows extensions to add additional parameters to the SystemUpdate request. -type SystemUpdateOptsBuilder interface { - ToLoadBalancerSystemUpdateMap() (map[string]interface{}, error) + // - Apply the system update to the load balancer + SystemUpdate *ActionOptsSystemUpdate `json:"system-update,omitempty"` } -// SystemUpdate accepts a SystemUpdateOpts struct and performs action on a existing load balancer using the values provided. -func SystemUpdate(c *eclcloud.ServiceClient, id string, opts SystemUpdateOptsBuilder) (r ActionResult) { - b, err := opts.ToLoadBalancerSystemUpdateMap() - if err != nil { - r.Err = err +// ToLoadBalancerActionMap builds a request body from ActionOpts. +func (opts ActionOpts) ToLoadBalancerActionMap() map[string]interface{} { + optsMap := make(map[string]interface{}) - return + if opts.ApplyConfigurations { + optsMap["apply-configurations"] = nil + } + + if opts.SystemUpdate != nil { + optsMap["system-update"] = map[string]interface{}{ + "system_update_id": opts.SystemUpdate.SystemUpdateID, + } } + return optsMap +} + +// ActionOptsBuilder allows extensions to add additional parameters to the Action request. +type ActionOptsBuilder interface { + ToLoadBalancerActionMap() map[string]interface{} +} + +// Action accepts a ActionOpts struct and performs action on a existing load balancer using the values provided. +func Action(c *eclcloud.ServiceClient, id string, opts ActionOptsBuilder) (r ActionResult) { + b := opts.ToLoadBalancerActionMap() + _, r.Err = c.Post(actionURL(c, id), b, nil, &eclcloud.RequestOpts{ OkCodes: []int{204}, }) diff --git a/v2/ecl/managed_load_balancer/v1/load_balancers/results.go b/v2/ecl/managed_load_balancer/v1/load_balancers/results.go index e3679b7..aa34a4e 100644 --- a/v2/ecl/managed_load_balancer/v1/load_balancers/results.go +++ b/v2/ecl/managed_load_balancer/v1/load_balancers/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package load_balancers import ( diff --git a/v2/ecl/managed_load_balancer/v1/load_balancers/testing/doc.go b/v2/ecl/managed_load_balancer/v1/load_balancers/testing/doc.go index e5950a2..6963c4a 100644 --- a/v2/ecl/managed_load_balancer/v1/load_balancers/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/load_balancers/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains load balancer unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/load_balancers/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/load_balancers/testing/fixtures.go index 5b96203..64539b6 100644 --- a/v2/ecl/managed_load_balancer/v1/load_balancers/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/load_balancers/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( @@ -418,18 +415,26 @@ var applyConfigurationsRequest = fmt.Sprintf(` "apply-configurations": null }`) -var cancelConfigurationsRequest = fmt.Sprintf(` +var systemUpdateRequest = fmt.Sprintf(` { - "cancel-configurations": null + "system-update": { + "system_update_id": "31746df7-92f9-4b5e-ad05-59f6684a54eb" + } }`) -var systemUpdateRequest = fmt.Sprintf(` +var applyConfigurationsAndSystemUpdateRequest = fmt.Sprintf(` { + "apply-configurations": null, "system-update": { "system_update_id": "31746df7-92f9-4b5e-ad05-59f6684a54eb" } }`) +var cancelConfigurationsRequest = fmt.Sprintf(` +{ + "cancel-configurations": null +}`) + var createStagedRequest = fmt.Sprintf(` { "load_balancer": { diff --git a/v2/ecl/managed_load_balancer/v1/load_balancers/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/load_balancers/testing/requests_test.go index e94eae3..22cf066 100644 --- a/v2/ecl/managed_load_balancer/v1/load_balancers/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/load_balancers/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( @@ -233,7 +230,10 @@ func TestApplyConfigurationsLoadBalancer(t *testing.T) { }) cli := ServiceClient() - err := load_balancers.ApplyConfigurations(cli, id).ExtractErr() + actionOpts := load_balancers.ActionOpts{ + ApplyConfigurations: true, + } + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() th.AssertNoErr(t, err) } @@ -256,11 +256,45 @@ func TestSystemUpdateLoadBalancer(t *testing.T) { }) cli := ServiceClient() - systemUpdateOpts := load_balancers.SystemUpdateOpts{ + systemUpdate := load_balancers.ActionOptsSystemUpdate{ + SystemUpdateID: "31746df7-92f9-4b5e-ad05-59f6684a54eb", + } + actionOpts := load_balancers.ActionOpts{ + SystemUpdate: &systemUpdate, + } + + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() + + th.AssertNoErr(t, err) +} + +func TestApplyConfigurationsAndSystemUpdateLoadBalancer(t *testing.T) { + th.SetupHTTP() + defer th.TeardownHTTP() + + th.Mux.HandleFunc( + fmt.Sprintf("/v1.0/load_balancers/%s/action", id), + func(w http.ResponseWriter, r *http.Request) { + th.TestMethod(t, r, "POST") + th.TestHeader(t, r, "X-Auth-Token", TokenID) + th.TestHeader(t, r, "Content-Type", "application/json") + th.TestHeader(t, r, "Accept", "application/json") + th.TestJSONRequest(t, r, applyConfigurationsAndSystemUpdateRequest) + + w.Header().Add("Content-Type", "application/json") + w.WriteHeader(http.StatusNoContent) + }) + + cli := ServiceClient() + systemUpdate := load_balancers.ActionOptsSystemUpdate{ SystemUpdateID: "31746df7-92f9-4b5e-ad05-59f6684a54eb", } + actionOpts := load_balancers.ActionOpts{ + ApplyConfigurations: true, + SystemUpdate: &systemUpdate, + } - err := load_balancers.SystemUpdate(cli, id, systemUpdateOpts).ExtractErr() + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() th.AssertNoErr(t, err) } diff --git a/v2/ecl/managed_load_balancer/v1/load_balancers/urls.go b/v2/ecl/managed_load_balancer/v1/load_balancers/urls.go index 8a12ce1..361bd43 100644 --- a/v2/ecl/managed_load_balancer/v1/load_balancers/urls.go +++ b/v2/ecl/managed_load_balancer/v1/load_balancers/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package load_balancers import ( diff --git a/v2/ecl/managed_load_balancer/v1/operations/doc.go b/v2/ecl/managed_load_balancer/v1/operations/doc.go index 4527fd7..6eb28a6 100644 --- a/v2/ecl/managed_load_balancer/v1/operations/doc.go +++ b/v2/ecl/managed_load_balancer/v1/operations/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package operations contains functionality for working with ECL Managed Load Balancer resources. Example to list operations diff --git a/v2/ecl/managed_load_balancer/v1/operations/requests.go b/v2/ecl/managed_load_balancer/v1/operations/requests.go index c93f0d6..2c14855 100644 --- a/v2/ecl/managed_load_balancer/v1/operations/requests.go +++ b/v2/ecl/managed_load_balancer/v1/operations/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package operations import ( diff --git a/v2/ecl/managed_load_balancer/v1/operations/results.go b/v2/ecl/managed_load_balancer/v1/operations/results.go index 2865c01..0d50908 100644 --- a/v2/ecl/managed_load_balancer/v1/operations/results.go +++ b/v2/ecl/managed_load_balancer/v1/operations/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package operations import ( diff --git a/v2/ecl/managed_load_balancer/v1/operations/testing/doc.go b/v2/ecl/managed_load_balancer/v1/operations/testing/doc.go index 6d02e61..028cc81 100644 --- a/v2/ecl/managed_load_balancer/v1/operations/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/operations/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains operation unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/operations/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/operations/testing/fixtures.go index d1e66df..692063a 100644 --- a/v2/ecl/managed_load_balancer/v1/operations/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/operations/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/operations/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/operations/testing/requests_test.go index 9fafd9c..3a5d6f7 100644 --- a/v2/ecl/managed_load_balancer/v1/operations/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/operations/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/operations/urls.go b/v2/ecl/managed_load_balancer/v1/operations/urls.go index 5cdeb28..36c8f39 100644 --- a/v2/ecl/managed_load_balancer/v1/operations/urls.go +++ b/v2/ecl/managed_load_balancer/v1/operations/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package operations import ( diff --git a/v2/ecl/managed_load_balancer/v1/plans/doc.go b/v2/ecl/managed_load_balancer/v1/plans/doc.go index 0a3d9a4..c5710fb 100644 --- a/v2/ecl/managed_load_balancer/v1/plans/doc.go +++ b/v2/ecl/managed_load_balancer/v1/plans/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package plans contains functionality for working with ECL Managed Load Balancer resources. Example to list plans diff --git a/v2/ecl/managed_load_balancer/v1/plans/requests.go b/v2/ecl/managed_load_balancer/v1/plans/requests.go index ef8191f..4f4bf32 100644 --- a/v2/ecl/managed_load_balancer/v1/plans/requests.go +++ b/v2/ecl/managed_load_balancer/v1/plans/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package plans import ( diff --git a/v2/ecl/managed_load_balancer/v1/plans/results.go b/v2/ecl/managed_load_balancer/v1/plans/results.go index 12645e1..e1b6345 100644 --- a/v2/ecl/managed_load_balancer/v1/plans/results.go +++ b/v2/ecl/managed_load_balancer/v1/plans/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package plans import ( diff --git a/v2/ecl/managed_load_balancer/v1/plans/testing/doc.go b/v2/ecl/managed_load_balancer/v1/plans/testing/doc.go index bf8a876..ec2e1f0 100644 --- a/v2/ecl/managed_load_balancer/v1/plans/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/plans/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains plan unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/plans/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/plans/testing/fixtures.go index 17013ae..20389d6 100644 --- a/v2/ecl/managed_load_balancer/v1/plans/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/plans/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/plans/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/plans/testing/requests_test.go index 63b410d..67b7c8e 100644 --- a/v2/ecl/managed_load_balancer/v1/plans/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/plans/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/plans/urls.go b/v2/ecl/managed_load_balancer/v1/plans/urls.go index 2845e32..13c565e 100644 --- a/v2/ecl/managed_load_balancer/v1/plans/urls.go +++ b/v2/ecl/managed_load_balancer/v1/plans/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package plans import ( diff --git a/v2/ecl/managed_load_balancer/v1/policies/doc.go b/v2/ecl/managed_load_balancer/v1/policies/doc.go index 28e6272..a804c5d 100644 --- a/v2/ecl/managed_load_balancer/v1/policies/doc.go +++ b/v2/ecl/managed_load_balancer/v1/policies/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package policies contains functionality for working with ECL Managed Load Balancer resources. Example to list policies diff --git a/v2/ecl/managed_load_balancer/v1/policies/requests.go b/v2/ecl/managed_load_balancer/v1/policies/requests.go index a8e1634..1c61098 100644 --- a/v2/ecl/managed_load_balancer/v1/policies/requests.go +++ b/v2/ecl/managed_load_balancer/v1/policies/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package policies import ( diff --git a/v2/ecl/managed_load_balancer/v1/policies/results.go b/v2/ecl/managed_load_balancer/v1/policies/results.go index 7a345db..d7c8ca0 100644 --- a/v2/ecl/managed_load_balancer/v1/policies/results.go +++ b/v2/ecl/managed_load_balancer/v1/policies/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package policies import ( diff --git a/v2/ecl/managed_load_balancer/v1/policies/testing/doc.go b/v2/ecl/managed_load_balancer/v1/policies/testing/doc.go index 2c98547..1869ef3 100644 --- a/v2/ecl/managed_load_balancer/v1/policies/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/policies/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains policy unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/policies/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/policies/testing/fixtures.go index ad4dc1d..07acbae 100644 --- a/v2/ecl/managed_load_balancer/v1/policies/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/policies/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/policies/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/policies/testing/requests_test.go index 3f97b16..563840a 100644 --- a/v2/ecl/managed_load_balancer/v1/policies/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/policies/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/policies/urls.go b/v2/ecl/managed_load_balancer/v1/policies/urls.go index e5196a3..d169d78 100644 --- a/v2/ecl/managed_load_balancer/v1/policies/urls.go +++ b/v2/ecl/managed_load_balancer/v1/policies/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package policies import ( diff --git a/v2/ecl/managed_load_balancer/v1/routes/doc.go b/v2/ecl/managed_load_balancer/v1/routes/doc.go index 19f98e0..e6a5a70 100644 --- a/v2/ecl/managed_load_balancer/v1/routes/doc.go +++ b/v2/ecl/managed_load_balancer/v1/routes/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package routes contains functionality for working with ECL Managed Load Balancer resources. Example to list routes diff --git a/v2/ecl/managed_load_balancer/v1/routes/requests.go b/v2/ecl/managed_load_balancer/v1/routes/requests.go index 9a54be1..c2c746a 100644 --- a/v2/ecl/managed_load_balancer/v1/routes/requests.go +++ b/v2/ecl/managed_load_balancer/v1/routes/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package routes import ( diff --git a/v2/ecl/managed_load_balancer/v1/routes/results.go b/v2/ecl/managed_load_balancer/v1/routes/results.go index 1629b39..13e5be2 100644 --- a/v2/ecl/managed_load_balancer/v1/routes/results.go +++ b/v2/ecl/managed_load_balancer/v1/routes/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package routes import ( diff --git a/v2/ecl/managed_load_balancer/v1/routes/testing/doc.go b/v2/ecl/managed_load_balancer/v1/routes/testing/doc.go index 8c5574a..3bc14e7 100644 --- a/v2/ecl/managed_load_balancer/v1/routes/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/routes/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains route unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/routes/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/routes/testing/fixtures.go index bcebee0..bc3dc71 100644 --- a/v2/ecl/managed_load_balancer/v1/routes/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/routes/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/routes/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/routes/testing/requests_test.go index aecd50d..9cbf0c9 100644 --- a/v2/ecl/managed_load_balancer/v1/routes/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/routes/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/routes/urls.go b/v2/ecl/managed_load_balancer/v1/routes/urls.go index 0892a49..1f3fc6b 100644 --- a/v2/ecl/managed_load_balancer/v1/routes/urls.go +++ b/v2/ecl/managed_load_balancer/v1/routes/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package routes import ( diff --git a/v2/ecl/managed_load_balancer/v1/rules/doc.go b/v2/ecl/managed_load_balancer/v1/rules/doc.go index 2ecbb9c..1356c59 100644 --- a/v2/ecl/managed_load_balancer/v1/rules/doc.go +++ b/v2/ecl/managed_load_balancer/v1/rules/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package rules contains functionality for working with ECL Managed Load Balancer resources. Example to list rules diff --git a/v2/ecl/managed_load_balancer/v1/rules/requests.go b/v2/ecl/managed_load_balancer/v1/rules/requests.go index 3da2422..d465080 100644 --- a/v2/ecl/managed_load_balancer/v1/rules/requests.go +++ b/v2/ecl/managed_load_balancer/v1/rules/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package rules import ( diff --git a/v2/ecl/managed_load_balancer/v1/rules/results.go b/v2/ecl/managed_load_balancer/v1/rules/results.go index e151343..2dddb17 100644 --- a/v2/ecl/managed_load_balancer/v1/rules/results.go +++ b/v2/ecl/managed_load_balancer/v1/rules/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package rules import ( diff --git a/v2/ecl/managed_load_balancer/v1/rules/testing/doc.go b/v2/ecl/managed_load_balancer/v1/rules/testing/doc.go index aefba89..a4aa0e4 100644 --- a/v2/ecl/managed_load_balancer/v1/rules/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/rules/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains rule unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/rules/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/rules/testing/fixtures.go index 70fee53..6ef736e 100644 --- a/v2/ecl/managed_load_balancer/v1/rules/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/rules/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/rules/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/rules/testing/requests_test.go index 318aec7..0168a59 100644 --- a/v2/ecl/managed_load_balancer/v1/rules/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/rules/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/rules/urls.go b/v2/ecl/managed_load_balancer/v1/rules/urls.go index a85f927..dfc1edb 100644 --- a/v2/ecl/managed_load_balancer/v1/rules/urls.go +++ b/v2/ecl/managed_load_balancer/v1/rules/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package rules import ( diff --git a/v2/ecl/managed_load_balancer/v1/system_updates/doc.go b/v2/ecl/managed_load_balancer/v1/system_updates/doc.go index f055e0c..19bf8c2 100644 --- a/v2/ecl/managed_load_balancer/v1/system_updates/doc.go +++ b/v2/ecl/managed_load_balancer/v1/system_updates/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package system_updates contains functionality for working with ECL Managed Load Balancer resources. Example to list system updates diff --git a/v2/ecl/managed_load_balancer/v1/system_updates/requests.go b/v2/ecl/managed_load_balancer/v1/system_updates/requests.go index 9c7174e..caea0bf 100644 --- a/v2/ecl/managed_load_balancer/v1/system_updates/requests.go +++ b/v2/ecl/managed_load_balancer/v1/system_updates/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package system_updates import ( diff --git a/v2/ecl/managed_load_balancer/v1/system_updates/results.go b/v2/ecl/managed_load_balancer/v1/system_updates/results.go index fc8d7c1..d6ca5d2 100644 --- a/v2/ecl/managed_load_balancer/v1/system_updates/results.go +++ b/v2/ecl/managed_load_balancer/v1/system_updates/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package system_updates import ( diff --git a/v2/ecl/managed_load_balancer/v1/system_updates/testing/doc.go b/v2/ecl/managed_load_balancer/v1/system_updates/testing/doc.go index 7ba856e..94b14f9 100644 --- a/v2/ecl/managed_load_balancer/v1/system_updates/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/system_updates/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains system update unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/system_updates/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/system_updates/testing/fixtures.go index a473bfb..bdfb572 100644 --- a/v2/ecl/managed_load_balancer/v1/system_updates/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/system_updates/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/system_updates/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/system_updates/testing/requests_test.go index aa54a06..0f5a479 100644 --- a/v2/ecl/managed_load_balancer/v1/system_updates/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/system_updates/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/system_updates/urls.go b/v2/ecl/managed_load_balancer/v1/system_updates/urls.go index 9cd4075..ea52a04 100644 --- a/v2/ecl/managed_load_balancer/v1/system_updates/urls.go +++ b/v2/ecl/managed_load_balancer/v1/system_updates/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package system_updates import ( diff --git a/v2/ecl/managed_load_balancer/v1/target_groups/doc.go b/v2/ecl/managed_load_balancer/v1/target_groups/doc.go index de5ceab..bc9f526 100644 --- a/v2/ecl/managed_load_balancer/v1/target_groups/doc.go +++ b/v2/ecl/managed_load_balancer/v1/target_groups/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package target_groups contains functionality for working with ECL Managed Load Balancer resources. Example to list target groups diff --git a/v2/ecl/managed_load_balancer/v1/target_groups/requests.go b/v2/ecl/managed_load_balancer/v1/target_groups/requests.go index 4287195..3ae6ecd 100644 --- a/v2/ecl/managed_load_balancer/v1/target_groups/requests.go +++ b/v2/ecl/managed_load_balancer/v1/target_groups/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package target_groups import ( diff --git a/v2/ecl/managed_load_balancer/v1/target_groups/results.go b/v2/ecl/managed_load_balancer/v1/target_groups/results.go index 1c964c4..421b4df 100644 --- a/v2/ecl/managed_load_balancer/v1/target_groups/results.go +++ b/v2/ecl/managed_load_balancer/v1/target_groups/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package target_groups import ( diff --git a/v2/ecl/managed_load_balancer/v1/target_groups/testing/doc.go b/v2/ecl/managed_load_balancer/v1/target_groups/testing/doc.go index b3db35c..8f80820 100644 --- a/v2/ecl/managed_load_balancer/v1/target_groups/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/target_groups/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains target group unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/target_groups/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/target_groups/testing/fixtures.go index 2787d02..f49934a 100644 --- a/v2/ecl/managed_load_balancer/v1/target_groups/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/target_groups/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/target_groups/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/target_groups/testing/requests_test.go index d06a8e0..97b3525 100644 --- a/v2/ecl/managed_load_balancer/v1/target_groups/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/target_groups/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/target_groups/urls.go b/v2/ecl/managed_load_balancer/v1/target_groups/urls.go index 8776912..a93301c 100644 --- a/v2/ecl/managed_load_balancer/v1/target_groups/urls.go +++ b/v2/ecl/managed_load_balancer/v1/target_groups/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package target_groups import ( diff --git a/v2/ecl/managed_load_balancer/v1/tls_policies/doc.go b/v2/ecl/managed_load_balancer/v1/tls_policies/doc.go index 8ba1a3f..f861a87 100644 --- a/v2/ecl/managed_load_balancer/v1/tls_policies/doc.go +++ b/v2/ecl/managed_load_balancer/v1/tls_policies/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package tls_policies contains functionality for working with ECL Managed Load Balancer resources. Example to list tls policies diff --git a/v2/ecl/managed_load_balancer/v1/tls_policies/requests.go b/v2/ecl/managed_load_balancer/v1/tls_policies/requests.go index 95a3125..35fb275 100644 --- a/v2/ecl/managed_load_balancer/v1/tls_policies/requests.go +++ b/v2/ecl/managed_load_balancer/v1/tls_policies/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package tls_policies import ( diff --git a/v2/ecl/managed_load_balancer/v1/tls_policies/results.go b/v2/ecl/managed_load_balancer/v1/tls_policies/results.go index 2ccd1c5..6ef0c35 100644 --- a/v2/ecl/managed_load_balancer/v1/tls_policies/results.go +++ b/v2/ecl/managed_load_balancer/v1/tls_policies/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package tls_policies import ( diff --git a/v2/ecl/managed_load_balancer/v1/tls_policies/testing/doc.go b/v2/ecl/managed_load_balancer/v1/tls_policies/testing/doc.go index af8bf7d..f7de45c 100644 --- a/v2/ecl/managed_load_balancer/v1/tls_policies/testing/doc.go +++ b/v2/ecl/managed_load_balancer/v1/tls_policies/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains tls policy unit tests */ package testing diff --git a/v2/ecl/managed_load_balancer/v1/tls_policies/testing/fixtures.go b/v2/ecl/managed_load_balancer/v1/tls_policies/testing/fixtures.go index b177e51..b43e4d8 100644 --- a/v2/ecl/managed_load_balancer/v1/tls_policies/testing/fixtures.go +++ b/v2/ecl/managed_load_balancer/v1/tls_policies/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/tls_policies/testing/requests_test.go b/v2/ecl/managed_load_balancer/v1/tls_policies/testing/requests_test.go index 137294f..0679e74 100644 --- a/v2/ecl/managed_load_balancer/v1/tls_policies/testing/requests_test.go +++ b/v2/ecl/managed_load_balancer/v1/tls_policies/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v2/ecl/managed_load_balancer/v1/tls_policies/urls.go b/v2/ecl/managed_load_balancer/v1/tls_policies/urls.go index 05890ce..1b55751 100644 --- a/v2/ecl/managed_load_balancer/v1/tls_policies/urls.go +++ b/v2/ecl/managed_load_balancer/v1/tls_policies/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package tls_policies import ( diff --git a/v3/ecl/managed_load_balancer/v1/certificates/doc.go b/v3/ecl/managed_load_balancer/v1/certificates/doc.go index a0cd9ff..02633bc 100644 --- a/v3/ecl/managed_load_balancer/v1/certificates/doc.go +++ b/v3/ecl/managed_load_balancer/v1/certificates/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package certificates contains functionality for working with ECL Managed Load Balancer resources. Example to list certificates diff --git a/v3/ecl/managed_load_balancer/v1/certificates/requests.go b/v3/ecl/managed_load_balancer/v1/certificates/requests.go index 01a34b4..39a3149 100644 --- a/v3/ecl/managed_load_balancer/v1/certificates/requests.go +++ b/v3/ecl/managed_load_balancer/v1/certificates/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package certificates import ( diff --git a/v3/ecl/managed_load_balancer/v1/certificates/results.go b/v3/ecl/managed_load_balancer/v1/certificates/results.go index 2368572..3d8caee 100644 --- a/v3/ecl/managed_load_balancer/v1/certificates/results.go +++ b/v3/ecl/managed_load_balancer/v1/certificates/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package certificates import ( diff --git a/v3/ecl/managed_load_balancer/v1/certificates/testing/doc.go b/v3/ecl/managed_load_balancer/v1/certificates/testing/doc.go index a8c237c..5f40172 100644 --- a/v3/ecl/managed_load_balancer/v1/certificates/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/certificates/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains certificate unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/certificates/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/certificates/testing/fixtures.go index a4e60b8..e994a2a 100644 --- a/v3/ecl/managed_load_balancer/v1/certificates/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/certificates/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/certificates/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/certificates/testing/requests_test.go index 7dd34ac..9f474bc 100644 --- a/v3/ecl/managed_load_balancer/v1/certificates/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/certificates/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/certificates/urls.go b/v3/ecl/managed_load_balancer/v1/certificates/urls.go index 630c777..809aca5 100644 --- a/v3/ecl/managed_load_balancer/v1/certificates/urls.go +++ b/v3/ecl/managed_load_balancer/v1/certificates/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package certificates import ( diff --git a/v3/ecl/managed_load_balancer/v1/health_monitors/doc.go b/v3/ecl/managed_load_balancer/v1/health_monitors/doc.go index b7cfae6..8fb714c 100644 --- a/v3/ecl/managed_load_balancer/v1/health_monitors/doc.go +++ b/v3/ecl/managed_load_balancer/v1/health_monitors/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package health_monitors contains functionality for working with ECL Managed Load Balancer resources. Example to list health monitors diff --git a/v3/ecl/managed_load_balancer/v1/health_monitors/requests.go b/v3/ecl/managed_load_balancer/v1/health_monitors/requests.go index 74c475f..f8aa36b 100644 --- a/v3/ecl/managed_load_balancer/v1/health_monitors/requests.go +++ b/v3/ecl/managed_load_balancer/v1/health_monitors/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package health_monitors import ( diff --git a/v3/ecl/managed_load_balancer/v1/health_monitors/results.go b/v3/ecl/managed_load_balancer/v1/health_monitors/results.go index d89a301..782e07a 100644 --- a/v3/ecl/managed_load_balancer/v1/health_monitors/results.go +++ b/v3/ecl/managed_load_balancer/v1/health_monitors/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package health_monitors import ( diff --git a/v3/ecl/managed_load_balancer/v1/health_monitors/testing/doc.go b/v3/ecl/managed_load_balancer/v1/health_monitors/testing/doc.go index cbb468d..a6f96d0 100644 --- a/v3/ecl/managed_load_balancer/v1/health_monitors/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/health_monitors/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains health monitor unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/health_monitors/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/health_monitors/testing/fixtures.go index 35740f1..b87c030 100644 --- a/v3/ecl/managed_load_balancer/v1/health_monitors/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/health_monitors/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/health_monitors/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/health_monitors/testing/requests_test.go index 7dc3901..2620007 100644 --- a/v3/ecl/managed_load_balancer/v1/health_monitors/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/health_monitors/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/health_monitors/urls.go b/v3/ecl/managed_load_balancer/v1/health_monitors/urls.go index 63444ca..18f7b86 100644 --- a/v3/ecl/managed_load_balancer/v1/health_monitors/urls.go +++ b/v3/ecl/managed_load_balancer/v1/health_monitors/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package health_monitors import ( diff --git a/v3/ecl/managed_load_balancer/v1/listeners/doc.go b/v3/ecl/managed_load_balancer/v1/listeners/doc.go index 3ac6c46..7682c62 100644 --- a/v3/ecl/managed_load_balancer/v1/listeners/doc.go +++ b/v3/ecl/managed_load_balancer/v1/listeners/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package listeners contains functionality for working with ECL Managed Load Balancer resources. Example to list listeners diff --git a/v3/ecl/managed_load_balancer/v1/listeners/requests.go b/v3/ecl/managed_load_balancer/v1/listeners/requests.go index 193d212..8b89884 100644 --- a/v3/ecl/managed_load_balancer/v1/listeners/requests.go +++ b/v3/ecl/managed_load_balancer/v1/listeners/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package listeners import ( diff --git a/v3/ecl/managed_load_balancer/v1/listeners/results.go b/v3/ecl/managed_load_balancer/v1/listeners/results.go index 2b27ee1..f47e746 100644 --- a/v3/ecl/managed_load_balancer/v1/listeners/results.go +++ b/v3/ecl/managed_load_balancer/v1/listeners/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package listeners import ( diff --git a/v3/ecl/managed_load_balancer/v1/listeners/testing/doc.go b/v3/ecl/managed_load_balancer/v1/listeners/testing/doc.go index 4be88a5..58b8f72 100644 --- a/v3/ecl/managed_load_balancer/v1/listeners/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/listeners/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains listener unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/listeners/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/listeners/testing/fixtures.go index c506315..fec1710 100644 --- a/v3/ecl/managed_load_balancer/v1/listeners/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/listeners/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/listeners/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/listeners/testing/requests_test.go index ab14ee6..5a55b8d 100644 --- a/v3/ecl/managed_load_balancer/v1/listeners/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/listeners/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/listeners/urls.go b/v3/ecl/managed_load_balancer/v1/listeners/urls.go index e7ad4e2..41e95c5 100644 --- a/v3/ecl/managed_load_balancer/v1/listeners/urls.go +++ b/v3/ecl/managed_load_balancer/v1/listeners/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package listeners import ( diff --git a/v3/ecl/managed_load_balancer/v1/load_balancers/doc.go b/v3/ecl/managed_load_balancer/v1/load_balancers/doc.go index 5c14377..2d40e69 100644 --- a/v3/ecl/managed_load_balancer/v1/load_balancers/doc.go +++ b/v3/ecl/managed_load_balancer/v1/load_balancers/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package load_balancers contains functionality for working with ECL Managed Load Balancer resources. Example to list load balancers @@ -117,20 +115,43 @@ Example to delete a load balancer Example to perform apply-configurations action on a load balancer + actionOpts := load_balancers.ActionOpts{ + ApplyConfigurations: true, + } + id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" - err := load_balancers.ApplyConfigurations(managedLoadBalancerClient, id).ExtractErr() + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() if err != nil { panic(err) } Example to perform system-update action on a load balancer - systemUpdateOpts := load_balancers.SystemUpdateOpts{ + systemUpdate := load_balancers.ActionOptsSystemUpdate{ + SystemUpdateID: "31746df7-92f9-4b5e-ad05-59f6684a54eb", + } + actionOpts := load_balancers.ActionOpts{ + SystemUpdate: &systemUpdate, + } + + id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() + if err != nil { + panic(err) + } + +Example to perform apply-configurations and system-update action on a load balancer + + systemUpdate := load_balancers.ActionOptsSystemUpdate{ SystemUpdateID: "31746df7-92f9-4b5e-ad05-59f6684a54eb", } + actionOpts := load_balancers.ActionOpts{ + ApplyConfigurations: true, + SystemUpdate: &systemUpdate, + } id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" - err := load_balancers.SystemUpdate(managedLoadBalancerClient, id, systemUpdateOpts).ExtractErr() + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() if err != nil { panic(err) } diff --git a/v3/ecl/managed_load_balancer/v1/load_balancers/requests.go b/v3/ecl/managed_load_balancer/v1/load_balancers/requests.go index cda93f5..1ec49cd 100644 --- a/v3/ecl/managed_load_balancer/v1/load_balancers/requests.go +++ b/v3/ecl/managed_load_balancer/v1/load_balancers/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package load_balancers import ( @@ -302,42 +299,49 @@ func Delete(c *eclcloud.ServiceClient, id string) (r DeleteResult) { Action Load Balancer */ -// ApplyConfigurations performs action on a existing load balancer. -func ApplyConfigurations(c *eclcloud.ServiceClient, id string) (r ActionResult) { - b := map[string]interface{}{"apply-configurations": nil} - _, r.Err = c.Post(actionURL(c, id), b, nil, &eclcloud.RequestOpts{ - OkCodes: []int{204}, - }) - - return -} - -// SystemUpdateOpts represents options used to perform action on a existing load balancer. -type SystemUpdateOpts struct { +// ActionOptsSystemUpdate represents system-update information in the load balancer action. +type ActionOptsSystemUpdate struct { // - ID of the system update that will be applied to the load balancer SystemUpdateID string `json:"system_update_id"` } -// ToLoadBalancerSystemUpdateMap builds a request body from SystemUpdateOpts. -func (opts SystemUpdateOpts) ToLoadBalancerSystemUpdateMap() (map[string]interface{}, error) { - return eclcloud.BuildRequestBody(opts, "system-update") -} +// ActionOpts represents options used to perform action on a existing load balancer. +type ActionOpts struct { + + // - Added or changed configurations of the load balancer and related resources will be applied + ApplyConfigurations bool `json:"apply-configurations,omitempty"` -// SystemUpdateOptsBuilder allows extensions to add additional parameters to the SystemUpdate request. -type SystemUpdateOptsBuilder interface { - ToLoadBalancerSystemUpdateMap() (map[string]interface{}, error) + // - Apply the system update to the load balancer + SystemUpdate *ActionOptsSystemUpdate `json:"system-update,omitempty"` } -// SystemUpdate accepts a SystemUpdateOpts struct and performs action on a existing load balancer using the values provided. -func SystemUpdate(c *eclcloud.ServiceClient, id string, opts SystemUpdateOptsBuilder) (r ActionResult) { - b, err := opts.ToLoadBalancerSystemUpdateMap() - if err != nil { - r.Err = err +// ToLoadBalancerActionMap builds a request body from ActionOpts. +func (opts ActionOpts) ToLoadBalancerActionMap() map[string]interface{} { + optsMap := make(map[string]interface{}) - return + if opts.ApplyConfigurations { + optsMap["apply-configurations"] = nil + } + + if opts.SystemUpdate != nil { + optsMap["system-update"] = map[string]interface{}{ + "system_update_id": opts.SystemUpdate.SystemUpdateID, + } } + return optsMap +} + +// ActionOptsBuilder allows extensions to add additional parameters to the Action request. +type ActionOptsBuilder interface { + ToLoadBalancerActionMap() map[string]interface{} +} + +// Action accepts a ActionOpts struct and performs action on a existing load balancer using the values provided. +func Action(c *eclcloud.ServiceClient, id string, opts ActionOptsBuilder) (r ActionResult) { + b := opts.ToLoadBalancerActionMap() + _, r.Err = c.Post(actionURL(c, id), b, nil, &eclcloud.RequestOpts{ OkCodes: []int{204}, }) diff --git a/v3/ecl/managed_load_balancer/v1/load_balancers/results.go b/v3/ecl/managed_load_balancer/v1/load_balancers/results.go index 8a2afcd..c74315e 100644 --- a/v3/ecl/managed_load_balancer/v1/load_balancers/results.go +++ b/v3/ecl/managed_load_balancer/v1/load_balancers/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package load_balancers import ( diff --git a/v3/ecl/managed_load_balancer/v1/load_balancers/testing/doc.go b/v3/ecl/managed_load_balancer/v1/load_balancers/testing/doc.go index e5950a2..6963c4a 100644 --- a/v3/ecl/managed_load_balancer/v1/load_balancers/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/load_balancers/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains load balancer unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/load_balancers/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/load_balancers/testing/fixtures.go index 8ed0248..f86a90a 100644 --- a/v3/ecl/managed_load_balancer/v1/load_balancers/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/load_balancers/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( @@ -418,18 +415,26 @@ var applyConfigurationsRequest = fmt.Sprintf(` "apply-configurations": null }`) -var cancelConfigurationsRequest = fmt.Sprintf(` +var systemUpdateRequest = fmt.Sprintf(` { - "cancel-configurations": null + "system-update": { + "system_update_id": "31746df7-92f9-4b5e-ad05-59f6684a54eb" + } }`) -var systemUpdateRequest = fmt.Sprintf(` +var applyConfigurationsAndSystemUpdateRequest = fmt.Sprintf(` { + "apply-configurations": null, "system-update": { "system_update_id": "31746df7-92f9-4b5e-ad05-59f6684a54eb" } }`) +var cancelConfigurationsRequest = fmt.Sprintf(` +{ + "cancel-configurations": null +}`) + var createStagedRequest = fmt.Sprintf(` { "load_balancer": { diff --git a/v3/ecl/managed_load_balancer/v1/load_balancers/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/load_balancers/testing/requests_test.go index 319b9e7..512d9a6 100644 --- a/v3/ecl/managed_load_balancer/v1/load_balancers/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/load_balancers/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( @@ -233,7 +230,10 @@ func TestApplyConfigurationsLoadBalancer(t *testing.T) { }) cli := ServiceClient() - err := load_balancers.ApplyConfigurations(cli, id).ExtractErr() + actionOpts := load_balancers.ActionOpts{ + ApplyConfigurations: true, + } + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() th.AssertNoErr(t, err) } @@ -256,11 +256,45 @@ func TestSystemUpdateLoadBalancer(t *testing.T) { }) cli := ServiceClient() - systemUpdateOpts := load_balancers.SystemUpdateOpts{ + systemUpdate := load_balancers.ActionOptsSystemUpdate{ + SystemUpdateID: "31746df7-92f9-4b5e-ad05-59f6684a54eb", + } + actionOpts := load_balancers.ActionOpts{ + SystemUpdate: &systemUpdate, + } + + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() + + th.AssertNoErr(t, err) +} + +func TestApplyConfigurationsAndSystemUpdateLoadBalancer(t *testing.T) { + th.SetupHTTP() + defer th.TeardownHTTP() + + th.Mux.HandleFunc( + fmt.Sprintf("/v1.0/load_balancers/%s/action", id), + func(w http.ResponseWriter, r *http.Request) { + th.TestMethod(t, r, "POST") + th.TestHeader(t, r, "X-Auth-Token", TokenID) + th.TestHeader(t, r, "Content-Type", "application/json") + th.TestHeader(t, r, "Accept", "application/json") + th.TestJSONRequest(t, r, applyConfigurationsAndSystemUpdateRequest) + + w.Header().Add("Content-Type", "application/json") + w.WriteHeader(http.StatusNoContent) + }) + + cli := ServiceClient() + systemUpdate := load_balancers.ActionOptsSystemUpdate{ SystemUpdateID: "31746df7-92f9-4b5e-ad05-59f6684a54eb", } + actionOpts := load_balancers.ActionOpts{ + ApplyConfigurations: true, + SystemUpdate: &systemUpdate, + } - err := load_balancers.SystemUpdate(cli, id, systemUpdateOpts).ExtractErr() + err := load_balancers.Action(cli, id, actionOpts).ExtractErr() th.AssertNoErr(t, err) } diff --git a/v3/ecl/managed_load_balancer/v1/load_balancers/urls.go b/v3/ecl/managed_load_balancer/v1/load_balancers/urls.go index 7553821..3327db4 100644 --- a/v3/ecl/managed_load_balancer/v1/load_balancers/urls.go +++ b/v3/ecl/managed_load_balancer/v1/load_balancers/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package load_balancers import ( diff --git a/v3/ecl/managed_load_balancer/v1/operations/doc.go b/v3/ecl/managed_load_balancer/v1/operations/doc.go index 4527fd7..6eb28a6 100644 --- a/v3/ecl/managed_load_balancer/v1/operations/doc.go +++ b/v3/ecl/managed_load_balancer/v1/operations/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package operations contains functionality for working with ECL Managed Load Balancer resources. Example to list operations diff --git a/v3/ecl/managed_load_balancer/v1/operations/requests.go b/v3/ecl/managed_load_balancer/v1/operations/requests.go index f6bb3a8..b797f0a 100644 --- a/v3/ecl/managed_load_balancer/v1/operations/requests.go +++ b/v3/ecl/managed_load_balancer/v1/operations/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package operations import ( diff --git a/v3/ecl/managed_load_balancer/v1/operations/results.go b/v3/ecl/managed_load_balancer/v1/operations/results.go index 412ffaf..bc85c26 100644 --- a/v3/ecl/managed_load_balancer/v1/operations/results.go +++ b/v3/ecl/managed_load_balancer/v1/operations/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package operations import ( diff --git a/v3/ecl/managed_load_balancer/v1/operations/testing/doc.go b/v3/ecl/managed_load_balancer/v1/operations/testing/doc.go index 6d02e61..028cc81 100644 --- a/v3/ecl/managed_load_balancer/v1/operations/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/operations/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains operation unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/operations/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/operations/testing/fixtures.go index a30f8b9..5ab4b6f 100644 --- a/v3/ecl/managed_load_balancer/v1/operations/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/operations/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/operations/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/operations/testing/requests_test.go index 74057c9..db187e4 100644 --- a/v3/ecl/managed_load_balancer/v1/operations/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/operations/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/operations/urls.go b/v3/ecl/managed_load_balancer/v1/operations/urls.go index 62f2248..832aa8a 100644 --- a/v3/ecl/managed_load_balancer/v1/operations/urls.go +++ b/v3/ecl/managed_load_balancer/v1/operations/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package operations import ( diff --git a/v3/ecl/managed_load_balancer/v1/plans/doc.go b/v3/ecl/managed_load_balancer/v1/plans/doc.go index 0a3d9a4..c5710fb 100644 --- a/v3/ecl/managed_load_balancer/v1/plans/doc.go +++ b/v3/ecl/managed_load_balancer/v1/plans/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package plans contains functionality for working with ECL Managed Load Balancer resources. Example to list plans diff --git a/v3/ecl/managed_load_balancer/v1/plans/requests.go b/v3/ecl/managed_load_balancer/v1/plans/requests.go index f0cd487..e8fc321 100644 --- a/v3/ecl/managed_load_balancer/v1/plans/requests.go +++ b/v3/ecl/managed_load_balancer/v1/plans/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package plans import ( diff --git a/v3/ecl/managed_load_balancer/v1/plans/results.go b/v3/ecl/managed_load_balancer/v1/plans/results.go index c86a2bb..244c54d 100644 --- a/v3/ecl/managed_load_balancer/v1/plans/results.go +++ b/v3/ecl/managed_load_balancer/v1/plans/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package plans import ( diff --git a/v3/ecl/managed_load_balancer/v1/plans/testing/doc.go b/v3/ecl/managed_load_balancer/v1/plans/testing/doc.go index bf8a876..ec2e1f0 100644 --- a/v3/ecl/managed_load_balancer/v1/plans/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/plans/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains plan unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/plans/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/plans/testing/fixtures.go index bd03a26..9841806 100644 --- a/v3/ecl/managed_load_balancer/v1/plans/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/plans/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/plans/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/plans/testing/requests_test.go index 339b9f0..06e107a 100644 --- a/v3/ecl/managed_load_balancer/v1/plans/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/plans/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/plans/urls.go b/v3/ecl/managed_load_balancer/v1/plans/urls.go index 92f6559..9dd30e0 100644 --- a/v3/ecl/managed_load_balancer/v1/plans/urls.go +++ b/v3/ecl/managed_load_balancer/v1/plans/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package plans import ( diff --git a/v3/ecl/managed_load_balancer/v1/policies/doc.go b/v3/ecl/managed_load_balancer/v1/policies/doc.go index 28e6272..a804c5d 100644 --- a/v3/ecl/managed_load_balancer/v1/policies/doc.go +++ b/v3/ecl/managed_load_balancer/v1/policies/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package policies contains functionality for working with ECL Managed Load Balancer resources. Example to list policies diff --git a/v3/ecl/managed_load_balancer/v1/policies/requests.go b/v3/ecl/managed_load_balancer/v1/policies/requests.go index a60182f..a4e8fc0 100644 --- a/v3/ecl/managed_load_balancer/v1/policies/requests.go +++ b/v3/ecl/managed_load_balancer/v1/policies/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package policies import ( diff --git a/v3/ecl/managed_load_balancer/v1/policies/results.go b/v3/ecl/managed_load_balancer/v1/policies/results.go index 066daf0..5bf79b4 100644 --- a/v3/ecl/managed_load_balancer/v1/policies/results.go +++ b/v3/ecl/managed_load_balancer/v1/policies/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package policies import ( diff --git a/v3/ecl/managed_load_balancer/v1/policies/testing/doc.go b/v3/ecl/managed_load_balancer/v1/policies/testing/doc.go index 2c98547..1869ef3 100644 --- a/v3/ecl/managed_load_balancer/v1/policies/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/policies/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains policy unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/policies/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/policies/testing/fixtures.go index 0ea647f..fb0d572 100644 --- a/v3/ecl/managed_load_balancer/v1/policies/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/policies/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/policies/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/policies/testing/requests_test.go index 552bdd6..e522319 100644 --- a/v3/ecl/managed_load_balancer/v1/policies/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/policies/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/policies/urls.go b/v3/ecl/managed_load_balancer/v1/policies/urls.go index de6cfa1..1e7870b 100644 --- a/v3/ecl/managed_load_balancer/v1/policies/urls.go +++ b/v3/ecl/managed_load_balancer/v1/policies/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package policies import ( diff --git a/v3/ecl/managed_load_balancer/v1/routes/doc.go b/v3/ecl/managed_load_balancer/v1/routes/doc.go index 19f98e0..e6a5a70 100644 --- a/v3/ecl/managed_load_balancer/v1/routes/doc.go +++ b/v3/ecl/managed_load_balancer/v1/routes/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package routes contains functionality for working with ECL Managed Load Balancer resources. Example to list routes diff --git a/v3/ecl/managed_load_balancer/v1/routes/requests.go b/v3/ecl/managed_load_balancer/v1/routes/requests.go index b88875d..23f1063 100644 --- a/v3/ecl/managed_load_balancer/v1/routes/requests.go +++ b/v3/ecl/managed_load_balancer/v1/routes/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package routes import ( diff --git a/v3/ecl/managed_load_balancer/v1/routes/results.go b/v3/ecl/managed_load_balancer/v1/routes/results.go index ebe17d5..db7906c 100644 --- a/v3/ecl/managed_load_balancer/v1/routes/results.go +++ b/v3/ecl/managed_load_balancer/v1/routes/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package routes import ( diff --git a/v3/ecl/managed_load_balancer/v1/routes/testing/doc.go b/v3/ecl/managed_load_balancer/v1/routes/testing/doc.go index 8c5574a..3bc14e7 100644 --- a/v3/ecl/managed_load_balancer/v1/routes/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/routes/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains route unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/routes/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/routes/testing/fixtures.go index b58c0b4..03c4189 100644 --- a/v3/ecl/managed_load_balancer/v1/routes/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/routes/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/routes/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/routes/testing/requests_test.go index df95cb1..7057d60 100644 --- a/v3/ecl/managed_load_balancer/v1/routes/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/routes/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/routes/urls.go b/v3/ecl/managed_load_balancer/v1/routes/urls.go index 7dfee22..99895c9 100644 --- a/v3/ecl/managed_load_balancer/v1/routes/urls.go +++ b/v3/ecl/managed_load_balancer/v1/routes/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package routes import ( diff --git a/v3/ecl/managed_load_balancer/v1/rules/doc.go b/v3/ecl/managed_load_balancer/v1/rules/doc.go index 2ecbb9c..1356c59 100644 --- a/v3/ecl/managed_load_balancer/v1/rules/doc.go +++ b/v3/ecl/managed_load_balancer/v1/rules/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package rules contains functionality for working with ECL Managed Load Balancer resources. Example to list rules diff --git a/v3/ecl/managed_load_balancer/v1/rules/requests.go b/v3/ecl/managed_load_balancer/v1/rules/requests.go index d4d2813..786fc01 100644 --- a/v3/ecl/managed_load_balancer/v1/rules/requests.go +++ b/v3/ecl/managed_load_balancer/v1/rules/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package rules import ( diff --git a/v3/ecl/managed_load_balancer/v1/rules/results.go b/v3/ecl/managed_load_balancer/v1/rules/results.go index 90fa531..d468305 100644 --- a/v3/ecl/managed_load_balancer/v1/rules/results.go +++ b/v3/ecl/managed_load_balancer/v1/rules/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package rules import ( diff --git a/v3/ecl/managed_load_balancer/v1/rules/testing/doc.go b/v3/ecl/managed_load_balancer/v1/rules/testing/doc.go index aefba89..a4aa0e4 100644 --- a/v3/ecl/managed_load_balancer/v1/rules/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/rules/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains rule unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/rules/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/rules/testing/fixtures.go index 0f9174b..13d34b0 100644 --- a/v3/ecl/managed_load_balancer/v1/rules/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/rules/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/rules/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/rules/testing/requests_test.go index e9f64ec..b5641bd 100644 --- a/v3/ecl/managed_load_balancer/v1/rules/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/rules/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/rules/urls.go b/v3/ecl/managed_load_balancer/v1/rules/urls.go index 0ff52e8..e55da3b 100644 --- a/v3/ecl/managed_load_balancer/v1/rules/urls.go +++ b/v3/ecl/managed_load_balancer/v1/rules/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package rules import ( diff --git a/v3/ecl/managed_load_balancer/v1/system_updates/doc.go b/v3/ecl/managed_load_balancer/v1/system_updates/doc.go index f055e0c..19bf8c2 100644 --- a/v3/ecl/managed_load_balancer/v1/system_updates/doc.go +++ b/v3/ecl/managed_load_balancer/v1/system_updates/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package system_updates contains functionality for working with ECL Managed Load Balancer resources. Example to list system updates diff --git a/v3/ecl/managed_load_balancer/v1/system_updates/requests.go b/v3/ecl/managed_load_balancer/v1/system_updates/requests.go index e0cec5a..48bd683 100644 --- a/v3/ecl/managed_load_balancer/v1/system_updates/requests.go +++ b/v3/ecl/managed_load_balancer/v1/system_updates/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package system_updates import ( diff --git a/v3/ecl/managed_load_balancer/v1/system_updates/results.go b/v3/ecl/managed_load_balancer/v1/system_updates/results.go index 6018919..e2c8878 100644 --- a/v3/ecl/managed_load_balancer/v1/system_updates/results.go +++ b/v3/ecl/managed_load_balancer/v1/system_updates/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package system_updates import ( diff --git a/v3/ecl/managed_load_balancer/v1/system_updates/testing/doc.go b/v3/ecl/managed_load_balancer/v1/system_updates/testing/doc.go index 7ba856e..94b14f9 100644 --- a/v3/ecl/managed_load_balancer/v1/system_updates/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/system_updates/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains system update unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/system_updates/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/system_updates/testing/fixtures.go index c08f68f..c995945 100644 --- a/v3/ecl/managed_load_balancer/v1/system_updates/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/system_updates/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/system_updates/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/system_updates/testing/requests_test.go index 3791c8a..891fd0f 100644 --- a/v3/ecl/managed_load_balancer/v1/system_updates/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/system_updates/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/system_updates/urls.go b/v3/ecl/managed_load_balancer/v1/system_updates/urls.go index 7ccbcb2..982ba98 100644 --- a/v3/ecl/managed_load_balancer/v1/system_updates/urls.go +++ b/v3/ecl/managed_load_balancer/v1/system_updates/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package system_updates import ( diff --git a/v3/ecl/managed_load_balancer/v1/target_groups/doc.go b/v3/ecl/managed_load_balancer/v1/target_groups/doc.go index de5ceab..bc9f526 100644 --- a/v3/ecl/managed_load_balancer/v1/target_groups/doc.go +++ b/v3/ecl/managed_load_balancer/v1/target_groups/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package target_groups contains functionality for working with ECL Managed Load Balancer resources. Example to list target groups diff --git a/v3/ecl/managed_load_balancer/v1/target_groups/requests.go b/v3/ecl/managed_load_balancer/v1/target_groups/requests.go index 8c5d34e..5c7251e 100644 --- a/v3/ecl/managed_load_balancer/v1/target_groups/requests.go +++ b/v3/ecl/managed_load_balancer/v1/target_groups/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package target_groups import ( diff --git a/v3/ecl/managed_load_balancer/v1/target_groups/results.go b/v3/ecl/managed_load_balancer/v1/target_groups/results.go index 92ddf9e..083ba5e 100644 --- a/v3/ecl/managed_load_balancer/v1/target_groups/results.go +++ b/v3/ecl/managed_load_balancer/v1/target_groups/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package target_groups import ( diff --git a/v3/ecl/managed_load_balancer/v1/target_groups/testing/doc.go b/v3/ecl/managed_load_balancer/v1/target_groups/testing/doc.go index b3db35c..8f80820 100644 --- a/v3/ecl/managed_load_balancer/v1/target_groups/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/target_groups/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains target group unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/target_groups/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/target_groups/testing/fixtures.go index 30922ee..c77fe23 100644 --- a/v3/ecl/managed_load_balancer/v1/target_groups/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/target_groups/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/target_groups/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/target_groups/testing/requests_test.go index cc7d7d6..70400f7 100644 --- a/v3/ecl/managed_load_balancer/v1/target_groups/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/target_groups/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/target_groups/urls.go b/v3/ecl/managed_load_balancer/v1/target_groups/urls.go index 6ca64d7..8833b49 100644 --- a/v3/ecl/managed_load_balancer/v1/target_groups/urls.go +++ b/v3/ecl/managed_load_balancer/v1/target_groups/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package target_groups import ( diff --git a/v3/ecl/managed_load_balancer/v1/tls_policies/doc.go b/v3/ecl/managed_load_balancer/v1/tls_policies/doc.go index 8ba1a3f..f861a87 100644 --- a/v3/ecl/managed_load_balancer/v1/tls_policies/doc.go +++ b/v3/ecl/managed_load_balancer/v1/tls_policies/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package tls_policies contains functionality for working with ECL Managed Load Balancer resources. Example to list tls policies diff --git a/v3/ecl/managed_load_balancer/v1/tls_policies/requests.go b/v3/ecl/managed_load_balancer/v1/tls_policies/requests.go index cb7cf0c..acca80f 100644 --- a/v3/ecl/managed_load_balancer/v1/tls_policies/requests.go +++ b/v3/ecl/managed_load_balancer/v1/tls_policies/requests.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package tls_policies import ( diff --git a/v3/ecl/managed_load_balancer/v1/tls_policies/results.go b/v3/ecl/managed_load_balancer/v1/tls_policies/results.go index 0996450..b1499ef 100644 --- a/v3/ecl/managed_load_balancer/v1/tls_policies/results.go +++ b/v3/ecl/managed_load_balancer/v1/tls_policies/results.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package tls_policies import ( diff --git a/v3/ecl/managed_load_balancer/v1/tls_policies/testing/doc.go b/v3/ecl/managed_load_balancer/v1/tls_policies/testing/doc.go index af8bf7d..f7de45c 100644 --- a/v3/ecl/managed_load_balancer/v1/tls_policies/testing/doc.go +++ b/v3/ecl/managed_load_balancer/v1/tls_policies/testing/doc.go @@ -1,6 +1,4 @@ /* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb - Package testing contains tls policy unit tests */ package testing diff --git a/v3/ecl/managed_load_balancer/v1/tls_policies/testing/fixtures.go b/v3/ecl/managed_load_balancer/v1/tls_policies/testing/fixtures.go index e686e7b..f707abf 100644 --- a/v3/ecl/managed_load_balancer/v1/tls_policies/testing/fixtures.go +++ b/v3/ecl/managed_load_balancer/v1/tls_policies/testing/fixtures.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/tls_policies/testing/requests_test.go b/v3/ecl/managed_load_balancer/v1/tls_policies/testing/requests_test.go index f359323..ac11217 100644 --- a/v3/ecl/managed_load_balancer/v1/tls_policies/testing/requests_test.go +++ b/v3/ecl/managed_load_balancer/v1/tls_policies/testing/requests_test.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package testing import ( diff --git a/v3/ecl/managed_load_balancer/v1/tls_policies/urls.go b/v3/ecl/managed_load_balancer/v1/tls_policies/urls.go index 017f401..b0d49a8 100644 --- a/v3/ecl/managed_load_balancer/v1/tls_policies/urls.go +++ b/v3/ecl/managed_load_balancer/v1/tls_policies/urls.go @@ -1,6 +1,3 @@ -/* -Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb -*/ package tls_policies import ( diff --git a/v3/go.mod b/v3/go.mod new file mode 100644 index 0000000..63b9bf7 --- /dev/null +++ b/v3/go.mod @@ -0,0 +1,3 @@ +module github.com/nttcom/eclcloud/v3 + +go 1.13