From 2bf19e4d026b93ff427cf0d4118845527487f6ad Mon Sep 17 00:00:00 2001 From: Kumar Ganesan Date: Wed, 2 Sep 2020 16:20:25 +0530 Subject: [PATCH] glb and ssl changes --- cis.env.enc | Bin 8224 -> 8400 bytes .../global_load_balancer_monitor_v1.go | 43 ++++++++-- ...ad_balancer_monitor_v1_integration_test.go | 19 +++- .../global_load_balancer_monitor_v1_test.go | 73 +++++++++------- .../global_load_balancer_pools_v0.go | 37 ++++++-- ...load_balancer_pools_v0_integration_test.go | 5 +- .../global_load_balancer_pools_v0_test.go | 81 ++++++++++-------- sslcertificateapiv1/ssl_certificate_api_v1.go | 2 +- ...ssl_certificate_api_v1_integration_test.go | 4 +- .../ssl_certificate_api_v1_test.go | 11 ++- 10 files changed, 181 insertions(+), 94 deletions(-) diff --git a/cis.env.enc b/cis.env.enc index 8d11da02ca14807c6882d18c5ef0ef9f74e33117..879f02bb4eda3880e9f798e5054a8f918b8c7a8d 100644 GIT binary patch literal 8400 zcmV;>ATQs?PAB(H*-LFV7VGyFGen=QdCvUs{pLpK4JHMs2XVoXe#&zz{0e1Uwmi)< zjQyvD*TOFQmngt5H~s6wMT#JvPN8WJy!2AW{&dO0`UrELV7Tg=Kp7xbe(Ueq_aaYU zN`%EmgTJ?+u#w8;>YkH2OE8JPwB2yW49dOdqSBo25bc|`F>m`UzCgJ(-9tU*2NN~Y z9t$f3!*mgYCf=3{ZK5;%_Ai;Bu5Nh-w~7HsVzYPYDmx`=sHjzu)-jzDpG%2T&N*qrD2*m6HK)3g|hN~K8hMG z48@gBot*5?h#7*YTDs%`(A#TbMPviSG`-M{2APST&!Ayo5{0y!yk{G0a-Y%+kE}!>IG}7C8X_r#TF?{zy*0ob@d0ANw z0*AFd9!QBV zqbRstc32{?uB8fff<|I>f6Vul2*|*3WOvIp|LjgaO*y9zne}JfV)D0B%j}x}JN5jU zDOj(AV+dn^fP9zo<7n63s{Ng>x5Btzz-bq5X{nfV&ki=byNv5FM%B!Bf)oq!l*e?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Wh1oH&| diff --git a/globalloadbalancermonitorv1/global_load_balancer_monitor_v1.go b/globalloadbalancermonitorv1/global_load_balancer_monitor_v1.go index 8de1d72..8356f85 100644 --- a/globalloadbalancermonitorv1/global_load_balancer_monitor_v1.go +++ b/globalloadbalancermonitorv1/global_load_balancer_monitor_v1.go @@ -19,10 +19,9 @@ package globalloadbalancermonitorv1 import ( "encoding/json" - "reflect" - "github.com/IBM/go-sdk-core/v4/core" common "github.com/IBM/networking-go-sdk/common" + "reflect" ) // GlobalLoadBalancerMonitorV1 : Global Load Balancer Monitor @@ -106,7 +105,7 @@ func NewGlobalLoadBalancerMonitorV1(options *GlobalLoadBalancerMonitorV1Options) service = &GlobalLoadBalancerMonitorV1{ Service: baseService, - Crn: options.Crn, + Crn: options.Crn, } return @@ -163,7 +162,7 @@ func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) ListAllLoadBalance return } -// CreateLoadBalancerMonitor : Create a load balancer monitor +// CreateLoadBalancerMonitor : Create load balancer monitor // Create a load balancer monitor for a given service instance. func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) CreateLoadBalancerMonitor(createLoadBalancerMonitorOptions *CreateLoadBalancerMonitorOptions) (result *MonitorResp, response *core.DetailedResponse, err error) { err = core.ValidateStruct(createLoadBalancerMonitorOptions, "createLoadBalancerMonitorOptions") @@ -228,6 +227,9 @@ func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) CreateLoadBalancer if createLoadBalancerMonitorOptions.AllowInsecure != nil { body["allow_insecure"] = createLoadBalancerMonitorOptions.AllowInsecure } + if createLoadBalancerMonitorOptions.Header != nil { + body["header"] = createLoadBalancerMonitorOptions.Header + } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -252,7 +254,7 @@ func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) CreateLoadBalancer return } -// EditLoadBalancerMonitor : Edit a load balancer monitor +// EditLoadBalancerMonitor : Edit load balancer monitor // Edit porperties of an existing load balancer monitor. func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) EditLoadBalancerMonitor(editLoadBalancerMonitorOptions *EditLoadBalancerMonitorOptions) (result *MonitorResp, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(editLoadBalancerMonitorOptions, "editLoadBalancerMonitorOptions cannot be nil") @@ -321,6 +323,9 @@ func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) EditLoadBalancerMo if editLoadBalancerMonitorOptions.AllowInsecure != nil { body["allow_insecure"] = editLoadBalancerMonitorOptions.AllowInsecure } + if editLoadBalancerMonitorOptions.Header != nil { + body["header"] = editLoadBalancerMonitorOptions.Header + } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -345,7 +350,7 @@ func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) EditLoadBalancerMo return } -// DeleteLoadBalancerMonitor : Delete a load balancer monitor +// DeleteLoadBalancerMonitor : Delete load balancer monitor // Delete a load balancer monitor. func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) DeleteLoadBalancerMonitor(deleteLoadBalancerMonitorOptions *DeleteLoadBalancerMonitorOptions) (result *DeleteMonitorResp, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteLoadBalancerMonitorOptions, "deleteLoadBalancerMonitorOptions cannot be nil") @@ -395,7 +400,7 @@ func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) DeleteLoadBalancer return } -// GetLoadBalancerMonitor : Get a load balancer monitor +// GetLoadBalancerMonitor : Get load balancer monitor // For a given service instance and load balancer monitor id, get the monitor details. func (globalLoadBalancerMonitor *GlobalLoadBalancerMonitorV1) GetLoadBalancerMonitor(getLoadBalancerMonitorOptions *GetLoadBalancerMonitorOptions) (result *MonitorResp, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerMonitorOptions, "getLoadBalancerMonitorOptions cannot be nil") @@ -483,6 +488,9 @@ type CreateLoadBalancerMonitorOptions struct { // allow insecure. AllowInsecure *bool `json:"allow_insecure,omitempty"` + // header. + Header map[string][]string `json:"header,omitempty"` + // Allows users to set headers on API requests Headers map[string]string } @@ -564,6 +572,12 @@ func (options *CreateLoadBalancerMonitorOptions) SetAllowInsecure(allowInsecure return options } +// SetHeader : Allow user to set Header +func (options *CreateLoadBalancerMonitorOptions) SetHeader(header map[string][]string) *CreateLoadBalancerMonitorOptions { + options.Header = header + return options +} + // SetHeaders : Allow user to set Headers func (options *CreateLoadBalancerMonitorOptions) SetHeaders(param map[string]string) *CreateLoadBalancerMonitorOptions { options.Headers = param @@ -604,6 +618,7 @@ type DeleteMonitorRespResult struct { ID *string `json:"id" validate:"required"` } + // UnmarshalDeleteMonitorRespResult unmarshals an instance of DeleteMonitorRespResult from the specified map of raw messages. func UnmarshalDeleteMonitorRespResult(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DeleteMonitorRespResult) @@ -656,6 +671,9 @@ type EditLoadBalancerMonitorOptions struct { // allow insecure. AllowInsecure *bool `json:"allow_insecure,omitempty"` + // header. + Header map[string][]string `json:"header,omitempty"` + // Allows users to set headers on API requests Headers map[string]string } @@ -745,6 +763,12 @@ func (options *EditLoadBalancerMonitorOptions) SetAllowInsecure(allowInsecure bo return options } +// SetHeader : Allow user to set Header +func (options *EditLoadBalancerMonitorOptions) SetHeader(header map[string][]string) *EditLoadBalancerMonitorOptions { + options.Header = header + return options +} + // SetHeaders : Allow user to set Headers func (options *EditLoadBalancerMonitorOptions) SetHeaders(param map[string]string) *EditLoadBalancerMonitorOptions { options.Headers = param @@ -812,6 +836,7 @@ type DeleteMonitorResp struct { Result *DeleteMonitorRespResult `json:"result" validate:"required"` } + // UnmarshalDeleteMonitorResp unmarshals an instance of DeleteMonitorResp from the specified map of raw messages. func UnmarshalDeleteMonitorResp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DeleteMonitorResp) @@ -853,6 +878,7 @@ type ListMonitorResp struct { ResultInfo *ResultInfo `json:"result_info" validate:"required"` } + // UnmarshalListMonitorResp unmarshals an instance of ListMonitorResp from the specified map of raw messages. func UnmarshalListMonitorResp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ListMonitorResp) @@ -928,6 +954,7 @@ type MonitorPack struct { AllowInsecure *bool `json:"allow_insecure,omitempty"` } + // UnmarshalMonitorPack unmarshals an instance of MonitorPack from the specified map of raw messages. func UnmarshalMonitorPack(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(MonitorPack) @@ -1010,6 +1037,7 @@ type MonitorResp struct { Result *MonitorPack `json:"result" validate:"required"` } + // UnmarshalMonitorResp unmarshals an instance of MonitorResp from the specified map of raw messages. func UnmarshalMonitorResp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(MonitorResp) @@ -1048,6 +1076,7 @@ type ResultInfo struct { TotalCount *int64 `json:"total_count" validate:"required"` } + // UnmarshalResultInfo unmarshals an instance of ResultInfo from the specified map of raw messages. func UnmarshalResultInfo(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ResultInfo) diff --git a/globalloadbalancermonitorv1/global_load_balancer_monitor_v1_integration_test.go b/globalloadbalancermonitorv1/global_load_balancer_monitor_v1_integration_test.go index 1a3bcc4..dae85ba 100644 --- a/globalloadbalancermonitorv1/global_load_balancer_monitor_v1_integration_test.go +++ b/globalloadbalancermonitorv1/global_load_balancer_monitor_v1_integration_test.go @@ -23,10 +23,10 @@ import ( "strings" "github.com/IBM/go-sdk-core/v4/core" + . "github.com/IBM/networking-go-sdk/globalloadbalancermonitorv1" "github.com/joho/godotenv" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/IBM/networking-go-sdk/globalloadbalancermonitorv1" ) const configFile = "../cis.env" @@ -120,6 +120,14 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { options.SetInterval(90) options.SetFollowRedirects(true) options.SetAllowInsecure(true) + example := []string{"example.net"} + example1 := []string{"example1.net"} + + test := map[string][]string{ + "test": example, + "test1": example1, + } + options.SetHeader(test) // create global load balancer monitor with type HTTP result, response, err := testService.CreateLoadBalancerMonitor(options) @@ -138,6 +146,10 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { options.SetTimeout(3) options.SetRetries(0) options.SetInterval(90) + example = []string{"example.net"} + example1 = []string{"example1.net"} + + options.SetHeader(test) // create global load balancer monitor with type TCP result, response, err = testService.CreateLoadBalancerMonitor(options) Expect(err).To(BeNil()) @@ -173,6 +185,11 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { editOptions.SetFollowRedirects(true) editOptions.SetAllowInsecure(true) + test = map[string][]string{ + "example": example, + "example1": example1, + } + // create global load balancer monitor with type HTTP result, response, err = testService.EditLoadBalancerMonitor(editOptions) Expect(err).To(BeNil()) diff --git a/globalloadbalancermonitorv1/global_load_balancer_monitor_v1_test.go b/globalloadbalancermonitorv1/global_load_balancer_monitor_v1_test.go index 5700b0b..ea12024 100644 --- a/globalloadbalancermonitorv1/global_load_balancer_monitor_v1_test.go +++ b/globalloadbalancermonitorv1/global_load_balancer_monitor_v1_test.go @@ -19,28 +19,27 @@ package globalloadbalancermonitorv1_test import ( "bytes" "fmt" + "github.com/IBM/go-sdk-core/v4/core" + "github.com/IBM/networking-go-sdk/globalloadbalancermonitorv1" + "github.com/go-openapi/strfmt" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" "io" "io/ioutil" "net/http" "net/http/httptest" "os" "time" - - "github.com/IBM/go-sdk-core/v4/core" - "github.com/go-openapi/strfmt" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/IBM/networking-go-sdk/globalloadbalancermonitorv1" ) var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { var testServer *httptest.Server - Describe(`Service constructor tests`, func() { + Describe(`Service constructor tests`, func() { crn := "testString" It(`Instantiate service client`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testService).ToNot(BeNil()) Expect(testServiceErr).To(BeNil()) @@ -76,7 +75,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "GLOBAL_LOAD_BALANCER_MONITOR_URL": "https://globalloadbalancermonitorv1/api", + "GLOBAL_LOAD_BALANCER_MONITOR_URL": "https://globalloadbalancermonitorv1/api", "GLOBAL_LOAD_BALANCER_MONITOR_AUTH_TYPE": "noauth", } @@ -116,7 +115,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "GLOBAL_LOAD_BALANCER_MONITOR_URL": "https://globalloadbalancermonitorv1/api", + "GLOBAL_LOAD_BALANCER_MONITOR_URL": "https://globalloadbalancermonitorv1/api", "GLOBAL_LOAD_BALANCER_MONITOR_AUTH_TYPE": "someOtherAuth", } @@ -134,7 +133,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "GLOBAL_LOAD_BALANCER_MONITOR_AUTH_TYPE": "NOAuth", + "GLOBAL_LOAD_BALANCER_MONITOR_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) @@ -170,7 +169,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -210,7 +209,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -223,7 +222,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { // Construct an instance of the ListAllLoadBalancerMonitorsOptions model listAllLoadBalancerMonitorsOptionsModel := new(globalloadbalancermonitorv1.ListAllLoadBalancerMonitorsOptions) - listAllLoadBalancerMonitorsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + listAllLoadBalancerMonitorsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.ListAllLoadBalancerMonitors(listAllLoadBalancerMonitorsOptionsModel) @@ -235,7 +234,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -277,7 +276,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -296,6 +295,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { createLoadBalancerMonitorOptionsModel.FollowRedirects = core.BoolPtr(true) createLoadBalancerMonitorOptionsModel.ExpectedBody = core.StringPtr("alive") createLoadBalancerMonitorOptionsModel.AllowInsecure = core.BoolPtr(true) + createLoadBalancerMonitorOptionsModel.Header = make(map[string][]string) createLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.CreateLoadBalancerMonitor(createLoadBalancerMonitorOptionsModel) @@ -329,7 +329,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -354,7 +354,8 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { createLoadBalancerMonitorOptionsModel.FollowRedirects = core.BoolPtr(true) createLoadBalancerMonitorOptionsModel.ExpectedBody = core.StringPtr("alive") createLoadBalancerMonitorOptionsModel.AllowInsecure = core.BoolPtr(true) - createLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + createLoadBalancerMonitorOptionsModel.Header = make(map[string][]string) + createLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.CreateLoadBalancerMonitor(createLoadBalancerMonitorOptionsModel) @@ -366,7 +367,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -385,6 +386,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { createLoadBalancerMonitorOptionsModel.FollowRedirects = core.BoolPtr(true) createLoadBalancerMonitorOptionsModel.ExpectedBody = core.StringPtr("alive") createLoadBalancerMonitorOptionsModel.AllowInsecure = core.BoolPtr(true) + createLoadBalancerMonitorOptionsModel.Header = make(map[string][]string) createLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -420,7 +422,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -440,6 +442,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { editLoadBalancerMonitorOptionsModel.FollowRedirects = core.BoolPtr(true) editLoadBalancerMonitorOptionsModel.ExpectedBody = core.StringPtr("alive") editLoadBalancerMonitorOptionsModel.AllowInsecure = core.BoolPtr(true) + editLoadBalancerMonitorOptionsModel.Header = make(map[string][]string) editLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.EditLoadBalancerMonitor(editLoadBalancerMonitorOptionsModel) @@ -473,7 +476,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -499,7 +502,8 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { editLoadBalancerMonitorOptionsModel.FollowRedirects = core.BoolPtr(true) editLoadBalancerMonitorOptionsModel.ExpectedBody = core.StringPtr("alive") editLoadBalancerMonitorOptionsModel.AllowInsecure = core.BoolPtr(true) - editLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + editLoadBalancerMonitorOptionsModel.Header = make(map[string][]string) + editLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.EditLoadBalancerMonitor(editLoadBalancerMonitorOptionsModel) @@ -511,7 +515,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -531,6 +535,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { editLoadBalancerMonitorOptionsModel.FollowRedirects = core.BoolPtr(true) editLoadBalancerMonitorOptionsModel.ExpectedBody = core.StringPtr("alive") editLoadBalancerMonitorOptionsModel.AllowInsecure = core.BoolPtr(true) + editLoadBalancerMonitorOptionsModel.Header = make(map[string][]string) editLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -573,7 +578,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -614,7 +619,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -628,7 +633,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { // Construct an instance of the DeleteLoadBalancerMonitorOptions model deleteLoadBalancerMonitorOptionsModel := new(globalloadbalancermonitorv1.DeleteLoadBalancerMonitorOptions) deleteLoadBalancerMonitorOptionsModel.MonitorIdentifier = core.StringPtr("testString") - deleteLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + deleteLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.DeleteLoadBalancerMonitor(deleteLoadBalancerMonitorOptionsModel) @@ -640,7 +645,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -690,7 +695,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -731,7 +736,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -745,7 +750,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { // Construct an instance of the GetLoadBalancerMonitorOptions model getLoadBalancerMonitorOptionsModel := new(globalloadbalancermonitorv1.GetLoadBalancerMonitorOptions) getLoadBalancerMonitorOptionsModel.MonitorIdentifier = core.StringPtr("testString") - getLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + getLoadBalancerMonitorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.GetLoadBalancerMonitor(getLoadBalancerMonitorOptionsModel) @@ -757,7 +762,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, testServiceErr := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -793,7 +798,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { testService, _ := globalloadbalancermonitorv1.NewGlobalLoadBalancerMonitorV1(&globalloadbalancermonitorv1.GlobalLoadBalancerMonitorV1Options{ URL: "http://globalloadbalancermonitorv1modelgenerator.com", Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) It(`Invoke NewCreateLoadBalancerMonitorOptions successfully`, func() { // Construct an instance of the CreateLoadBalancerMonitorOptions model @@ -810,6 +815,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { createLoadBalancerMonitorOptionsModel.SetFollowRedirects(true) createLoadBalancerMonitorOptionsModel.SetExpectedBody("alive") createLoadBalancerMonitorOptionsModel.SetAllowInsecure(true) + createLoadBalancerMonitorOptionsModel.SetHeader(make(map[string][]string)) createLoadBalancerMonitorOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createLoadBalancerMonitorOptionsModel).ToNot(BeNil()) Expect(createLoadBalancerMonitorOptionsModel.Type).To(Equal(core.StringPtr("http"))) @@ -824,6 +830,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { Expect(createLoadBalancerMonitorOptionsModel.FollowRedirects).To(Equal(core.BoolPtr(true))) Expect(createLoadBalancerMonitorOptionsModel.ExpectedBody).To(Equal(core.StringPtr("alive"))) Expect(createLoadBalancerMonitorOptionsModel.AllowInsecure).To(Equal(core.BoolPtr(true))) + Expect(createLoadBalancerMonitorOptionsModel.Header).To(Equal(make(map[string][]string))) Expect(createLoadBalancerMonitorOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewDeleteLoadBalancerMonitorOptions successfully`, func() { @@ -853,6 +860,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { editLoadBalancerMonitorOptionsModel.SetFollowRedirects(true) editLoadBalancerMonitorOptionsModel.SetExpectedBody("alive") editLoadBalancerMonitorOptionsModel.SetAllowInsecure(true) + editLoadBalancerMonitorOptionsModel.SetHeader(make(map[string][]string)) editLoadBalancerMonitorOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(editLoadBalancerMonitorOptionsModel).ToNot(BeNil()) Expect(editLoadBalancerMonitorOptionsModel.MonitorIdentifier).To(Equal(core.StringPtr("testString"))) @@ -868,6 +876,7 @@ var _ = Describe(`GlobalLoadBalancerMonitorV1`, func() { Expect(editLoadBalancerMonitorOptionsModel.FollowRedirects).To(Equal(core.BoolPtr(true))) Expect(editLoadBalancerMonitorOptionsModel.ExpectedBody).To(Equal(core.StringPtr("alive"))) Expect(editLoadBalancerMonitorOptionsModel.AllowInsecure).To(Equal(core.BoolPtr(true))) + Expect(editLoadBalancerMonitorOptionsModel.Header).To(Equal(make(map[string][]string))) Expect(editLoadBalancerMonitorOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewGetLoadBalancerMonitorOptions successfully`, func() { diff --git a/globalloadbalancerpoolsv0/global_load_balancer_pools_v0.go b/globalloadbalancerpoolsv0/global_load_balancer_pools_v0.go index 1925838..83aec23 100644 --- a/globalloadbalancerpoolsv0/global_load_balancer_pools_v0.go +++ b/globalloadbalancerpoolsv0/global_load_balancer_pools_v0.go @@ -19,10 +19,9 @@ package globalloadbalancerpoolsv0 import ( "encoding/json" - "reflect" - "github.com/IBM/go-sdk-core/v4/core" common "github.com/IBM/networking-go-sdk/common" + "reflect" ) // GlobalLoadBalancerPoolsV0 : GLB Pools @@ -106,7 +105,7 @@ func NewGlobalLoadBalancerPoolsV0(options *GlobalLoadBalancerPoolsV0Options) (se service = &GlobalLoadBalancerPoolsV0{ Service: baseService, - Crn: options.Crn, + Crn: options.Crn, } return @@ -117,7 +116,7 @@ func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) SetServiceURL(url stri return globalLoadBalancerPools.Service.SetServiceURL(url) } -// ListAllLoadBalancerPools : List configured pools +// ListAllLoadBalancerPools : List all pools // List all configured load balancer pools. func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) ListAllLoadBalancerPools(listAllLoadBalancerPoolsOptions *ListAllLoadBalancerPoolsOptions) (result *ListLoadBalancerPoolsResp, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listAllLoadBalancerPoolsOptions, "listAllLoadBalancerPoolsOptions") @@ -163,7 +162,7 @@ func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) ListAllLoadBalancerPoo return } -// CreateLoadBalancerPool : Create a new pool +// CreateLoadBalancerPool : Create pool // Create a new load balancer pool. func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) CreateLoadBalancerPool(createLoadBalancerPoolOptions *CreateLoadBalancerPoolOptions) (result *LoadBalancerPoolResp, response *core.DetailedResponse, err error) { err = core.ValidateStruct(createLoadBalancerPoolOptions, "createLoadBalancerPoolOptions") @@ -240,7 +239,7 @@ func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) CreateLoadBalancerPool return } -// GetLoadBalancerPool : Get details of a pool +// GetLoadBalancerPool : Get pool // Get a single configured load balancer pool. func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) GetLoadBalancerPool(getLoadBalancerPoolOptions *GetLoadBalancerPoolOptions) (result *LoadBalancerPoolResp, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getLoadBalancerPoolOptions, "getLoadBalancerPoolOptions cannot be nil") @@ -290,7 +289,7 @@ func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) GetLoadBalancerPool(ge return } -// DeleteLoadBalancerPool : Delete a configured pool +// DeleteLoadBalancerPool : Delete pool // Delete a specific configured load balancer pool. func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) DeleteLoadBalancerPool(deleteLoadBalancerPoolOptions *DeleteLoadBalancerPoolOptions) (result *DeleteLoadBalancerPoolResp, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteLoadBalancerPoolOptions, "deleteLoadBalancerPoolOptions cannot be nil") @@ -340,7 +339,7 @@ func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) DeleteLoadBalancerPool return } -// EditLoadBalancerPool : Edit a configured pool +// EditLoadBalancerPool : Edit pool // Edit a specific configured load balancer pool. func (globalLoadBalancerPools *GlobalLoadBalancerPoolsV0) EditLoadBalancerPool(editLoadBalancerPoolOptions *EditLoadBalancerPoolOptions) (result *LoadBalancerPoolResp, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(editLoadBalancerPoolOptions, "editLoadBalancerPoolOptions cannot be nil") @@ -544,6 +543,7 @@ type DeleteLoadBalancerPoolRespResult struct { ID *string `json:"id" validate:"required"` } + // UnmarshalDeleteLoadBalancerPoolRespResult unmarshals an instance of DeleteLoadBalancerPoolRespResult from the specified map of raw messages. func UnmarshalDeleteLoadBalancerPoolRespResult(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DeleteLoadBalancerPoolRespResult) @@ -714,8 +714,12 @@ type LoadBalancerPoolPackOriginsItem struct { // healthy. Healthy *bool `json:"healthy,omitempty"` + + // weight. + Weight *float64 `json:"weight,omitempty"` } + // UnmarshalLoadBalancerPoolPackOriginsItem unmarshals an instance of LoadBalancerPoolPackOriginsItem from the specified map of raw messages. func UnmarshalLoadBalancerPoolPackOriginsItem(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolPackOriginsItem) @@ -735,6 +739,10 @@ func UnmarshalLoadBalancerPoolPackOriginsItem(m map[string]json.RawMessage, resu if err != nil { return } + err = core.UnmarshalPrimitive(m, "weight", &obj.Weight) + if err != nil { + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -749,8 +757,12 @@ type LoadBalancerPoolReqOriginsItem struct { // enabled/disabled. Enabled *bool `json:"enabled,omitempty"` + + // weight. + Weight *float64 `json:"weight,omitempty"` } + // UnmarshalLoadBalancerPoolReqOriginsItem unmarshals an instance of LoadBalancerPoolReqOriginsItem from the specified map of raw messages. func UnmarshalLoadBalancerPoolReqOriginsItem(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolReqOriginsItem) @@ -766,6 +778,10 @@ func UnmarshalLoadBalancerPoolReqOriginsItem(m map[string]json.RawMessage, resul if err != nil { return } + err = core.UnmarshalPrimitive(m, "weight", &obj.Weight) + if err != nil { + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -785,6 +801,7 @@ type DeleteLoadBalancerPoolResp struct { Result *DeleteLoadBalancerPoolRespResult `json:"result" validate:"required"` } + // UnmarshalDeleteLoadBalancerPoolResp unmarshals an instance of DeleteLoadBalancerPoolResp from the specified map of raw messages. func UnmarshalDeleteLoadBalancerPoolResp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DeleteLoadBalancerPoolResp) @@ -826,6 +843,7 @@ type ListLoadBalancerPoolsResp struct { ResultInfo *ResultInfo `json:"result_info" validate:"required"` } + // UnmarshalListLoadBalancerPoolsResp unmarshals an instance of ListLoadBalancerPoolsResp from the specified map of raw messages. func UnmarshalListLoadBalancerPoolsResp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ListLoadBalancerPoolsResp) @@ -886,6 +904,7 @@ type LoadBalancerPoolPack struct { NotificationEmail *string `json:"notification_email,omitempty"` } + // UnmarshalLoadBalancerPoolPack unmarshals an instance of LoadBalancerPoolPack from the specified map of raw messages. func UnmarshalLoadBalancerPoolPack(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolPack) @@ -951,6 +970,7 @@ type LoadBalancerPoolResp struct { ResultInfo *ResultInfo `json:"result_info" validate:"required"` } + // UnmarshalLoadBalancerPoolResp unmarshals an instance of LoadBalancerPoolResp from the specified map of raw messages. func UnmarshalLoadBalancerPoolResp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolResp) @@ -993,6 +1013,7 @@ type ResultInfo struct { TotalCount *int64 `json:"total_count" validate:"required"` } + // UnmarshalResultInfo unmarshals an instance of ResultInfo from the specified map of raw messages. func UnmarshalResultInfo(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ResultInfo) diff --git a/globalloadbalancerpoolsv0/global_load_balancer_pools_v0_integration_test.go b/globalloadbalancerpoolsv0/global_load_balancer_pools_v0_integration_test.go index 3183acc..16aaf32 100644 --- a/globalloadbalancerpoolsv0/global_load_balancer_pools_v0_integration_test.go +++ b/globalloadbalancerpoolsv0/global_load_balancer_pools_v0_integration_test.go @@ -11,11 +11,11 @@ import ( "strings" "github.com/IBM/go-sdk-core/core" + "github.com/IBM/networking-go-sdk/globalloadbalancermonitorv1" + . "github.com/IBM/networking-go-sdk/globalloadbalancerpoolsv0" "github.com/joho/godotenv" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/IBM/networking-go-sdk/globalloadbalancermonitorv1" - . "github.com/IBM/networking-go-sdk/globalloadbalancerpoolsv0" ) const configFile = "../cis.env" @@ -176,6 +176,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { Name: core.StringPtr("app-server-1"), Address: core.StringPtr("www.test.com"), Enabled: core.BoolPtr(true), + Weight: core.Float64Ptr(0.1), } origins := []LoadBalancerPoolReqOriginsItem{*origin} option.SetOrigins(origins) diff --git a/globalloadbalancerpoolsv0/global_load_balancer_pools_v0_test.go b/globalloadbalancerpoolsv0/global_load_balancer_pools_v0_test.go index 3084945..8032092 100644 --- a/globalloadbalancerpoolsv0/global_load_balancer_pools_v0_test.go +++ b/globalloadbalancerpoolsv0/global_load_balancer_pools_v0_test.go @@ -19,28 +19,27 @@ package globalloadbalancerpoolsv0_test import ( "bytes" "fmt" + "github.com/IBM/go-sdk-core/v4/core" + "github.com/IBM/networking-go-sdk/globalloadbalancerpoolsv0" + "github.com/go-openapi/strfmt" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" "io" "io/ioutil" "net/http" "net/http/httptest" "os" "time" - - "github.com/IBM/go-sdk-core/v4/core" - "github.com/go-openapi/strfmt" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "github.com/IBM/networking-go-sdk/globalloadbalancerpoolsv0" ) var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { var testServer *httptest.Server - Describe(`Service constructor tests`, func() { + Describe(`Service constructor tests`, func() { crn := "testString" It(`Instantiate service client`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testService).ToNot(BeNil()) Expect(testServiceErr).To(BeNil()) @@ -76,7 +75,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "GLOBAL_LOAD_BALANCER_POOLS_URL": "https://globalloadbalancerpoolsv0/api", + "GLOBAL_LOAD_BALANCER_POOLS_URL": "https://globalloadbalancerpoolsv0/api", "GLOBAL_LOAD_BALANCER_POOLS_AUTH_TYPE": "noauth", } @@ -116,7 +115,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "GLOBAL_LOAD_BALANCER_POOLS_URL": "https://globalloadbalancerpoolsv0/api", + "GLOBAL_LOAD_BALANCER_POOLS_URL": "https://globalloadbalancerpoolsv0/api", "GLOBAL_LOAD_BALANCER_POOLS_AUTH_TYPE": "someOtherAuth", } @@ -134,7 +133,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "GLOBAL_LOAD_BALANCER_POOLS_AUTH_TYPE": "NOAuth", + "GLOBAL_LOAD_BALANCER_POOLS_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) @@ -170,7 +169,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -203,14 +202,14 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { Expect(req.Method).To(Equal("GET")) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"success": true, "errors": [["Errors"]], "messages": [["Messages"]], "result": [{"id": "17b5962d775c646f3f9725cbc7a53df4", "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "description": "Primary data center - Provider XYZ", "name": "primary-dc-1", "enabled": true, "healthy": true, "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc", "origins": [{"name": "app-server-1", "address": "0.0.0.0", "enabled": true, "healthy": true}], "notification_email": "someone@example.com"}], "result_info": {"page": 1, "per_page": 20, "count": 1, "total_count": 2000}}`) + fmt.Fprintf(res, `{"success": true, "errors": [["Errors"]], "messages": [["Messages"]], "result": [{"id": "17b5962d775c646f3f9725cbc7a53df4", "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "description": "Primary data center - Provider XYZ", "name": "primary-dc-1", "enabled": true, "healthy": true, "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc", "origins": [{"name": "app-server-1", "address": "0.0.0.0", "enabled": true, "healthy": true, "weight": 1}], "notification_email": "someone@example.com"}], "result_info": {"page": 1, "per_page": 20, "count": 1, "total_count": 2000}}`) })) }) It(`Invoke ListAllLoadBalancerPools successfully`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -223,7 +222,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { // Construct an instance of the ListAllLoadBalancerPoolsOptions model listAllLoadBalancerPoolsOptionsModel := new(globalloadbalancerpoolsv0.ListAllLoadBalancerPoolsOptions) - listAllLoadBalancerPoolsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + listAllLoadBalancerPoolsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.ListAllLoadBalancerPools(listAllLoadBalancerPoolsOptionsModel) @@ -235,7 +234,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -277,7 +276,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -287,6 +286,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { loadBalancerPoolReqOriginsItemModel.Name = core.StringPtr("app-server-1") loadBalancerPoolReqOriginsItemModel.Address = core.StringPtr("0.0.0.0") loadBalancerPoolReqOriginsItemModel.Enabled = core.BoolPtr(true) + loadBalancerPoolReqOriginsItemModel.Weight = core.Float64Ptr(float64(1)) // Construct an instance of the CreateLoadBalancerPoolOptions model createLoadBalancerPoolOptionsModel := new(globalloadbalancerpoolsv0.CreateLoadBalancerPoolOptions) @@ -324,14 +324,14 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { Expect(req.Method).To(Equal("POST")) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"success": true, "errors": [["Errors"]], "messages": [["Messages"]], "result": {"id": "17b5962d775c646f3f9725cbc7a53df4", "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "description": "Primary data center - Provider XYZ", "name": "primary-dc-1", "enabled": true, "healthy": true, "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc", "origins": [{"name": "app-server-1", "address": "0.0.0.0", "enabled": true, "healthy": true}], "notification_email": "someone@example.com"}, "result_info": {"page": 1, "per_page": 20, "count": 1, "total_count": 2000}}`) + fmt.Fprintf(res, `{"success": true, "errors": [["Errors"]], "messages": [["Messages"]], "result": {"id": "17b5962d775c646f3f9725cbc7a53df4", "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "description": "Primary data center - Provider XYZ", "name": "primary-dc-1", "enabled": true, "healthy": true, "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc", "origins": [{"name": "app-server-1", "address": "0.0.0.0", "enabled": true, "healthy": true, "weight": 1}], "notification_email": "someone@example.com"}, "result_info": {"page": 1, "per_page": 20, "count": 1, "total_count": 2000}}`) })) }) It(`Invoke CreateLoadBalancerPool successfully`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -347,6 +347,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { loadBalancerPoolReqOriginsItemModel.Name = core.StringPtr("app-server-1") loadBalancerPoolReqOriginsItemModel.Address = core.StringPtr("0.0.0.0") loadBalancerPoolReqOriginsItemModel.Enabled = core.BoolPtr(true) + loadBalancerPoolReqOriginsItemModel.Weight = core.Float64Ptr(float64(1)) // Construct an instance of the CreateLoadBalancerPoolOptions model createLoadBalancerPoolOptionsModel := new(globalloadbalancerpoolsv0.CreateLoadBalancerPoolOptions) @@ -358,7 +359,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { createLoadBalancerPoolOptionsModel.Enabled = core.BoolPtr(true) createLoadBalancerPoolOptionsModel.Monitor = core.StringPtr("f1aba936b94213e5b8dca0c0dbf1f9cc") createLoadBalancerPoolOptionsModel.NotificationEmail = core.StringPtr("someone@example.com") - createLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + createLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.CreateLoadBalancerPool(createLoadBalancerPoolOptionsModel) @@ -370,7 +371,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -380,6 +381,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { loadBalancerPoolReqOriginsItemModel.Name = core.StringPtr("app-server-1") loadBalancerPoolReqOriginsItemModel.Address = core.StringPtr("0.0.0.0") loadBalancerPoolReqOriginsItemModel.Enabled = core.BoolPtr(true) + loadBalancerPoolReqOriginsItemModel.Weight = core.Float64Ptr(float64(1)) // Construct an instance of the CreateLoadBalancerPoolOptions model createLoadBalancerPoolOptionsModel := new(globalloadbalancerpoolsv0.CreateLoadBalancerPoolOptions) @@ -426,7 +428,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -460,14 +462,14 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { Expect(req.Method).To(Equal("GET")) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"success": true, "errors": [["Errors"]], "messages": [["Messages"]], "result": {"id": "17b5962d775c646f3f9725cbc7a53df4", "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "description": "Primary data center - Provider XYZ", "name": "primary-dc-1", "enabled": true, "healthy": true, "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc", "origins": [{"name": "app-server-1", "address": "0.0.0.0", "enabled": true, "healthy": true}], "notification_email": "someone@example.com"}, "result_info": {"page": 1, "per_page": 20, "count": 1, "total_count": 2000}}`) + fmt.Fprintf(res, `{"success": true, "errors": [["Errors"]], "messages": [["Messages"]], "result": {"id": "17b5962d775c646f3f9725cbc7a53df4", "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "description": "Primary data center - Provider XYZ", "name": "primary-dc-1", "enabled": true, "healthy": true, "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc", "origins": [{"name": "app-server-1", "address": "0.0.0.0", "enabled": true, "healthy": true, "weight": 1}], "notification_email": "someone@example.com"}, "result_info": {"page": 1, "per_page": 20, "count": 1, "total_count": 2000}}`) })) }) It(`Invoke GetLoadBalancerPool successfully`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -481,7 +483,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { // Construct an instance of the GetLoadBalancerPoolOptions model getLoadBalancerPoolOptionsModel := new(globalloadbalancerpoolsv0.GetLoadBalancerPoolOptions) getLoadBalancerPoolOptionsModel.PoolIdentifier = core.StringPtr("testString") - getLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + getLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.GetLoadBalancerPool(getLoadBalancerPoolOptionsModel) @@ -493,7 +495,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -543,7 +545,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -584,7 +586,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -598,7 +600,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { // Construct an instance of the DeleteLoadBalancerPoolOptions model deleteLoadBalancerPoolOptionsModel := new(globalloadbalancerpoolsv0.DeleteLoadBalancerPoolOptions) deleteLoadBalancerPoolOptionsModel.PoolIdentifier = core.StringPtr("testString") - deleteLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + deleteLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.DeleteLoadBalancerPool(deleteLoadBalancerPoolOptionsModel) @@ -610,7 +612,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -660,7 +662,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -670,6 +672,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { loadBalancerPoolReqOriginsItemModel.Name = core.StringPtr("app-server-1") loadBalancerPoolReqOriginsItemModel.Address = core.StringPtr("0.0.0.0") loadBalancerPoolReqOriginsItemModel.Enabled = core.BoolPtr(true) + loadBalancerPoolReqOriginsItemModel.Weight = core.Float64Ptr(float64(1)) // Construct an instance of the EditLoadBalancerPoolOptions model editLoadBalancerPoolOptionsModel := new(globalloadbalancerpoolsv0.EditLoadBalancerPoolOptions) @@ -708,14 +711,14 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { Expect(req.Method).To(Equal("PUT")) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"success": true, "errors": [["Errors"]], "messages": [["Messages"]], "result": {"id": "17b5962d775c646f3f9725cbc7a53df4", "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "description": "Primary data center - Provider XYZ", "name": "primary-dc-1", "enabled": true, "healthy": true, "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc", "origins": [{"name": "app-server-1", "address": "0.0.0.0", "enabled": true, "healthy": true}], "notification_email": "someone@example.com"}, "result_info": {"page": 1, "per_page": 20, "count": 1, "total_count": 2000}}`) + fmt.Fprintf(res, `{"success": true, "errors": [["Errors"]], "messages": [["Messages"]], "result": {"id": "17b5962d775c646f3f9725cbc7a53df4", "created_on": "2014-01-01T05:20:00.12345Z", "modified_on": "2014-01-01T05:20:00.12345Z", "description": "Primary data center - Provider XYZ", "name": "primary-dc-1", "enabled": true, "healthy": true, "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc", "origins": [{"name": "app-server-1", "address": "0.0.0.0", "enabled": true, "healthy": true, "weight": 1}], "notification_email": "someone@example.com"}, "result_info": {"page": 1, "per_page": 20, "count": 1, "total_count": 2000}}`) })) }) It(`Invoke EditLoadBalancerPool successfully`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -731,6 +734,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { loadBalancerPoolReqOriginsItemModel.Name = core.StringPtr("app-server-1") loadBalancerPoolReqOriginsItemModel.Address = core.StringPtr("0.0.0.0") loadBalancerPoolReqOriginsItemModel.Enabled = core.BoolPtr(true) + loadBalancerPoolReqOriginsItemModel.Weight = core.Float64Ptr(float64(1)) // Construct an instance of the EditLoadBalancerPoolOptions model editLoadBalancerPoolOptionsModel := new(globalloadbalancerpoolsv0.EditLoadBalancerPoolOptions) @@ -743,7 +747,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { editLoadBalancerPoolOptionsModel.Enabled = core.BoolPtr(true) editLoadBalancerPoolOptionsModel.Monitor = core.StringPtr("f1aba936b94213e5b8dca0c0dbf1f9cc") editLoadBalancerPoolOptionsModel.NotificationEmail = core.StringPtr("someone@example.com") - editLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + editLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) result, response, operationErr = testService.EditLoadBalancerPool(editLoadBalancerPoolOptionsModel) @@ -755,7 +759,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, testServiceErr := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) @@ -765,6 +769,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { loadBalancerPoolReqOriginsItemModel.Name = core.StringPtr("app-server-1") loadBalancerPoolReqOriginsItemModel.Address = core.StringPtr("0.0.0.0") loadBalancerPoolReqOriginsItemModel.Enabled = core.BoolPtr(true) + loadBalancerPoolReqOriginsItemModel.Weight = core.Float64Ptr(float64(1)) // Construct an instance of the EditLoadBalancerPoolOptions model editLoadBalancerPoolOptionsModel := new(globalloadbalancerpoolsv0.EditLoadBalancerPoolOptions) @@ -805,7 +810,7 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { testService, _ := globalloadbalancerpoolsv0.NewGlobalLoadBalancerPoolsV0(&globalloadbalancerpoolsv0.GlobalLoadBalancerPoolsV0Options{ URL: "http://globalloadbalancerpoolsv0modelgenerator.com", Authenticator: &core.NoAuthAuthenticator{}, - Crn: core.StringPtr(crn), + Crn: core.StringPtr(crn), }) It(`Invoke NewCreateLoadBalancerPoolOptions successfully`, func() { // Construct an instance of the LoadBalancerPoolReqOriginsItem model @@ -814,9 +819,11 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { loadBalancerPoolReqOriginsItemModel.Name = core.StringPtr("app-server-1") loadBalancerPoolReqOriginsItemModel.Address = core.StringPtr("0.0.0.0") loadBalancerPoolReqOriginsItemModel.Enabled = core.BoolPtr(true) + loadBalancerPoolReqOriginsItemModel.Weight = core.Float64Ptr(float64(1)) Expect(loadBalancerPoolReqOriginsItemModel.Name).To(Equal(core.StringPtr("app-server-1"))) Expect(loadBalancerPoolReqOriginsItemModel.Address).To(Equal(core.StringPtr("0.0.0.0"))) Expect(loadBalancerPoolReqOriginsItemModel.Enabled).To(Equal(core.BoolPtr(true))) + Expect(loadBalancerPoolReqOriginsItemModel.Weight).To(Equal(core.Float64Ptr(float64(1)))) // Construct an instance of the CreateLoadBalancerPoolOptions model createLoadBalancerPoolOptionsModel := testService.NewCreateLoadBalancerPoolOptions() @@ -857,9 +864,11 @@ var _ = Describe(`GlobalLoadBalancerPoolsV0`, func() { loadBalancerPoolReqOriginsItemModel.Name = core.StringPtr("app-server-1") loadBalancerPoolReqOriginsItemModel.Address = core.StringPtr("0.0.0.0") loadBalancerPoolReqOriginsItemModel.Enabled = core.BoolPtr(true) + loadBalancerPoolReqOriginsItemModel.Weight = core.Float64Ptr(float64(1)) Expect(loadBalancerPoolReqOriginsItemModel.Name).To(Equal(core.StringPtr("app-server-1"))) Expect(loadBalancerPoolReqOriginsItemModel.Address).To(Equal(core.StringPtr("0.0.0.0"))) Expect(loadBalancerPoolReqOriginsItemModel.Enabled).To(Equal(core.BoolPtr(true))) + Expect(loadBalancerPoolReqOriginsItemModel.Weight).To(Equal(core.Float64Ptr(float64(1)))) // Construct an instance of the EditLoadBalancerPoolOptions model poolIdentifier := "testString" diff --git a/sslcertificateapiv1/ssl_certificate_api_v1.go b/sslcertificateapiv1/ssl_certificate_api_v1.go index 4b47d53..f33b931 100644 --- a/sslcertificateapiv1/ssl_certificate_api_v1.go +++ b/sslcertificateapiv1/ssl_certificate_api_v1.go @@ -21,8 +21,8 @@ import ( "encoding/json" "fmt" "github.com/IBM/go-sdk-core/v4/core" - "github.com/go-openapi/strfmt" common "github.com/IBM/networking-go-sdk/common" + "github.com/go-openapi/strfmt" "reflect" ) diff --git a/sslcertificateapiv1/ssl_certificate_api_v1_integration_test.go b/sslcertificateapiv1/ssl_certificate_api_v1_integration_test.go index 93bc735..c33fb4b 100644 --- a/sslcertificateapiv1/ssl_certificate_api_v1_integration_test.go +++ b/sslcertificateapiv1/ssl_certificate_api_v1_integration_test.go @@ -184,10 +184,12 @@ var _ = Describe(`sslcertificateapiv1`, func() { Expect(*getResult.Success).Should(BeTrue()) // update custom certificate + updateGeoOpt, updateErr := service.NewCustomCertReqGeoRestrictions("eu") + Expect(updateErr).To(BeNil()) updateOpt := service.NewUpdateCustomCertificateOptions(*uploadResult.Result.ID) updateOpt.SetBundleMethod(UpdateCustomCertificateOptions_BundleMethod_Ubiquitous) updateOpt.SetCertificate(updateCertificate) - updateOpt.SetGeoRestrictions(geoOpt) + updateOpt.SetGeoRestrictions(updateGeoOpt) updateOpt.SetPrivateKey(updatePrivateKey) updateResult, updateResp, updateErr := service.UpdateCustomCertificate(updateOpt) diff --git a/sslcertificateapiv1/ssl_certificate_api_v1_test.go b/sslcertificateapiv1/ssl_certificate_api_v1_test.go index acf3094..a7122f4 100644 --- a/sslcertificateapiv1/ssl_certificate_api_v1_test.go +++ b/sslcertificateapiv1/ssl_certificate_api_v1_test.go @@ -19,18 +19,17 @@ package sslcertificateapiv1_test import ( "bytes" "fmt" + "github.com/IBM/go-sdk-core/v4/core" + "github.com/IBM/networking-go-sdk/sslcertificateapiv1" + "github.com/go-openapi/strfmt" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" "io" "io/ioutil" "net/http" "net/http/httptest" "os" "time" - - "github.com/IBM/go-sdk-core/v4/core" - "github.com/IBM/networking-go-sdk/sslcertificateapiv1" - "github.com/go-openapi/strfmt" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" ) var _ = Describe(`SslCertificateApiV1`, func() {