From d6dc319bb5aa19aff4fd89872198b6e573545110 Mon Sep 17 00:00:00 2001 From: Astha Jain Date: Tue, 16 Mar 2021 16:25:50 -0400 Subject: [PATCH] perf(Instance-groups): Update VPC SDK with API version 2021-03-09 (#23) BREAKING CHANGE: - Methods for Instance group manager is now producing InstanceGroupManagerIntf instead of InstanceGroupManager --- go.mod | 7 +- go.sum | 113 +- vpcv1/vpc_v1.go | 1330 +++++++++++-- vpcv1/vpc_v1_integration_test.go | 49 +- vpcv1/vpc_v1_integration_utils_test.go | 16 +- vpcv1/vpc_v1_test.go | 2512 ++++++++---------------- 6 files changed, 2216 insertions(+), 1811 deletions(-) diff --git a/go.mod b/go.mod index 086fdf3..4dd590d 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,9 @@ go 1.14 require ( github.com/IBM/go-sdk-core/v4 v4.5.1 - github.com/go-openapi/strfmt v0.19.5 - github.com/onsi/ginkgo v1.13.0 - github.com/onsi/gomega v1.10.1 + github.com/IBM/go-sdk-core/v5 v5.2.0 + github.com/go-openapi/strfmt v0.19.10 + github.com/onsi/ginkgo v1.14.2 + github.com/onsi/gomega v1.10.3 github.com/stretchr/testify v1.6.1 ) diff --git a/go.sum b/go.sum index b4f7470..85999c2 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,11 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/IBM/go-sdk-core/v4 v4.5.1 h1:CmXLPY1CkbWY+JS7ncGxLoM4lfF+viA8JPc5anWgoF8= github.com/IBM/go-sdk-core/v4 v4.5.1/go.mod h1:lTUXbqIX6/aAbSCkP6q59+dyFsTwZAc0ewRS2vJWVbg= +github.com/IBM/go-sdk-core/v5 v5.2.0 h1:fVqzyAh9AiEOOcKZHVClmaH78qiYdxcUArP/27yo/l8= +github.com/IBM/go-sdk-core/v5 v5.2.0/go.mod h1:vyNdbFujJtdTj9HbihtvKwwS3k/GKSKpOx9ZIQ6MWDY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -14,12 +18,39 @@ github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4 github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.10 h1:FEv6Pt/V4wLwP4vOCZbWlpfmi8kj4UiRip34IDE6SGw= +github.com/go-openapi/strfmt v0.19.10/go.mod h1:qBBipho+3EoIqn6YDI+4RnQEtj6jT/IdKm+PAlXxSUc= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -28,56 +59,128 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-retryablehttp v0.6.6 h1:HJunrbHTDDbBb/ay4kxa1n+dLmttUlnP3V9oNE4hmsM= +github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= -github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= +github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.4.2 h1:WlnEglfTg/PfPq4WXs2Vkl/5ICC6hoG8+r+LraPmGk4= +go.mongodb.org/mongo-driver v1.4.2/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0 h1:wBouT66WTYFXdxfVdz9sVWARVd/2vfGcmI45D2gj45M= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -89,6 +192,9 @@ google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyz google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= @@ -98,6 +204,7 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/vpcv1/vpc_v1.go b/vpcv1/vpc_v1.go index 1466e6f..370444b 100644 --- a/vpcv1/vpc_v1.go +++ b/vpcv1/vpc_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.26.0-4b317b0c-20210127-171701 + * IBM OpenAPI SDK Code Generator Version: 3.28.0-55613c9e-20210220-164656 */ // Package vpcv1 : Operations and models for the VpcV1 service @@ -37,7 +37,7 @@ import ( // VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage // infrastructure resources, including virtual server instances, subnets, volumes, and load balancers. // -// Version: 2021-02-09 +// Version: 2021-03-09 type VpcV1 struct { Service *core.BaseService @@ -121,8 +121,9 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) { } if options.Version == nil { - options.Version = core.StringPtr("2021-02-09") + options.Version = core.StringPtr("2021-03-09") } + service = &VpcV1{ Service: baseService, Version: options.Version, @@ -1145,9 +1146,6 @@ func (vpc *VpcV1) CreateVPCRouteWithContext(ctx context.Context, createVPCRouteO if createVPCRouteOptions.Destination != nil { body["destination"] = createVPCRouteOptions.Destination } - if createVPCRouteOptions.NextHop != nil { - body["next_hop"] = createVPCRouteOptions.NextHop - } if createVPCRouteOptions.Zone != nil { body["zone"] = createVPCRouteOptions.Zone } @@ -1157,6 +1155,9 @@ func (vpc *VpcV1) CreateVPCRouteWithContext(ctx context.Context, createVPCRouteO if createVPCRouteOptions.Name != nil { body["name"] = createVPCRouteOptions.Name } + if createVPCRouteOptions.NextHop != nil { + body["next_hop"] = createVPCRouteOptions.NextHop + } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -1826,9 +1827,6 @@ func (vpc *VpcV1) CreateVPCRoutingTableRouteWithContext(ctx context.Context, cre if createVPCRoutingTableRouteOptions.Destination != nil { body["destination"] = createVPCRoutingTableRouteOptions.Destination } - if createVPCRoutingTableRouteOptions.NextHop != nil { - body["next_hop"] = createVPCRoutingTableRouteOptions.NextHop - } if createVPCRoutingTableRouteOptions.Zone != nil { body["zone"] = createVPCRoutingTableRouteOptions.Zone } @@ -1838,6 +1836,9 @@ func (vpc *VpcV1) CreateVPCRoutingTableRouteWithContext(ctx context.Context, cre if createVPCRoutingTableRouteOptions.Name != nil { body["name"] = createVPCRoutingTableRouteOptions.Name } + if createVPCRoutingTableRouteOptions.NextHop != nil { + body["next_hop"] = createVPCRoutingTableRouteOptions.NextHop + } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -6107,12 +6108,12 @@ func (vpc *VpcV1) ListInstanceGroupManagersWithContext(ctx context.Context, list // CreateInstanceGroupManager : Create a manager for an instance group // This request creates a new instance group manager. -func (vpc *VpcV1) CreateInstanceGroupManager(createInstanceGroupManagerOptions *CreateInstanceGroupManagerOptions) (result *InstanceGroupManager, response *core.DetailedResponse, err error) { +func (vpc *VpcV1) CreateInstanceGroupManager(createInstanceGroupManagerOptions *CreateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { return vpc.CreateInstanceGroupManagerWithContext(context.Background(), createInstanceGroupManagerOptions) } // CreateInstanceGroupManagerWithContext is an alternate form of the CreateInstanceGroupManager method which supports a Context parameter -func (vpc *VpcV1) CreateInstanceGroupManagerWithContext(ctx context.Context, createInstanceGroupManagerOptions *CreateInstanceGroupManagerOptions) (result *InstanceGroupManager, response *core.DetailedResponse, err error) { +func (vpc *VpcV1) CreateInstanceGroupManagerWithContext(ctx context.Context, createInstanceGroupManagerOptions *CreateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createInstanceGroupManagerOptions, "createInstanceGroupManagerOptions cannot be nil") if err != nil { return @@ -6226,12 +6227,12 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerWithContext(ctx context.Context, del // GetInstanceGroupManager : Retrieve an instance group manager // This request retrieves a single instance group manager specified by identifier in the URL. -func (vpc *VpcV1) GetInstanceGroupManager(getInstanceGroupManagerOptions *GetInstanceGroupManagerOptions) (result *InstanceGroupManager, response *core.DetailedResponse, err error) { +func (vpc *VpcV1) GetInstanceGroupManager(getInstanceGroupManagerOptions *GetInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { return vpc.GetInstanceGroupManagerWithContext(context.Background(), getInstanceGroupManagerOptions) } // GetInstanceGroupManagerWithContext is an alternate form of the GetInstanceGroupManager method which supports a Context parameter -func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getInstanceGroupManagerOptions *GetInstanceGroupManagerOptions) (result *InstanceGroupManager, response *core.DetailedResponse, err error) { +func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getInstanceGroupManagerOptions *GetInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getInstanceGroupManagerOptions, "getInstanceGroupManagerOptions cannot be nil") if err != nil { return @@ -6288,12 +6289,12 @@ func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getIns // UpdateInstanceGroupManager : Update an instance group manager // This request updates an instance group manager with the information provided instance group manager patch. -func (vpc *VpcV1) UpdateInstanceGroupManager(updateInstanceGroupManagerOptions *UpdateInstanceGroupManagerOptions) (result *InstanceGroupManager, response *core.DetailedResponse, err error) { +func (vpc *VpcV1) UpdateInstanceGroupManager(updateInstanceGroupManagerOptions *UpdateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { return vpc.UpdateInstanceGroupManagerWithContext(context.Background(), updateInstanceGroupManagerOptions) } // UpdateInstanceGroupManagerWithContext is an alternate form of the UpdateInstanceGroupManager method which supports a Context parameter -func (vpc *VpcV1) UpdateInstanceGroupManagerWithContext(ctx context.Context, updateInstanceGroupManagerOptions *UpdateInstanceGroupManagerOptions) (result *InstanceGroupManager, response *core.DetailedResponse, err error) { +func (vpc *VpcV1) UpdateInstanceGroupManagerWithContext(ctx context.Context, updateInstanceGroupManagerOptions *UpdateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateInstanceGroupManagerOptions, "updateInstanceGroupManagerOptions cannot be nil") if err != nil { return @@ -10564,6 +10565,264 @@ func (vpc *VpcV1) UpdateSecurityGroupRuleWithContext(ctx context.Context, update return } +// ListSecurityGroupTargets : List all targets associated with a security group +// This request lists all targets associated with a security group, to which the rules in the security group are +// applied. +func (vpc *VpcV1) ListSecurityGroupTargets(listSecurityGroupTargetsOptions *ListSecurityGroupTargetsOptions) (result *SecurityGroupTargetCollection, response *core.DetailedResponse, err error) { + return vpc.ListSecurityGroupTargetsWithContext(context.Background(), listSecurityGroupTargetsOptions) +} + +// ListSecurityGroupTargetsWithContext is an alternate form of the ListSecurityGroupTargets method which supports a Context parameter +func (vpc *VpcV1) ListSecurityGroupTargetsWithContext(ctx context.Context, listSecurityGroupTargetsOptions *ListSecurityGroupTargetsOptions) (result *SecurityGroupTargetCollection, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listSecurityGroupTargetsOptions, "listSecurityGroupTargetsOptions cannot be nil") + if err != nil { + return + } + err = core.ValidateStruct(listSecurityGroupTargetsOptions, "listSecurityGroupTargetsOptions") + if err != nil { + return + } + + pathParamsMap := map[string]string{ + "security_group_id": *listSecurityGroupTargetsOptions.SecurityGroupID, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets`, pathParamsMap) + if err != nil { + return + } + + for headerName, headerValue := range listSecurityGroupTargetsOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSecurityGroupTargets") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) + if listSecurityGroupTargetsOptions.Start != nil { + builder.AddQuery("start", fmt.Sprint(*listSecurityGroupTargetsOptions.Start)) + } + if listSecurityGroupTargetsOptions.Limit != nil { + builder.AddQuery("limit", fmt.Sprint(*listSecurityGroupTargetsOptions.Limit)) + } + + request, err := builder.Build() + if err != nil { + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + return + } + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetCollection) + if err != nil { + return + } + response.Result = result + + return +} + +// DeleteSecurityGroupTargetBinding : Remove a target from a security group +// This request removes a target from a security group. For this request to succeed, the target must be attached to at +// least one other security group. The supplied target identifier can be: +// +// - A network interface identifier +// - An application load balancer identifier +// +// Security groups are stateful, so any changes to a target's security groups are applied to new connections. Existing +// connections are not affected. +func (vpc *VpcV1) DeleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptions *DeleteSecurityGroupTargetBindingOptions) (response *core.DetailedResponse, err error) { + return vpc.DeleteSecurityGroupTargetBindingWithContext(context.Background(), deleteSecurityGroupTargetBindingOptions) +} + +// DeleteSecurityGroupTargetBindingWithContext is an alternate form of the DeleteSecurityGroupTargetBinding method which supports a Context parameter +func (vpc *VpcV1) DeleteSecurityGroupTargetBindingWithContext(ctx context.Context, deleteSecurityGroupTargetBindingOptions *DeleteSecurityGroupTargetBindingOptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(deleteSecurityGroupTargetBindingOptions, "deleteSecurityGroupTargetBindingOptions cannot be nil") + if err != nil { + return + } + err = core.ValidateStruct(deleteSecurityGroupTargetBindingOptions, "deleteSecurityGroupTargetBindingOptions") + if err != nil { + return + } + + pathParamsMap := map[string]string{ + "security_group_id": *deleteSecurityGroupTargetBindingOptions.SecurityGroupID, + "id": *deleteSecurityGroupTargetBindingOptions.ID, + } + + builder := core.NewRequestBuilder(core.DELETE) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap) + if err != nil { + return + } + + for headerName, headerValue := range deleteSecurityGroupTargetBindingOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteSecurityGroupTargetBinding") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) + + request, err := builder.Build() + if err != nil { + return + } + + response, err = vpc.Service.Request(request, nil) + + return +} + +// GetSecurityGroupTarget : Retrieve a security group target +// This request retrieves a single target specified by the identifier in the URL path. The target must be an existing +// target of the security group. +func (vpc *VpcV1) GetSecurityGroupTarget(getSecurityGroupTargetOptions *GetSecurityGroupTargetOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) { + return vpc.GetSecurityGroupTargetWithContext(context.Background(), getSecurityGroupTargetOptions) +} + +// GetSecurityGroupTargetWithContext is an alternate form of the GetSecurityGroupTarget method which supports a Context parameter +func (vpc *VpcV1) GetSecurityGroupTargetWithContext(ctx context.Context, getSecurityGroupTargetOptions *GetSecurityGroupTargetOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(getSecurityGroupTargetOptions, "getSecurityGroupTargetOptions cannot be nil") + if err != nil { + return + } + err = core.ValidateStruct(getSecurityGroupTargetOptions, "getSecurityGroupTargetOptions") + if err != nil { + return + } + + pathParamsMap := map[string]string{ + "security_group_id": *getSecurityGroupTargetOptions.SecurityGroupID, + "id": *getSecurityGroupTargetOptions.ID, + } + + builder := core.NewRequestBuilder(core.GET) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap) + if err != nil { + return + } + + for headerName, headerValue := range getSecurityGroupTargetOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSecurityGroupTarget") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) + + request, err := builder.Build() + if err != nil { + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + return + } + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference) + if err != nil { + return + } + response.Result = result + + return +} + +// CreateSecurityGroupTargetBinding : Add a target to a security group +// This request adds a resource to an existing security group. The supplied target identifier can be: +// +// - A network interface identifier +// - An application load balancer identifier +// +// When a target is added to a security group, the security group rules are applied to the target. A request body is not +// required, and if supplied, is ignored. +func (vpc *VpcV1) CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) { + return vpc.CreateSecurityGroupTargetBindingWithContext(context.Background(), createSecurityGroupTargetBindingOptions) +} + +// CreateSecurityGroupTargetBindingWithContext is an alternate form of the CreateSecurityGroupTargetBinding method which supports a Context parameter +func (vpc *VpcV1) CreateSecurityGroupTargetBindingWithContext(ctx context.Context, createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(createSecurityGroupTargetBindingOptions, "createSecurityGroupTargetBindingOptions cannot be nil") + if err != nil { + return + } + err = core.ValidateStruct(createSecurityGroupTargetBindingOptions, "createSecurityGroupTargetBindingOptions") + if err != nil { + return + } + + pathParamsMap := map[string]string{ + "security_group_id": *createSecurityGroupTargetBindingOptions.SecurityGroupID, + "id": *createSecurityGroupTargetBindingOptions.ID, + } + + builder := core.NewRequestBuilder(core.PUT) + builder = builder.WithContext(ctx) + builder.EnableGzipCompression = vpc.GetEnableGzipCompression() + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap) + if err != nil { + return + } + + for headerName, headerValue := range createSecurityGroupTargetBindingOptions.Headers { + builder.AddHeader(headerName, headerValue) + } + + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateSecurityGroupTargetBinding") + for headerName, headerValue := range sdkHeaders { + builder.AddHeader(headerName, headerValue) + } + builder.AddHeader("Accept", "application/json") + + builder.AddQuery("version", fmt.Sprint(*vpc.Version)) + builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) + + request, err := builder.Build() + if err != nil { + return + } + + var rawResponse map[string]json.RawMessage + response, err = vpc.Service.Request(request, &rawResponse) + if err != nil { + return + } + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference) + if err != nil { + return + } + response.Result = result + + return +} + // ListIkePolicies : List all IKE policies // This request lists all IKE policies in the region. func (vpc *VpcV1) ListIkePolicies(listIkePoliciesOptions *ListIkePoliciesOptions) (result *IkePolicyCollection, response *core.DetailedResponse, err error) { @@ -12638,6 +12897,9 @@ func (vpc *VpcV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadB if createLoadBalancerOptions.ResourceGroup != nil { body["resource_group"] = createLoadBalancerOptions.ResourceGroup } + if createLoadBalancerOptions.SecurityGroups != nil { + body["security_groups"] = createLoadBalancerOptions.SecurityGroups + } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -14962,8 +15224,10 @@ func (vpc *VpcV1) GetEndpointGatewayIPWithContext(ctx context.Context, getEndpoi } // AddEndpointGatewayIP : Bind a reserved IP to an endpoint gateway -// This request binds the specified reserved IP to the specified endpoint gateway. For this request to succeed, the -// reserved IP must currently be unbound and must not have a floating IP bound to it. +// This request binds the specified reserved IP to the specified endpoint gateway. The reserved IP: +// +// - must currently be unbound +// - must not be in the same zone as any other reserved IP bound to the endpoint gateway. func (vpc *VpcV1) AddEndpointGatewayIP(addEndpointGatewayIPOptions *AddEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) { return vpc.AddEndpointGatewayIPWithContext(context.Background(), addEndpointGatewayIPOptions) } @@ -16194,7 +16458,7 @@ type CreateDedicatedHostGroupOptions struct { // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf - // The zone to provision the dedicated host group in. + // The zone this dedicated host group will reside in. Zone ZoneIdentityIntf // Allows users to set headers on API requests @@ -16286,7 +16550,7 @@ type CreateEndpointGatewayOptions struct { // The VPC this endpoint gateway will serve. VPC VPCIdentityIntf `validate:"required"` - // An array of reserved IPs to attach to this endpoint gateway. + // An array of reserved IPs to bind to this endpoint gateway. At most one reserved IP per zone is allowed. Ips []EndpointGatewayReservedIPIntf // The user-defined name for this endpoint gateway. If unspecified, the name will be a hyphenated list of @@ -16479,6 +16743,7 @@ const ( CreateIkePolicyOptionsAuthenticationAlgorithmMd5Const = "md5" CreateIkePolicyOptionsAuthenticationAlgorithmSha1Const = "sha1" CreateIkePolicyOptionsAuthenticationAlgorithmSha256Const = "sha256" + CreateIkePolicyOptionsAuthenticationAlgorithmSha512Const = "sha512" ) // Constants associated with the CreateIkePolicyOptions.EncryptionAlgorithm property. @@ -17035,6 +17300,7 @@ const ( CreateIpsecPolicyOptionsAuthenticationAlgorithmMd5Const = "md5" CreateIpsecPolicyOptionsAuthenticationAlgorithmSha1Const = "sha1" CreateIpsecPolicyOptionsAuthenticationAlgorithmSha256Const = "sha256" + CreateIpsecPolicyOptionsAuthenticationAlgorithmSha512Const = "sha512" ) // Constants associated with the CreateIpsecPolicyOptions.EncryptionAlgorithm property. @@ -17050,6 +17316,7 @@ const ( const ( CreateIpsecPolicyOptionsPfsDisabledConst = "disabled" CreateIpsecPolicyOptionsPfsGroup14Const = "group_14" + CreateIpsecPolicyOptionsPfsGroup19Const = "group_19" CreateIpsecPolicyOptionsPfsGroup2Const = "group_2" CreateIpsecPolicyOptionsPfsGroup5Const = "group_5" ) @@ -17513,6 +17780,11 @@ type CreateLoadBalancerOptions struct { // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf + // The security groups to use for this load balancer. + // + // The load balancer profile must support security groups. + SecurityGroups []SecurityGroupIdentityIntf + // Allows users to set headers on API requests Headers map[string]string } @@ -17573,6 +17845,12 @@ func (options *CreateLoadBalancerOptions) SetResourceGroup(resourceGroup Resourc return options } +// SetSecurityGroups : Allow user to set SecurityGroups +func (options *CreateLoadBalancerOptions) SetSecurityGroups(securityGroups []SecurityGroupIdentityIntf) *CreateLoadBalancerOptions { + options.SecurityGroups = securityGroups + return options +} + // SetHeaders : Allow user to set Headers func (options *CreateLoadBalancerOptions) SetHeaders(param map[string]string) *CreateLoadBalancerOptions { options.Headers = param @@ -17851,7 +18129,7 @@ type CreatePublicGatewayOptions struct { // The VPC this public gateway will serve. VPC VPCIdentityIntf `validate:"required"` - // The zone where this public gateway will be created. + // The zone this public gateway will reside in. Zone ZoneIdentityIntf `validate:"required"` FloatingIP PublicGatewayFloatingIPPrototypeIntf @@ -18008,6 +18286,44 @@ func (options *CreateSecurityGroupRuleOptions) SetHeaders(param map[string]strin return options } +// CreateSecurityGroupTargetBindingOptions : The CreateSecurityGroupTargetBinding options. +type CreateSecurityGroupTargetBindingOptions struct { + // The security group identifier. + SecurityGroupID *string `validate:"required,ne="` + + // The security group target identifier. + ID *string `validate:"required,ne="` + + // Allows users to set headers on API requests + Headers map[string]string +} + +// NewCreateSecurityGroupTargetBindingOptions : Instantiate CreateSecurityGroupTargetBindingOptions +func (*VpcV1) NewCreateSecurityGroupTargetBindingOptions(securityGroupID string, id string) *CreateSecurityGroupTargetBindingOptions { + return &CreateSecurityGroupTargetBindingOptions{ + SecurityGroupID: core.StringPtr(securityGroupID), + ID: core.StringPtr(id), + } +} + +// SetSecurityGroupID : Allow user to set SecurityGroupID +func (options *CreateSecurityGroupTargetBindingOptions) SetSecurityGroupID(securityGroupID string) *CreateSecurityGroupTargetBindingOptions { + options.SecurityGroupID = core.StringPtr(securityGroupID) + return options +} + +// SetID : Allow user to set ID +func (options *CreateSecurityGroupTargetBindingOptions) SetID(id string) *CreateSecurityGroupTargetBindingOptions { + options.ID = core.StringPtr(id) + return options +} + +// SetHeaders : Allow user to set Headers +func (options *CreateSecurityGroupTargetBindingOptions) SetHeaders(param map[string]string) *CreateSecurityGroupTargetBindingOptions { + options.Headers = param + return options +} + // CreateSubnetOptions : The CreateSubnet options. type CreateSubnetOptions struct { // The subnet prototype object. @@ -18128,12 +18444,17 @@ type CreateVPCAddressPrefixOptions struct { VPCID *string `validate:"required,ne="` // The IPv4 range of the address prefix, expressed in CIDR format. The request must not overlap with any existing - // address prefixes in the VPC, and must fall within the [RFC 1918](https://tools.ietf.org/html/rfc1918) address - // ranges. The prefix length of the address prefix's CIDR must be between `/9` (8,388,608 addresses) and `/29` (8 - // addresses). + // address prefixes in the VPC or any of the following reserved address ranges: + // - `127.0.0.0/8` (IPv4 loopback addresses) + // - `161.26.0.0/16` (IBM services) + // - `166.8.0.0/14` (Cloud Service Endpoints) + // - `169.254.0.0/16` (IPv4 link-local addresses) + // - `224.0.0.0/4` (IPv4 multicast addresses) + // + // The prefix length of the address prefix's CIDR must be between `/9` (8,388,608 addresses) and `/29` (8 addresses). CIDR *string `validate:"required"` - // The zone this address prefix is to belong to. + // The zone this address prefix will reside in. Zone ZoneIdentityIntf `validate:"required"` // Indicates whether this is the default prefix for this zone in this VPC. If true, this prefix will become the default @@ -18269,16 +18590,14 @@ type CreateVPCRouteOptions struct { // `next_hop` is an IP address. Destination *string `validate:"required"` - // If `action` is `deliver`, the next hop that packets will be delivered to. For - // other `action` values, its `address` will be `0.0.0.0`. - NextHop RouteNextHopPrototypeIntf `validate:"required"` - // The zone to apply the route to. (Traffic from subnets in this zone will be // subject to this route.). Zone ZoneIdentityIntf `validate:"required"` // The action to perform with a packet matching the route: // - `delegate`: delegate to the system's built-in routes + // - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound + // routes // - `deliver`: deliver the packet to the specified `next_hop` // - `drop`: drop the packet. Action *string @@ -18287,6 +18606,10 @@ type CreateVPCRouteOptions struct { // Names must be unique within the VPC routing table the route resides in. Name *string + // If `action` is `deliver`, the next hop that packets will be delivered to. For + // other `action` values, it must be omitted or specified as `0.0.0.0`. + NextHop RouteNextHopPrototypeIntf + // Allows users to set headers on API requests Headers map[string]string } @@ -18294,20 +18617,22 @@ type CreateVPCRouteOptions struct { // Constants associated with the CreateVPCRouteOptions.Action property. // The action to perform with a packet matching the route: // - `delegate`: delegate to the system's built-in routes +// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound +// routes // - `deliver`: deliver the packet to the specified `next_hop` // - `drop`: drop the packet. const ( - CreateVPCRouteOptionsActionDelegateConst = "delegate" - CreateVPCRouteOptionsActionDeliverConst = "deliver" - CreateVPCRouteOptionsActionDropConst = "drop" + CreateVPCRouteOptionsActionDelegateConst = "delegate" + CreateVPCRouteOptionsActionDelegateVPCConst = "delegate_vpc" + CreateVPCRouteOptionsActionDeliverConst = "deliver" + CreateVPCRouteOptionsActionDropConst = "drop" ) // NewCreateVPCRouteOptions : Instantiate CreateVPCRouteOptions -func (*VpcV1) NewCreateVPCRouteOptions(vpcID string, destination string, nextHop RouteNextHopPrototypeIntf, zone ZoneIdentityIntf) *CreateVPCRouteOptions { +func (*VpcV1) NewCreateVPCRouteOptions(vpcID string, destination string, zone ZoneIdentityIntf) *CreateVPCRouteOptions { return &CreateVPCRouteOptions{ VPCID: core.StringPtr(vpcID), Destination: core.StringPtr(destination), - NextHop: nextHop, Zone: zone, } } @@ -18324,12 +18649,6 @@ func (options *CreateVPCRouteOptions) SetDestination(destination string) *Create return options } -// SetNextHop : Allow user to set NextHop -func (options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions { - options.NextHop = nextHop - return options -} - // SetZone : Allow user to set Zone func (options *CreateVPCRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRouteOptions { options.Zone = zone @@ -18348,6 +18667,12 @@ func (options *CreateVPCRouteOptions) SetName(name string) *CreateVPCRouteOption return options } +// SetNextHop : Allow user to set NextHop +func (options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions { + options.NextHop = nextHop + return options +} + // SetHeaders : Allow user to set Headers func (options *CreateVPCRouteOptions) SetHeaders(param map[string]string) *CreateVPCRouteOptions { options.Headers = param @@ -18466,16 +18791,14 @@ type CreateVPCRoutingTableRouteOptions struct { // `next_hop` is an IP address. Destination *string `validate:"required"` - // If `action` is `deliver`, the next hop that packets will be delivered to. For - // other `action` values, its `address` will be `0.0.0.0`. - NextHop RouteNextHopPrototypeIntf `validate:"required"` - // The zone to apply the route to. (Traffic from subnets in this zone will be // subject to this route.). Zone ZoneIdentityIntf `validate:"required"` // The action to perform with a packet matching the route: // - `delegate`: delegate to the system's built-in routes + // - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound + // routes // - `deliver`: deliver the packet to the specified `next_hop` // - `drop`: drop the packet. Action *string @@ -18484,6 +18807,10 @@ type CreateVPCRoutingTableRouteOptions struct { // Names must be unique within the VPC routing table the route resides in. Name *string + // If `action` is `deliver`, the next hop that packets will be delivered to. For + // other `action` values, it must be omitted or specified as `0.0.0.0`. + NextHop RouteNextHopPrototypeIntf + // Allows users to set headers on API requests Headers map[string]string } @@ -18491,21 +18818,23 @@ type CreateVPCRoutingTableRouteOptions struct { // Constants associated with the CreateVPCRoutingTableRouteOptions.Action property. // The action to perform with a packet matching the route: // - `delegate`: delegate to the system's built-in routes +// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound +// routes // - `deliver`: deliver the packet to the specified `next_hop` // - `drop`: drop the packet. const ( - CreateVPCRoutingTableRouteOptionsActionDelegateConst = "delegate" - CreateVPCRoutingTableRouteOptionsActionDeliverConst = "deliver" - CreateVPCRoutingTableRouteOptionsActionDropConst = "drop" + CreateVPCRoutingTableRouteOptionsActionDelegateConst = "delegate" + CreateVPCRoutingTableRouteOptionsActionDelegateVPCConst = "delegate_vpc" + CreateVPCRoutingTableRouteOptionsActionDeliverConst = "deliver" + CreateVPCRoutingTableRouteOptionsActionDropConst = "drop" ) // NewCreateVPCRoutingTableRouteOptions : Instantiate CreateVPCRoutingTableRouteOptions -func (*VpcV1) NewCreateVPCRoutingTableRouteOptions(vpcID string, routingTableID string, destination string, nextHop RouteNextHopPrototypeIntf, zone ZoneIdentityIntf) *CreateVPCRoutingTableRouteOptions { +func (*VpcV1) NewCreateVPCRoutingTableRouteOptions(vpcID string, routingTableID string, destination string, zone ZoneIdentityIntf) *CreateVPCRoutingTableRouteOptions { return &CreateVPCRoutingTableRouteOptions{ VPCID: core.StringPtr(vpcID), RoutingTableID: core.StringPtr(routingTableID), Destination: core.StringPtr(destination), - NextHop: nextHop, Zone: zone, } } @@ -18528,12 +18857,6 @@ func (options *CreateVPCRoutingTableRouteOptions) SetDestination(destination str return options } -// SetNextHop : Allow user to set NextHop -func (options *CreateVPCRoutingTableRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRoutingTableRouteOptions { - options.NextHop = nextHop - return options -} - // SetZone : Allow user to set Zone func (options *CreateVPCRoutingTableRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRoutingTableRouteOptions { options.Zone = zone @@ -18552,6 +18875,12 @@ func (options *CreateVPCRoutingTableRouteOptions) SetName(name string) *CreateVP return options } +// SetNextHop : Allow user to set NextHop +func (options *CreateVPCRoutingTableRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRoutingTableRouteOptions { + options.NextHop = nextHop + return options +} + // SetHeaders : Allow user to set Headers func (options *CreateVPCRoutingTableRouteOptions) SetHeaders(param map[string]string) *CreateVPCRoutingTableRouteOptions { options.Headers = param @@ -18691,7 +19020,7 @@ type DedicatedHost struct { // The total VCPU of the dedicated host. Vcpu *Vcpu `json:"vcpu" validate:"required"` - // The reference of the zone to provision the dedicated host in. + // The zone this dedicated host resides in. Zone *ZoneReference `json:"zone" validate:"required"` } @@ -18934,7 +19263,7 @@ type DedicatedHostGroup struct { // Array of instance profiles that can be used by instances placed on this dedicated host group. SupportedInstanceProfiles []InstanceProfileReference `json:"supported_instance_profiles" validate:"required"` - // The zone the dedicated host group resides in. + // The zone this dedicated host group resides in. Zone *ZoneReference `json:"zone" validate:"required"` } @@ -19806,7 +20135,7 @@ type DedicatedHostPrototype struct { // The dedicated host group for this dedicated host. Group DedicatedHostGroupIdentityIntf `json:"group,omitempty"` - // The zone to provision the dedicated host in. + // The zone this dedicated host will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` } @@ -21215,6 +21544,44 @@ func (options *DeleteSecurityGroupRuleOptions) SetHeaders(param map[string]strin return options } +// DeleteSecurityGroupTargetBindingOptions : The DeleteSecurityGroupTargetBinding options. +type DeleteSecurityGroupTargetBindingOptions struct { + // The security group identifier. + SecurityGroupID *string `validate:"required,ne="` + + // The security group target identifier. + ID *string `validate:"required,ne="` + + // Allows users to set headers on API requests + Headers map[string]string +} + +// NewDeleteSecurityGroupTargetBindingOptions : Instantiate DeleteSecurityGroupTargetBindingOptions +func (*VpcV1) NewDeleteSecurityGroupTargetBindingOptions(securityGroupID string, id string) *DeleteSecurityGroupTargetBindingOptions { + return &DeleteSecurityGroupTargetBindingOptions{ + SecurityGroupID: core.StringPtr(securityGroupID), + ID: core.StringPtr(id), + } +} + +// SetSecurityGroupID : Allow user to set SecurityGroupID +func (options *DeleteSecurityGroupTargetBindingOptions) SetSecurityGroupID(securityGroupID string) *DeleteSecurityGroupTargetBindingOptions { + options.SecurityGroupID = core.StringPtr(securityGroupID) + return options +} + +// SetID : Allow user to set ID +func (options *DeleteSecurityGroupTargetBindingOptions) SetID(id string) *DeleteSecurityGroupTargetBindingOptions { + options.ID = core.StringPtr(id) + return options +} + +// SetHeaders : Allow user to set Headers +func (options *DeleteSecurityGroupTargetBindingOptions) SetHeaders(param map[string]string) *DeleteSecurityGroupTargetBindingOptions { + options.Headers = param + return options +} + // DeleteSubnetOptions : The DeleteSubnet options. type DeleteSubnetOptions struct { // The subnet identifier. @@ -22080,7 +22447,7 @@ type FloatingIP struct { // The target of this floating IP. Target FloatingIPTargetIntf `json:"target,omitempty"` - // The zone the floating IP resides in. + // The zone this floating IP resides in. Zone *ZoneReference `json:"zone" validate:"required"` } @@ -22340,7 +22707,7 @@ type FloatingIPPrototype struct { // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` - // The identity of the zone to provision a floating IP in. + // The zone this floating IP will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` // The network interface this floating IP is to be bound to. @@ -24199,6 +24566,44 @@ func (options *GetSecurityGroupRuleOptions) SetHeaders(param map[string]string) return options } +// GetSecurityGroupTargetOptions : The GetSecurityGroupTarget options. +type GetSecurityGroupTargetOptions struct { + // The security group identifier. + SecurityGroupID *string `validate:"required,ne="` + + // The security group target identifier. + ID *string `validate:"required,ne="` + + // Allows users to set headers on API requests + Headers map[string]string +} + +// NewGetSecurityGroupTargetOptions : Instantiate GetSecurityGroupTargetOptions +func (*VpcV1) NewGetSecurityGroupTargetOptions(securityGroupID string, id string) *GetSecurityGroupTargetOptions { + return &GetSecurityGroupTargetOptions{ + SecurityGroupID: core.StringPtr(securityGroupID), + ID: core.StringPtr(id), + } +} + +// SetSecurityGroupID : Allow user to set SecurityGroupID +func (options *GetSecurityGroupTargetOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupTargetOptions { + options.SecurityGroupID = core.StringPtr(securityGroupID) + return options +} + +// SetID : Allow user to set ID +func (options *GetSecurityGroupTargetOptions) SetID(id string) *GetSecurityGroupTargetOptions { + options.ID = core.StringPtr(id) + return options +} + +// SetHeaders : Allow user to set Headers +func (options *GetSecurityGroupTargetOptions) SetHeaders(param map[string]string) *GetSecurityGroupTargetOptions { + options.Headers = param + return options +} + // GetSubnetNetworkACLOptions : The GetSubnetNetworkACL options. type GetSubnetNetworkACLOptions struct { // The subnet identifier. @@ -24793,6 +25198,7 @@ const ( IkePolicyAuthenticationAlgorithmMd5Const = "md5" IkePolicyAuthenticationAlgorithmSha1Const = "sha1" IkePolicyAuthenticationAlgorithmSha256Const = "sha256" + IkePolicyAuthenticationAlgorithmSha512Const = "sha512" ) // Constants associated with the IkePolicy.EncryptionAlgorithm property. @@ -24982,6 +25388,7 @@ const ( IkePolicyPatchAuthenticationAlgorithmMd5Const = "md5" IkePolicyPatchAuthenticationAlgorithmSha1Const = "sha1" IkePolicyPatchAuthenticationAlgorithmSha256Const = "sha256" + IkePolicyPatchAuthenticationAlgorithmSha512Const = "sha512" ) // Constants associated with the IkePolicyPatch.EncryptionAlgorithm property. @@ -25152,6 +25559,7 @@ const ( IPsecPolicyAuthenticationAlgorithmMd5Const = "md5" IPsecPolicyAuthenticationAlgorithmSha1Const = "sha1" IPsecPolicyAuthenticationAlgorithmSha256Const = "sha256" + IPsecPolicyAuthenticationAlgorithmSha512Const = "sha512" ) // Constants associated with the IPsecPolicy.EncapsulationMode property. @@ -25173,6 +25581,7 @@ const ( const ( IPsecPolicyPfsDisabledConst = "disabled" IPsecPolicyPfsGroup14Const = "group_14" + IPsecPolicyPfsGroup19Const = "group_19" IPsecPolicyPfsGroup2Const = "group_2" IPsecPolicyPfsGroup5Const = "group_5" ) @@ -25387,6 +25796,7 @@ const ( IPsecPolicyPatchAuthenticationAlgorithmMd5Const = "md5" IPsecPolicyPatchAuthenticationAlgorithmSha1Const = "sha1" IPsecPolicyPatchAuthenticationAlgorithmSha256Const = "sha256" + IPsecPolicyPatchAuthenticationAlgorithmSha512Const = "sha512" ) // Constants associated with the IPsecPolicyPatch.EncryptionAlgorithm property. @@ -25402,6 +25812,7 @@ const ( const ( IPsecPolicyPatchPfsDisabledConst = "disabled" IPsecPolicyPatchPfsGroup14Const = "group_14" + IPsecPolicyPatchPfsGroup19Const = "group_19" IPsecPolicyPatchPfsGroup2Const = "group_2" IPsecPolicyPatchPfsGroup5Const = "group_5" ) @@ -26183,10 +26594,10 @@ type Instance struct { // Collection of the virtual server instance's volume attachments, including the boot volume attachment. VolumeAttachments []VolumeAttachmentReferenceInstanceContext `json:"volume_attachments" validate:"required"` - // The VPC the virtual server instance resides in. + // The VPC this virtual server instance resides in. VPC *VPCReference `json:"vpc" validate:"required"` - // The zone the virtual server instance resides in. + // The zone this virtual server instance resides in. Zone *ZoneReference `json:"zone" validate:"required"` } @@ -26700,13 +27111,9 @@ func UnmarshalInstanceGroupCollectionNext(m map[string]json.RawMessage, result i } // InstanceGroupManager : InstanceGroupManager struct +// Models which "extend" this model: +// - InstanceGroupManagerAutoScale type InstanceGroupManager struct { - // The time window in seconds to aggregate metrics prior to evaluation. - AggregationWindow *int64 `json:"aggregation_window,omitempty"` - - // The duration of time in seconds to pause further scale actions after scaling has taken place. - Cooldown *int64 `json:"cooldown,omitempty"` - // The URL for this instance group manager. Href *string `json:"href" validate:"required"` @@ -26716,8 +27123,17 @@ type InstanceGroupManager struct { // If set to `true`, this manager will control the instance group. ManagementEnabled *bool `json:"management_enabled" validate:"required"` + // The user-defined name for this instance group manager. Names must be unique within the instance group. + Name *string `json:"name" validate:"required"` + + // The time window in seconds to aggregate metrics prior to evaluation. + AggregationWindow *int64 `json:"aggregation_window,omitempty"` + + // The duration of time in seconds to pause further scale actions after scaling has taken place. + Cooldown *int64 `json:"cooldown,omitempty"` + // The type of instance group manager. - ManagerType *string `json:"manager_type" validate:"required"` + ManagerType *string `json:"manager_type,omitempty"` // The maximum number of members in a managed instance group. MaxMembershipCount *int64 `json:"max_membership_count,omitempty"` @@ -26725,11 +27141,8 @@ type InstanceGroupManager struct { // The minimum number of members in a managed instance group. MinMembershipCount *int64 `json:"min_membership_count,omitempty"` - // The user-defined name for this instance group manager. Names must be unique within the instance group. - Name *string `json:"name" validate:"required"` - // The policies of the instance group manager. - Policies []InstanceGroupManagerPolicyReference `json:"policies" validate:"required"` + Policies []InstanceGroupManagerPolicyReference `json:"policies,omitempty"` } // Constants associated with the InstanceGroupManager.ManagerType property. @@ -26738,42 +27151,50 @@ const ( InstanceGroupManagerManagerTypeAutoscaleConst = "autoscale" ) +func (*InstanceGroupManager) isaInstanceGroupManager() bool { + return true +} + +type InstanceGroupManagerIntf interface { + isaInstanceGroupManager() bool +} + // UnmarshalInstanceGroupManager unmarshals an instance of InstanceGroupManager from the specified map of raw messages. func UnmarshalInstanceGroupManager(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManager) - err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } - err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) + err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { return } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } - err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) + err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) if err != nil { return } - err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) + err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) if err != nil { return } - err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) + err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { return } - err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) + err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { return } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { return } @@ -26794,7 +27215,7 @@ type InstanceGroupManagerCollection struct { Limit *int64 `json:"limit" validate:"required"` // Collection of instance group managers. - Managers []InstanceGroupManager `json:"managers" validate:"required"` + Managers []InstanceGroupManagerIntf `json:"managers" validate:"required"` // A link to the next page of resources. This property is present for all pages // except the last page. @@ -28330,7 +28751,7 @@ type InstancePrototype struct { // Primary network interface. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` // Identifies an instance template by a unique property. @@ -28524,7 +28945,7 @@ type InstanceTemplate struct { // Primary network interface. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` // Identifies an instance template by a unique property. @@ -28810,7 +29231,7 @@ type InstanceTemplatePrototype struct { // Primary network interface. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` // Identifies an instance template by a unique property. @@ -29330,7 +29751,7 @@ func (options *ListDedicatedHostProfilesOptions) SetHeaders(param map[string]str // ListDedicatedHostsOptions : The ListDedicatedHosts options. type ListDedicatedHostsOptions struct { - // Filters the collection to dedicated host groups with specified identifier. + // Filters the collection to dedicated host groups with the specified identifier. DedicatedHostGroupID *string // A server-supplied token determining what resource to start the page on. @@ -30770,6 +31191,52 @@ func (options *ListSecurityGroupRulesOptions) SetHeaders(param map[string]string return options } +// ListSecurityGroupTargetsOptions : The ListSecurityGroupTargets options. +type ListSecurityGroupTargetsOptions struct { + // The security group identifier. + SecurityGroupID *string `validate:"required,ne="` + + // A server-supplied token determining what resource to start the page on. + Start *string + + // The number of resources to return on a page. + Limit *int64 + + // Allows users to set headers on API requests + Headers map[string]string +} + +// NewListSecurityGroupTargetsOptions : Instantiate ListSecurityGroupTargetsOptions +func (*VpcV1) NewListSecurityGroupTargetsOptions(securityGroupID string) *ListSecurityGroupTargetsOptions { + return &ListSecurityGroupTargetsOptions{ + SecurityGroupID: core.StringPtr(securityGroupID), + } +} + +// SetSecurityGroupID : Allow user to set SecurityGroupID +func (options *ListSecurityGroupTargetsOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupTargetsOptions { + options.SecurityGroupID = core.StringPtr(securityGroupID) + return options +} + +// SetStart : Allow user to set Start +func (options *ListSecurityGroupTargetsOptions) SetStart(start string) *ListSecurityGroupTargetsOptions { + options.Start = core.StringPtr(start) + return options +} + +// SetLimit : Allow user to set Limit +func (options *ListSecurityGroupTargetsOptions) SetLimit(limit int64) *ListSecurityGroupTargetsOptions { + options.Limit = core.Int64Ptr(limit) + return options +} + +// SetHeaders : Allow user to set Headers +func (options *ListSecurityGroupTargetsOptions) SetHeaders(param map[string]string) *ListSecurityGroupTargetsOptions { + options.Headers = param + return options +} + // ListSecurityGroupsOptions : The ListSecurityGroups options. type ListSecurityGroupsOptions struct { // A server-supplied token determining what resource to start the page on. @@ -30923,10 +31390,10 @@ type ListSubnetsOptions struct { // resource group identifiers. ResourceGroupID *string - // Filters the collection to subnets with the routing table of the specified identifier. + // Filters the collection to subnets attached to the routing table with the specified identifier. RoutingTableID *string - // Filters the collection to subnets with the routing table of the specified name. + // Filters the collection to subnets attached to the routing table with the specified name. RoutingTableName *string // Allows users to set headers on API requests @@ -31557,6 +32024,14 @@ type LoadBalancer struct { // The resource group for this load balancer. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` + // The security groups targeting this load balancer. + // + // Applicable only for load balancers that support security groups. + SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"` + + // Indicates whether this load balancer supports security groups. + SecurityGroupsSupported *bool `json:"security_groups_supported" validate:"required"` + // The subnets this load balancer is part of. Subnets []SubnetReference `json:"subnets" validate:"required"` } @@ -31646,6 +32121,14 @@ func UnmarshalLoadBalancer(m map[string]json.RawMessage, result interface{}) (er if err != nil { return } + err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "security_groups_supported", &obj.SecurityGroupsSupported) + if err != nil { + return + } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { return @@ -34024,6 +34507,8 @@ type LoadBalancerProfile struct { // The globally unique name for this load balancer profile. Name *string `json:"name" validate:"required"` + + SecurityGroupsSupported LoadBalancerProfileSecurityGroupsSupportedIntf `json:"security_groups_supported" validate:"required"` } // UnmarshalLoadBalancerProfile unmarshals an instance of LoadBalancerProfile from the specified map of raw messages. @@ -34045,6 +34530,10 @@ func UnmarshalLoadBalancerProfile(m map[string]json.RawMessage, result interface if err != nil { return } + err = core.UnmarshalModel(m, "security_groups_supported", &obj.SecurityGroupsSupported, UnmarshalLoadBalancerProfileSecurityGroupsSupported) + if err != nil { + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -34225,6 +34714,65 @@ func UnmarshalLoadBalancerProfileReference(m map[string]json.RawMessage, result return } +// LoadBalancerProfileSecurityGroupsSupported : LoadBalancerProfileSecurityGroupsSupported struct +// Models which "extend" this model: +// - LoadBalancerProfileSecurityGroupsSupportedFixed +// - LoadBalancerProfileSecurityGroupsSupportedDependent +type LoadBalancerProfileSecurityGroupsSupported struct { + // The type for this profile field. + Type *string `json:"type,omitempty"` + + // The value for this profile field. + Value *bool `json:"value,omitempty"` +} + +// Constants associated with the LoadBalancerProfileSecurityGroupsSupported.Type property. +// The type for this profile field. +const ( + LoadBalancerProfileSecurityGroupsSupportedTypeFixedConst = "fixed" +) + +func (*LoadBalancerProfileSecurityGroupsSupported) isaLoadBalancerProfileSecurityGroupsSupported() bool { + return true +} + +type LoadBalancerProfileSecurityGroupsSupportedIntf interface { + isaLoadBalancerProfileSecurityGroupsSupported() bool +} + +// UnmarshalLoadBalancerProfileSecurityGroupsSupported unmarshals an instance of LoadBalancerProfileSecurityGroupsSupported from the specified map of raw messages. +func UnmarshalLoadBalancerProfileSecurityGroupsSupported(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerProfileSecurityGroupsSupported) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// LoadBalancerReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary +// information. +type LoadBalancerReferenceDeleted struct { + // Link to documentation about deleted resources. + MoreInfo *string `json:"more_info" validate:"required"` +} + +// UnmarshalLoadBalancerReferenceDeleted unmarshals an instance of LoadBalancerReferenceDeleted from the specified map of raw messages. +func UnmarshalLoadBalancerReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerReferenceDeleted) + err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // LoadBalancerStatistics : LoadBalancerStatistics struct type LoadBalancerStatistics struct { // Number of active connections of this load balancer. @@ -36051,7 +36599,7 @@ type PublicGateway struct { // The VPC this public gateway serves. VPC *VPCReference `json:"vpc" validate:"required"` - // The zone where this public gateway lives. + // The zone this public gateway resides in. Zone *ZoneReference `json:"zone" validate:"required"` } @@ -37676,11 +38224,18 @@ func UnmarshalRouteNextHop(m map[string]json.RawMessage, result interface{}) (er // RouteNextHopPrototype : The next hop packets will be routed to. // Models which "extend" this model: // - RouteNextHopPrototypeRouteNextHopIP +// - RouteNextHopPrototypeVPNGatewayConnectionIdentity type RouteNextHopPrototype struct { // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this // property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing // and surface the error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address,omitempty"` + + // The unique identifier for this VPN gateway connection. + ID *string `json:"id,omitempty"` + + // The VPN connection's canonical URL. + Href *string `json:"href,omitempty"` } func (*RouteNextHopPrototype) isaRouteNextHopPrototype() bool { @@ -37698,6 +38253,14 @@ func UnmarshalRouteNextHopPrototype(m map[string]json.RawMessage, result interfa if err != nil { return } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -37733,6 +38296,8 @@ func (routePatch *RoutePatch) AsPatch() (patch map[string]interface{}, err error type RoutePrototype struct { // The action to perform with a packet matching the route: // - `delegate`: delegate to the system's built-in routes + // - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound + // routes // - `deliver`: deliver the packet to the specified `next_hop` // - `drop`: drop the packet. Action *string `json:"action,omitempty"` @@ -37747,8 +38312,8 @@ type RoutePrototype struct { Name *string `json:"name,omitempty"` // If `action` is `deliver`, the next hop that packets will be delivered to. For - // other `action` values, its `address` will be `0.0.0.0`. - NextHop RouteNextHopPrototypeIntf `json:"next_hop" validate:"required"` + // other `action` values, it must be omitted or specified as `0.0.0.0`. + NextHop RouteNextHopPrototypeIntf `json:"next_hop,omitempty"` // The zone to apply the route to. (Traffic from subnets in this zone will be // subject to this route.). @@ -37758,19 +38323,21 @@ type RoutePrototype struct { // Constants associated with the RoutePrototype.Action property. // The action to perform with a packet matching the route: // - `delegate`: delegate to the system's built-in routes +// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound +// routes // - `deliver`: deliver the packet to the specified `next_hop` // - `drop`: drop the packet. const ( - RoutePrototypeActionDelegateConst = "delegate" - RoutePrototypeActionDeliverConst = "deliver" - RoutePrototypeActionDropConst = "drop" + RoutePrototypeActionDelegateConst = "delegate" + RoutePrototypeActionDelegateVPCConst = "delegate_vpc" + RoutePrototypeActionDeliverConst = "deliver" + RoutePrototypeActionDropConst = "drop" ) // NewRoutePrototype : Instantiate RoutePrototype (Generic Model Constructor) -func (*VpcV1) NewRoutePrototype(destination string, nextHop RouteNextHopPrototypeIntf, zone ZoneIdentityIntf) (model *RoutePrototype, err error) { +func (*VpcV1) NewRoutePrototype(destination string, zone ZoneIdentityIntf) (model *RoutePrototype, err error) { model = &RoutePrototype{ Destination: core.StringPtr(destination), - NextHop: nextHop, Zone: zone, } err = core.ValidateStruct(model, "required parameters") @@ -38279,6 +38846,9 @@ type SecurityGroup struct { // Array of rules for this security group. If no rules exist, all traffic will be denied. Rules []SecurityGroupRuleIntf `json:"rules" validate:"required"` + // Array of references to targets. + Targets []SecurityGroupTargetReferenceIntf `json:"targets" validate:"required"` + // The VPC this security group is a part of. VPC *VPCReference `json:"vpc" validate:"required"` } @@ -38318,6 +38888,10 @@ func UnmarshalSecurityGroup(m map[string]json.RawMessage, result interface{}) (e if err != nil { return } + err = core.UnmarshalModel(m, "targets", &obj.Targets, UnmarshalSecurityGroupTargetReference) + if err != nil { + return + } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { return @@ -39028,6 +39602,156 @@ func UnmarshalSecurityGroupRuleRemotePrototype(m map[string]json.RawMessage, res return } +// SecurityGroupTargetCollection : SecurityGroupTargetCollection struct +type SecurityGroupTargetCollection struct { + // A link to the first page of resources. + First *SecurityGroupTargetCollectionFirst `json:"first" validate:"required"` + + // The maximum number of resources that can be returned by the request. + Limit *int64 `json:"limit" validate:"required"` + + // A link to the next page of resources. This property is present for all pages + // except the last page. + Next *SecurityGroupTargetCollectionNext `json:"next,omitempty"` + + // Collection of security group target references. + Targets []SecurityGroupTargetReferenceIntf `json:"targets" validate:"required"` + + // The total number of resources across all pages. + TotalCount *int64 `json:"total_count" validate:"required"` +} + +// UnmarshalSecurityGroupTargetCollection unmarshals an instance of SecurityGroupTargetCollection from the specified map of raw messages. +func UnmarshalSecurityGroupTargetCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupTargetCollection) + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSecurityGroupTargetCollectionFirst) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + return + } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSecurityGroupTargetCollectionNext) + if err != nil { + return + } + err = core.UnmarshalModel(m, "targets", &obj.Targets, UnmarshalSecurityGroupTargetReference) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// SecurityGroupTargetCollectionFirst : A link to the first page of resources. +type SecurityGroupTargetCollectionFirst struct { + // The URL for a page of resources. + Href *string `json:"href" validate:"required"` +} + +// UnmarshalSecurityGroupTargetCollectionFirst unmarshals an instance of SecurityGroupTargetCollectionFirst from the specified map of raw messages. +func UnmarshalSecurityGroupTargetCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupTargetCollectionFirst) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// SecurityGroupTargetCollectionNext : A link to the next page of resources. This property is present for all pages except the last page. +type SecurityGroupTargetCollectionNext struct { + // The URL for a page of resources. + Href *string `json:"href" validate:"required"` +} + +// UnmarshalSecurityGroupTargetCollectionNext unmarshals an instance of SecurityGroupTargetCollectionNext from the specified map of raw messages. +func UnmarshalSecurityGroupTargetCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupTargetCollectionNext) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// SecurityGroupTargetReference : SecurityGroupTargetReference struct +// Models which "extend" this model: +// - SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext +// - SecurityGroupTargetReferenceLoadBalancerReference +type SecurityGroupTargetReference struct { + // If present, this property indicates the referenced resource has been deleted and provides + // some supplementary information. + Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"` + + // The URL for this network interface. + Href *string `json:"href,omitempty"` + + // The unique identifier for this network interface. + ID *string `json:"id,omitempty"` + + // The user-defined name for this network interface. + Name *string `json:"name,omitempty"` + + // The resource type. + ResourceType *string `json:"resource_type,omitempty"` + + // The load balancer's CRN. + CRN *string `json:"crn,omitempty"` +} + +// Constants associated with the SecurityGroupTargetReference.ResourceType property. +// The resource type. +const ( + SecurityGroupTargetReferenceResourceTypeNetworkInterfaceConst = "network_interface" +) + +func (*SecurityGroupTargetReference) isaSecurityGroupTargetReference() bool { + return true +} + +type SecurityGroupTargetReferenceIntf interface { + isaSecurityGroupTargetReference() bool +} + +// UnmarshalSecurityGroupTargetReference unmarshals an instance of SecurityGroupTargetReference from the specified map of raw messages. +func UnmarshalSecurityGroupTargetReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupTargetReference) + err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // SetSubnetPublicGatewayOptions : The SetSubnetPublicGateway options. type SetSubnetPublicGatewayOptions struct { // The subnet identifier. @@ -39414,7 +40138,7 @@ type SubnetPrototype struct { // specified zone, and that prefix must have a free CIDR range with at least this number of addresses. TotalIpv4AddressCount *int64 `json:"total_ipv4_address_count,omitempty"` - // The zone the subnet is to reside in. + // The zone this subnet will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` // The IPv4 range of the subnet, expressed in CIDR format. The prefix length of the subnet's CIDR must be between `/9` @@ -41393,10 +42117,10 @@ func UnmarshalVPC(m map[string]json.RawMessage, result interface{}) (err error) // VpccseSourceIP : VpccseSourceIP struct type VpccseSourceIP struct { - // The Cloud Service Endpoint source IP address for this zone. + // The cloud service endpoint source IP address for this zone. IP *IP `json:"ip" validate:"required"` - // The zone this Cloud Service Endpoint source IP belongs to. + // The zone this cloud service endpoint source IP resides in. Zone *ZoneReference `json:"zone" validate:"required"` } @@ -42439,6 +43163,11 @@ func UnmarshalVPNGatewayConnectionStaticRouteModeTunnel(m map[string]json.RawMes // VPNGatewayMember : VPNGatewayMember struct type VPNGatewayMember struct { + // The private IP address assigned to the VPN gateway member. This + // property will be present only when the VPN gateway status is + // `available`. + PrivateIP *IP `json:"private_ip,omitempty"` + // The public IP address assigned to the VPN gateway member. PublicIP *IP `json:"public_ip" validate:"required"` @@ -42468,6 +43197,10 @@ const ( // UnmarshalVPNGatewayMember unmarshals an instance of VPNGatewayMember from the specified map of raw messages. func UnmarshalVPNGatewayMember(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayMember) + err = core.UnmarshalModel(m, "private_ip", &obj.PrivateIP, UnmarshalIP) + if err != nil { + return + } err = core.UnmarshalModel(m, "public_ip", &obj.PublicIP, UnmarshalIP) if err != nil { return @@ -43539,7 +44272,7 @@ type VolumePrototype struct { // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` - // The location of the volume. + // The zone this volume will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating @@ -43758,7 +44491,7 @@ type Zone struct { // The globally unique name for this zone. Name *string `json:"name" validate:"required"` - // The region this zone belongs to. + // The region this zone resides in. Region *RegionReference `json:"region" validate:"required"` // The availability status of this zone. @@ -44649,7 +45382,7 @@ type DedicatedHostPrototypeDedicatedHostByZone struct { Group *DedicatedHostGroupPrototypeDedicatedHostByZoneContext `json:"group,omitempty"` - // The zone to provision the dedicated host in. + // The zone this dedicated host will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } @@ -45164,7 +45897,7 @@ type FloatingIPPrototypeFloatingIPByZone struct { ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` - // The identity of the zone to provision a floating IP in. + // The zone this floating IP will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } @@ -46023,6 +46756,97 @@ func UnmarshalImagePrototypeImageByFile(m map[string]json.RawMessage, result int return } +// InstanceGroupManagerAutoScale : InstanceGroupManagerAutoScale struct +// This model "extends" InstanceGroupManager +type InstanceGroupManagerAutoScale struct { + // The URL for this instance group manager. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this instance group manager. + ID *string `json:"id" validate:"required"` + + // If set to `true`, this manager will control the instance group. + ManagementEnabled *bool `json:"management_enabled" validate:"required"` + + // The user-defined name for this instance group manager. Names must be unique within the instance group. + Name *string `json:"name" validate:"required"` + + // The time window in seconds to aggregate metrics prior to evaluation. + AggregationWindow *int64 `json:"aggregation_window" validate:"required"` + + // The duration of time in seconds to pause further scale actions after scaling has taken place. + Cooldown *int64 `json:"cooldown" validate:"required"` + + // The type of instance group manager. + ManagerType *string `json:"manager_type" validate:"required"` + + // The maximum number of members in a managed instance group. + MaxMembershipCount *int64 `json:"max_membership_count" validate:"required"` + + // The minimum number of members in a managed instance group. + MinMembershipCount *int64 `json:"min_membership_count" validate:"required"` + + // The policies of the instance group manager. + Policies []InstanceGroupManagerPolicyReference `json:"policies" validate:"required"` +} + +// Constants associated with the InstanceGroupManagerAutoScale.ManagerType property. +// The type of instance group manager. +const ( + InstanceGroupManagerAutoScaleManagerTypeAutoscaleConst = "autoscale" +) + +func (*InstanceGroupManagerAutoScale) isaInstanceGroupManager() bool { + return true +} + +// UnmarshalInstanceGroupManagerAutoScale unmarshals an instance of InstanceGroupManagerAutoScale from the specified map of raw messages. +func UnmarshalInstanceGroupManagerAutoScale(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupManagerAutoScale) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) + if err != nil { + return + } + err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalInstanceGroupManagerPolicyReference) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype : InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype struct // This model "extends" InstanceGroupManagerPolicyPrototype type InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype struct { @@ -46899,7 +47723,7 @@ type InstancePrototypeInstanceByImage struct { // Primary network interface. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } @@ -47018,7 +47842,7 @@ type InstancePrototypeInstanceBySourceTemplate struct { // Identifies an instance template by a unique property. SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` } @@ -47229,7 +48053,7 @@ type InstanceTemplatePrototypeInstanceByImage struct { // Primary network interface. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } @@ -47348,7 +48172,7 @@ type InstanceTemplatePrototypeInstanceBySourceTemplate struct { // Identifies an instance template by a unique property. SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` } @@ -47478,7 +48302,7 @@ type InstanceTemplateInstanceByImage struct { // Primary network interface. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } @@ -47614,7 +48438,7 @@ type InstanceTemplateInstanceBySourceTemplate struct { // Identifies an instance template by a unique property. SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"` - // The identity of the zone to provision the virtual server instance in. + // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` } @@ -48501,6 +49325,69 @@ func UnmarshalLoadBalancerProfileIdentityByName(m map[string]json.RawMessage, re return } +// LoadBalancerProfileSecurityGroupsSupportedDependent : The security group support for a load balancer with this profile depends on its configuration. +// This model "extends" LoadBalancerProfileSecurityGroupsSupported +type LoadBalancerProfileSecurityGroupsSupportedDependent struct { + // The type for this profile field. + Type *string `json:"type" validate:"required"` +} + +// Constants associated with the LoadBalancerProfileSecurityGroupsSupportedDependent.Type property. +// The type for this profile field. +const ( + LoadBalancerProfileSecurityGroupsSupportedDependentTypeDependentConst = "dependent" +) + +func (*LoadBalancerProfileSecurityGroupsSupportedDependent) isaLoadBalancerProfileSecurityGroupsSupported() bool { + return true +} + +// UnmarshalLoadBalancerProfileSecurityGroupsSupportedDependent unmarshals an instance of LoadBalancerProfileSecurityGroupsSupportedDependent from the specified map of raw messages. +func UnmarshalLoadBalancerProfileSecurityGroupsSupportedDependent(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerProfileSecurityGroupsSupportedDependent) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// LoadBalancerProfileSecurityGroupsSupportedFixed : The security group support for a load balancer with this profile. +// This model "extends" LoadBalancerProfileSecurityGroupsSupported +type LoadBalancerProfileSecurityGroupsSupportedFixed struct { + // The type for this profile field. + Type *string `json:"type" validate:"required"` + + // The value for this profile field. + Value *bool `json:"value" validate:"required"` +} + +// Constants associated with the LoadBalancerProfileSecurityGroupsSupportedFixed.Type property. +// The type for this profile field. +const ( + LoadBalancerProfileSecurityGroupsSupportedFixedTypeFixedConst = "fixed" +) + +func (*LoadBalancerProfileSecurityGroupsSupportedFixed) isaLoadBalancerProfileSecurityGroupsSupported() bool { + return true +} + +// UnmarshalLoadBalancerProfileSecurityGroupsSupportedFixed unmarshals an instance of LoadBalancerProfileSecurityGroupsSupportedFixed from the specified map of raw messages. +func UnmarshalLoadBalancerProfileSecurityGroupsSupportedFixed(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerProfileSecurityGroupsSupportedFixed) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // NetworkACLIdentityByCRN : NetworkACLIdentityByCRN struct // This model "extends" NetworkACLIdentity type NetworkACLIdentityByCRN struct { @@ -50722,6 +51609,47 @@ func UnmarshalRouteNextHopPrototypeRouteNextHopIP(m map[string]json.RawMessage, return } +// RouteNextHopPrototypeVPNGatewayConnectionIdentity : Identifies a VPN gateway connection by a unique property. +// Models which "extend" this model: +// - RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID +// - RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref +// This model "extends" RouteNextHopPrototype +type RouteNextHopPrototypeVPNGatewayConnectionIdentity struct { + // The unique identifier for this VPN gateway connection. + ID *string `json:"id,omitempty"` + + // The VPN connection's canonical URL. + Href *string `json:"href,omitempty"` +} + +func (*RouteNextHopPrototypeVPNGatewayConnectionIdentity) isaRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool { + return true +} + +type RouteNextHopPrototypeVPNGatewayConnectionIdentityIntf interface { + RouteNextHopPrototypeIntf + isaRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool +} + +func (*RouteNextHopPrototypeVPNGatewayConnectionIdentity) isaRouteNextHopPrototype() bool { + return true +} + +// UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentity unmarshals an instance of RouteNextHopPrototypeVPNGatewayConnectionIdentity from the specified map of raw messages. +func UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RouteNextHopPrototypeVPNGatewayConnectionIdentity) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // RouteNextHopVPNGatewayConnectionReference : RouteNextHopVPNGatewayConnectionReference struct // This model "extends" RouteNextHop type RouteNextHopVPNGatewayConnectionReference struct { @@ -51795,6 +52723,114 @@ func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp(m map[string]json return } +// SecurityGroupTargetReferenceLoadBalancerReference : SecurityGroupTargetReferenceLoadBalancerReference struct +// This model "extends" SecurityGroupTargetReference +type SecurityGroupTargetReferenceLoadBalancerReference struct { + // The load balancer's CRN. + CRN *string `json:"crn" validate:"required"` + + // If present, this property indicates the referenced resource has been deleted and provides + // some supplementary information. + Deleted *LoadBalancerReferenceDeleted `json:"deleted,omitempty"` + + // The load balancer's canonical URL. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this load balancer. + ID *string `json:"id" validate:"required"` + + // The unique user-defined name for this load balancer. + Name *string `json:"name" validate:"required"` +} + +func (*SecurityGroupTargetReferenceLoadBalancerReference) isaSecurityGroupTargetReference() bool { + return true +} + +// UnmarshalSecurityGroupTargetReferenceLoadBalancerReference unmarshals an instance of SecurityGroupTargetReferenceLoadBalancerReference from the specified map of raw messages. +func UnmarshalSecurityGroupTargetReferenceLoadBalancerReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupTargetReferenceLoadBalancerReference) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + return + } + err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerReferenceDeleted) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext : SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext struct +// This model "extends" SecurityGroupTargetReference +type SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext struct { + // If present, this property indicates the referenced resource has been deleted and provides + // some supplementary information. + Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"` + + // The URL for this network interface. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this network interface. + ID *string `json:"id" validate:"required"` + + // The user-defined name for this network interface. + Name *string `json:"name" validate:"required"` + + // The resource type. + ResourceType *string `json:"resource_type" validate:"required"` +} + +// Constants associated with the SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.ResourceType property. +// The resource type. +const ( + SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface" +) + +func (*SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext) isaSecurityGroupTargetReference() bool { + return true +} + +// UnmarshalSecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext unmarshals an instance of SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext from the specified map of raw messages. +func UnmarshalSecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext) + err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // SubnetIdentityByCRN : SubnetIdentityByCRN struct // This model "extends" SubnetIdentity type SubnetIdentityByCRN struct { @@ -51920,7 +52956,7 @@ type SubnetPrototypeSubnetByCIDR struct { // If zone is specified, it must match the zone of the address prefix that contains the subnet's IPv4 CIDR. Ipv4CIDRBlock *string `json:"ipv4_cidr_block" validate:"required"` - // The zone the subnet is to reside in. + // The zone this subnet will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` } @@ -52017,7 +53053,7 @@ type SubnetPrototypeSubnetByTotalCount struct { // specified zone, and that prefix must have a free CIDR range with at least this number of addresses. TotalIpv4AddressCount *int64 `json:"total_ipv4_address_count" validate:"required"` - // The zone the subnet is to reside in. + // The zone this subnet will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } @@ -53350,7 +54386,7 @@ type VolumePrototypeVolumeByCapacity struct { ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` - // The location of the volume. + // The zone this volume will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating @@ -54516,6 +55552,76 @@ func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIde return } +// RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref struct +// This model "extends" RouteNextHopPrototypeVPNGatewayConnectionIdentity +type RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref struct { + // The VPN connection's canonical URL. + Href *string `json:"href" validate:"required"` +} + +// NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : Instantiate RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref (Generic Model Constructor) +func (*VpcV1) NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(href string) (model *RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref, err error) { + model = &RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref{ + Href: core.StringPtr(href), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) isaRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool { + return true +} + +func (*RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) isaRouteNextHopPrototype() bool { + return true +} + +// UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref unmarshals an instance of RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref from the specified map of raw messages. +func UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID struct +// This model "extends" RouteNextHopPrototypeVPNGatewayConnectionIdentity +type RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID struct { + // The unique identifier for this VPN gateway connection. + ID *string `json:"id" validate:"required"` +} + +// NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : Instantiate RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID (Generic Model Constructor) +func (*VpcV1) NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(id string) (model *RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID, err error) { + model = &RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID{ + ID: core.StringPtr(id), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) isaRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool { + return true +} + +func (*RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) isaRouteNextHopPrototype() bool { + return true +} + +// UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID unmarshals an instance of RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID from the specified map of raw messages. +func UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN struct // This model "extends" SecurityGroupRuleRemotePatchSecurityGroupIdentity type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN struct { diff --git a/vpcv1/vpc_v1_integration_test.go b/vpcv1/vpc_v1_integration_test.go index d5f3a88..414f7f3 100644 --- a/vpcv1/vpc_v1_integration_test.go +++ b/vpcv1/vpc_v1_integration_test.go @@ -18,7 +18,6 @@ package vpcv1_test import ( - "encoding/json" "flag" "fmt" "os" @@ -286,11 +285,9 @@ func TestVPCResources(t *testing.T) { } name := getName("template") res, _, err := CreateInstanceTemplate(vpcService, name, *defaultImageID, *profile, *defaultZoneName, *createdSubnetID, *createdVpcID) - res2B, _ := json.Marshal(res) - temp := &vpcv1.InstanceTemplate{} - _ = json.Unmarshal([]byte(string(res2B)), &temp) - ValidateResponse(t, temp, err, POST, detailed, increment) - createdTemplateID = temp.ID + template := res.(*vpcv1.InstanceTemplate) + ValidateResponse(t, template, err, POST, detailed, increment) + createdTemplateID = template.ID }) t.Run("Create Instance group", func(t *testing.T) { @@ -301,17 +298,16 @@ func TestVPCResources(t *testing.T) { t.Run("Create Instance group manager", func(t *testing.T) { res, _, err := CreateInstanceGroupManager(vpcService, *createdInstanceGroupID, getName("manager")) - ValidateResponse(t, res, err, POST, detailed, increment) - createdIgManagerID = res.ID + manager := res.(*vpcv1.InstanceGroupManager) + ValidateResponse(t, manager, err, POST, detailed, increment) + createdIgManagerID = manager.ID }) t.Run("Create Instance group manager policy", func(t *testing.T) { res, _, err := CreateInstanceGroupManagerPolicy(vpcService, *createdInstanceGroupID, *createdIgManagerID, getName("manager")) - res2B, _ := json.Marshal(res) - temp := &vpcv1.InstanceGroupManagerPolicy{} - _ = json.Unmarshal([]byte(string(res2B)), &temp) - ValidateResponse(t, temp, err, POST, detailed, increment) - createdIgPolicyID = temp.ID + managerPolicy := res.(*vpcv1.InstanceGroupManagerPolicy) + ValidateResponse(t, managerPolicy, err, POST, detailed, increment) + createdIgPolicyID = managerPolicy.ID }) }) @@ -718,9 +714,7 @@ func TestVPCAccessControlLists(t *testing.T) { t.Run("Create ACL Rule", func(t *testing.T) { name := getName("acl-rule") res, _, err := CreateNetworkAclRule(vpcService, name, *createdACLID) - res2B, _ := json.Marshal(res) - rule := &vpcv1.NetworkACLRule{} - _ = json.Unmarshal([]byte(string(res2B)), &rule) + rule := res.(*vpcv1.NetworkACLRuleNetworkACLRuleProtocolAll) ValidateResponse(t, rule, err, POST, detailed, increment) createdACLRuleID = rule.ID }) @@ -809,11 +803,9 @@ func TestVPCSecurityGroups(t *testing.T) { t.Run("Create Security Group Rule", func(t *testing.T) { res, _, err := CreateSecurityGroupRule(vpcService, *createdSgID) - res2B, _ := json.Marshal(res) - rule := &vpcv1.SecurityGroupRule{} - _ = json.Unmarshal([]byte(string(res2B)), &rule) - ValidateResponse(t, rule, err, POST, detailed, increment) - createdSgRuleID = rule.ID + sgRule := res.(*vpcv1.SecurityGroupRuleSecurityGroupRuleProtocolAll) + ValidateResponse(t, sgRule, err, POST, detailed, increment) + createdSgRuleID = sgRule.ID }) t.Run("Get Security Group", func(t *testing.T) { @@ -1282,11 +1274,7 @@ func TestVPCVPN(t *testing.T) { t.Run("Create VPN Gateway", func(t *testing.T) { name := "go-vpngateway-1-" + strconv.FormatInt(tunix, 10) res, _, err := CreateVPNGateway(vpcService, *defaultSubnetID, name) - ValidateResponse(t, res, err, POST, detailed, increment) - - res2B, _ := json.Marshal(res) - vpn := &vpcv1.VPNGateway{} - _ = json.Unmarshal([]byte(string(res2B)), &vpn) + vpn := res.(*vpcv1.VPNGateway) ValidateResponse(t, vpn, err, POST, detailed, increment) createdVpnGatewayID = vpn.ID }) @@ -1296,12 +1284,9 @@ func TestVPCVPN(t *testing.T) { statusChanged := PollVPNGateway(vpcService, *createdVpnGatewayID, "available", 10) if statusChanged { res, _, err := CreateVPNGatewayConnection(vpcService, *createdVpnGatewayID, name) - ValidateResponse(t, res, err, POST, detailed, increment) - res2B, _ := json.Marshal(res) - conn := &vpcv1.VPNGateway{} - _ = json.Unmarshal([]byte(string(res2B)), &conn) - ValidateResponse(t, conn, err, POST, detailed, increment) - createdVpnGatewayConnID = conn.ID + vpnGatewayConnection := res.(*vpcv1.VPNGatewayConnection) + ValidateResponse(t, vpnGatewayConnection, err, POST, detailed, increment) + createdVpnGatewayConnID = vpnGatewayConnection.ID } }) diff --git a/vpcv1/vpc_v1_integration_utils_test.go b/vpcv1/vpc_v1_integration_utils_test.go index f09a637..52804fd 100644 --- a/vpcv1/vpc_v1_integration_utils_test.go +++ b/vpcv1/vpc_v1_integration_utils_test.go @@ -24,7 +24,7 @@ import ( "net/http" "time" - "github.com/IBM/go-sdk-core/v4/core" + "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" ) @@ -43,7 +43,9 @@ const ( // InstantiateVPCService - Instantiate VPC Gen2 service func InstantiateVPCService() *vpcv1.VpcV1 { service, serviceErr := vpcv1.NewVpcV1UsingExternalConfig( - &vpcv1.VpcV1Options{}, + &vpcv1.VpcV1Options{ + ServiceName: "vpcint", + }, ) // Check successful instantiation if serviceErr != nil { @@ -2466,7 +2468,7 @@ func ListInstanceGroupManagers(vpcService *vpcv1.VpcV1, id string) (templates *v // POST // /instance_groups/{instance_group_id}/managers // Create an instance group manager -func CreateInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, name string) (manager *vpcv1.InstanceGroupManager, response *core.DetailedResponse, err error) { +func CreateInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, name string) (manager vpcv1.InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { options := &vpcv1.CreateInstanceGroupManagerOptions{ InstanceGroupManagerPrototype: &vpcv1.InstanceGroupManagerPrototype{ @@ -2496,7 +2498,7 @@ func DeleteInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, id string) (respon // /instance_groups/{instance_group_id}/managers/{id} // Retrieve specified instance group -func GetInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, id, name string) (manager *vpcv1.InstanceGroupManager, response *core.DetailedResponse, err error) { +func GetInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, id, name string) (manager vpcv1.InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { options := &vpcv1.GetInstanceGroupManagerOptions{} options.SetID(id) options.SetInstanceGroupID(gID) @@ -2507,7 +2509,7 @@ func GetInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, id, name string) (man // PATCH // /instance_groups/{instance_group_id}/managers/{id} // Update specified instance group manager -func UpdateInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, id, name string) (manager *vpcv1.InstanceGroupManager, response *core.DetailedResponse, err error) { +func UpdateInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, id, name string) (manager vpcv1.InstanceGroupManagerIntf, response *core.DetailedResponse, err error) { body := &vpcv1.InstanceGroupManagerPatch{ Name: &name, } @@ -3334,9 +3336,7 @@ func PollVPNGateway(vpcService *vpcv1.VpcV1, gatewayID, status string, pollFrequ for { if count < pollFrequency { res, _, err := GetVPNGateway(vpcService, gatewayID) - res2B, _ := json.Marshal(res) - vpn := &vpcv1.VPNGateway{} - _ = json.Unmarshal([]byte(string(res2B)), &vpn) + vpn := res.(*vpcv1.VPNGateway) fmt.Println("Current status of VPNGateway - ", *vpn.Status) fmt.Println("Expected status of VPNGateway - ", status) if err != nil && vpn == nil { diff --git a/vpcv1/vpc_v1_test.go b/vpcv1/vpc_v1_test.go index 288b2d2..ae5cf1b 100644 --- a/vpcv1/vpc_v1_test.go +++ b/vpcv1/vpc_v1_test.go @@ -191,17 +191,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVpcsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // TODO: Add check for classic_access query parameter - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -255,17 +249,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // TODO: Add check for classic_access query parameter - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -328,17 +316,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // TODO: Add check for classic_access query parameter - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -417,9 +399,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createVPCPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -493,9 +473,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -578,9 +556,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -669,9 +645,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -743,9 +717,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPCPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -796,9 +768,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -858,9 +828,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -940,9 +908,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateVPCPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -1016,9 +982,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -1101,9 +1065,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -1197,9 +1159,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -1250,9 +1210,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -1312,9 +1270,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -1394,9 +1350,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultRoutingTablePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -1447,9 +1401,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -1509,9 +1461,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -1591,9 +1541,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -1644,9 +1592,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -1706,9 +1652,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -1788,13 +1732,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVPCAddressPrefixesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -1847,13 +1787,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -1915,13 +1851,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -2005,9 +1937,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createVPCAddressPrefixPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -2082,9 +2012,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -2168,9 +2096,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -2268,9 +2194,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -2344,9 +2268,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPCAddressPrefixPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -2398,9 +2320,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -2461,9 +2381,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -2545,9 +2463,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateVPCAddressPrefixPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -2623,9 +2539,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -2710,9 +2624,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -2810,15 +2722,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVPCRoutesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -2872,15 +2779,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -2943,15 +2845,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -3037,9 +2934,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createVPCRoutePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -3054,22 +2949,22 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) zoneIdentityModel.Name = core.StringPtr("us-south-1") + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the CreateVPCRouteOptions model createVPCRouteOptionsModel := new(vpcv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Action = core.StringPtr("delegate") createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.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 := vpcService.CreateVPCRoute(createVPCRouteOptionsModel) @@ -3119,9 +3014,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -3141,22 +3034,22 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) vpcService.EnableRetries(0, 0) - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) zoneIdentityModel.Name = core.StringPtr("us-south-1") + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the CreateVPCRouteOptions model createVPCRouteOptionsModel := new(vpcv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Action = core.StringPtr("delegate") createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -3210,9 +3103,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -3234,22 +3125,22 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) zoneIdentityModel.Name = core.StringPtr("us-south-1") + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the CreateVPCRouteOptions model createVPCRouteOptionsModel := new(vpcv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Action = core.StringPtr("delegate") createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -3268,22 +3159,22 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) zoneIdentityModel.Name = core.StringPtr("us-south-1") + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the CreateVPCRouteOptions model createVPCRouteOptionsModel := new(vpcv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Action = core.StringPtr("delegate") createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -3320,9 +3211,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -3396,9 +3285,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPCRoutePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -3450,9 +3337,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -3513,9 +3398,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -3597,9 +3480,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateVPCRoutePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -3674,9 +3555,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -3760,9 +3639,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -3858,15 +3735,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVPCRoutingTablesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // TODO: Add check for is_default query parameter - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -3920,15 +3792,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // TODO: Add check for is_default query parameter - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -3991,15 +3858,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // TODO: Add check for is_default query parameter - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -4085,9 +3947,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createVPCRoutingTablePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -4175,9 +4035,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -4274,9 +4132,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -4400,9 +4256,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -4476,9 +4330,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPCRoutingTablePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -4530,9 +4382,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -4593,9 +4443,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -4677,9 +4525,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateVPCRoutingTablePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -4757,9 +4603,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -4846,9 +4690,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -4950,13 +4792,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVPCRoutingTableRoutesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -5010,13 +4848,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -5079,13 +4913,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -5171,9 +5001,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createVPCRoutingTableRoutePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -5188,23 +5016,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) zoneIdentityModel.Name = core.StringPtr("us-south-1") + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the CreateVPCRoutingTableRouteOptions model createVPCRoutingTableRouteOptionsModel := new(vpcv1.CreateVPCRoutingTableRouteOptions) createVPCRoutingTableRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRoutingTableRouteOptionsModel.RoutingTableID = core.StringPtr("testString") createVPCRoutingTableRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") - createVPCRoutingTableRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRoutingTableRouteOptionsModel.Zone = zoneIdentityModel createVPCRoutingTableRouteOptionsModel.Action = core.StringPtr("delegate") createVPCRoutingTableRouteOptionsModel.Name = core.StringPtr("my-route-2") + createVPCRoutingTableRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRoutingTableRouteOptionsModel.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 := vpcService.CreateVPCRoutingTableRoute(createVPCRoutingTableRouteOptionsModel) @@ -5254,9 +5082,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -5276,23 +5102,23 @@ var _ = Describe(`VpcV1`, func() { Expect(vpcService).ToNot(BeNil()) vpcService.EnableRetries(0, 0) - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) zoneIdentityModel.Name = core.StringPtr("us-south-1") + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the CreateVPCRoutingTableRouteOptions model createVPCRoutingTableRouteOptionsModel := new(vpcv1.CreateVPCRoutingTableRouteOptions) createVPCRoutingTableRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRoutingTableRouteOptionsModel.RoutingTableID = core.StringPtr("testString") createVPCRoutingTableRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") - createVPCRoutingTableRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRoutingTableRouteOptionsModel.Zone = zoneIdentityModel createVPCRoutingTableRouteOptionsModel.Action = core.StringPtr("delegate") createVPCRoutingTableRouteOptionsModel.Name = core.StringPtr("my-route-2") + createVPCRoutingTableRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRoutingTableRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -5346,9 +5172,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -5370,23 +5194,23 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) zoneIdentityModel.Name = core.StringPtr("us-south-1") + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the CreateVPCRoutingTableRouteOptions model createVPCRoutingTableRouteOptionsModel := new(vpcv1.CreateVPCRoutingTableRouteOptions) createVPCRoutingTableRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRoutingTableRouteOptionsModel.RoutingTableID = core.StringPtr("testString") createVPCRoutingTableRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") - createVPCRoutingTableRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRoutingTableRouteOptionsModel.Zone = zoneIdentityModel createVPCRoutingTableRouteOptionsModel.Action = core.StringPtr("delegate") createVPCRoutingTableRouteOptionsModel.Name = core.StringPtr("my-route-2") + createVPCRoutingTableRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRoutingTableRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -5405,23 +5229,23 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) zoneIdentityModel.Name = core.StringPtr("us-south-1") + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the CreateVPCRoutingTableRouteOptions model createVPCRoutingTableRouteOptionsModel := new(vpcv1.CreateVPCRoutingTableRouteOptions) createVPCRoutingTableRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRoutingTableRouteOptionsModel.RoutingTableID = core.StringPtr("testString") createVPCRoutingTableRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") - createVPCRoutingTableRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRoutingTableRouteOptionsModel.Zone = zoneIdentityModel createVPCRoutingTableRouteOptionsModel.Action = core.StringPtr("delegate") createVPCRoutingTableRouteOptionsModel.Name = core.StringPtr("my-route-2") + createVPCRoutingTableRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRoutingTableRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -5458,9 +5282,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -5536,9 +5358,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPCRoutingTableRoutePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -5591,9 +5411,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -5655,9 +5473,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -5741,9 +5557,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateVPCRoutingTableRoutePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -5819,9 +5633,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -5906,9 +5718,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -6149,19 +5959,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listSubnetsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["routing_table.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["routing_table.name"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -6216,19 +6019,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["routing_table.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["routing_table.name"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -6292,19 +6088,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["routing_table.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["routing_table.name"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -6385,9 +6174,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createSubnetPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -6490,9 +6277,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -6604,9 +6389,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -6760,9 +6543,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -6834,9 +6615,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getSubnetPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -6887,9 +6666,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -6949,9 +6726,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -7031,9 +6806,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateSubnetPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -7122,9 +6895,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -7222,9 +6993,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -7348,9 +7117,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getSubnetNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -7401,9 +7168,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -7463,9 +7228,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -7545,9 +7308,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(replaceSubnetNetworkACLPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -7619,9 +7380,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -7702,9 +7461,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -7796,9 +7553,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -7870,9 +7625,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -7923,9 +7676,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -7985,9 +7736,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -8067,9 +7816,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(setSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -8141,9 +7888,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -8224,9 +7969,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -8316,9 +8059,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getSubnetRoutingTablePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -8369,9 +8110,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -8431,9 +8170,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -8513,9 +8250,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(replaceSubnetRoutingTablePath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -8587,9 +8322,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -8670,9 +8403,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -8762,15 +8493,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listSubnetReservedIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -8824,15 +8550,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -8895,15 +8616,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -8989,9 +8705,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createSubnetReservedIPPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -9065,9 +8779,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -9150,9 +8862,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -9248,9 +8958,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -9324,9 +9032,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getSubnetReservedIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -9378,9 +9084,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -9441,9 +9145,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -9525,9 +9227,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateSubnetReservedIPPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -9603,9 +9303,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -9690,9 +9388,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -9933,19 +9629,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listImagesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["visibility"]).To(Equal([]string{"private"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -10000,19 +9689,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["visibility"]).To(Equal([]string{"private"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -10076,19 +9758,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["visibility"]).To(Equal([]string{"private"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -10169,9 +9844,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createImagePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -10263,9 +9936,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -10366,9 +10037,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -10500,9 +10169,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(202) })) }) @@ -10574,9 +10241,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getImagePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -10627,9 +10292,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -10689,9 +10352,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -10771,9 +10432,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateImagePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -10847,9 +10506,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -10932,9 +10589,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -11028,13 +10683,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listOperatingSystemsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -11086,13 +10737,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -11153,13 +10800,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -11234,9 +10877,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getOperatingSystemPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -11287,9 +10928,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -11349,9 +10988,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -11574,11 +11211,8 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listKeysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -11629,11 +11263,8 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -11693,11 +11324,8 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -11770,9 +11398,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createKeyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -11846,9 +11472,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -11931,9 +11555,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -12029,9 +11651,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -12103,9 +11723,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getKeyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -12156,9 +11774,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -12218,9 +11834,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -12300,9 +11914,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateKeyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -12376,9 +11988,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -12461,9 +12071,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -12700,9 +12308,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -12752,9 +12358,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -12813,9 +12417,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -12886,9 +12488,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -12939,9 +12539,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -13001,9 +12599,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -13083,9 +12679,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceTemplatesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -13135,9 +12729,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -13196,9 +12788,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -13269,9 +12859,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createInstanceTemplatePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -13425,9 +13013,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -13590,9 +13176,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -13848,9 +13432,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -13922,9 +13504,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceTemplatePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -13975,9 +13555,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -14037,9 +13615,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -14119,9 +13695,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateInstanceTemplatePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -14195,9 +13769,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -14280,9 +13852,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -14376,23 +13946,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstancesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -14449,23 +14010,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -14531,23 +14083,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -14632,9 +14175,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createInstancePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -14792,9 +14333,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -14961,9 +14500,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -15227,9 +14764,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -15301,9 +14836,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstancePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -15354,9 +14887,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -15416,9 +14947,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -15498,9 +15027,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateInstancePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -15574,9 +15101,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -15659,9 +15184,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -15755,9 +15278,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceInitializationPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -15808,9 +15329,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -15870,9 +15389,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -15952,9 +15469,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createInstanceActionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -16023,9 +15538,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -16103,9 +15616,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -16189,9 +15700,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -16242,9 +15751,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -16304,9 +15811,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -16386,9 +15891,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -16468,9 +15971,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -16559,9 +16060,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -16669,9 +16168,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -16745,9 +16242,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -16799,9 +16294,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -16862,9 +16355,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -16946,9 +16437,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -17024,9 +16513,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -17111,9 +16598,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -17211,9 +16696,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -17265,9 +16748,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -17328,9 +16809,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -17414,9 +16893,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -17492,9 +16969,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -17547,9 +17022,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -17611,9 +17084,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -17697,9 +17168,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -17752,9 +17221,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -17816,9 +17283,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -17902,9 +17367,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceVolumeAttachmentsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -17955,9 +17418,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -18017,9 +17478,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -18099,9 +17558,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -18175,9 +17632,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -18260,9 +17715,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -18358,9 +17811,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -18434,9 +17885,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -18488,9 +17937,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -18551,9 +17998,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -18635,9 +18080,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -18713,9 +18156,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -18800,9 +18241,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -19043,13 +18482,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -19101,13 +18536,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -19168,13 +18599,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -19249,9 +18676,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -19345,9 +18770,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -19450,9 +18873,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -19588,9 +19009,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -19662,9 +19081,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -19715,9 +19132,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -19777,9 +19192,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -19859,9 +19272,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -19957,9 +19368,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -20064,9 +19473,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -20206,9 +19613,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -20280,9 +19685,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupManagersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -20333,16 +19736,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20"}, "limit": 20, "managers": [{"aggregation_window": 120, "cooldown": 210, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "name": "my-instance-group-manager", "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20"}, "limit": 20, "managers": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "name": "my-instance-group-manager", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstanceGroupManagers successfully with retries`, func() { @@ -20395,13 +19796,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20"}, "limit": 20, "managers": [{"aggregation_window": 120, "cooldown": 210, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "name": "my-instance-group-manager", "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?limit=20"}, "limit": 20, "managers": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "name": "my-instance-group-manager", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListInstanceGroupManagers successfully`, func() { @@ -20477,9 +19876,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupManagerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -20557,16 +19954,14 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"aggregation_window": 120, "cooldown": 210, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "name": "my-instance-group-manager", "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) + fmt.Fprintf(res, "%s", `{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "name": "my-instance-group-manager", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) })) }) It(`Invoke CreateInstanceGroupManager successfully with retries`, func() { @@ -20646,13 +20041,11 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"aggregation_window": 120, "cooldown": 210, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "name": "my-instance-group-manager", "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) + fmt.Fprintf(res, "%s", `{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "name": "my-instance-group-manager", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) })) }) It(`Invoke CreateInstanceGroupManager successfully`, func() { @@ -20752,9 +20145,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -20828,9 +20219,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupManagerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -20882,16 +20271,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"aggregation_window": 120, "cooldown": 210, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "name": "my-instance-group-manager", "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) + fmt.Fprintf(res, "%s", `{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "name": "my-instance-group-manager", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) })) }) It(`Invoke GetInstanceGroupManager successfully with retries`, func() { @@ -20945,13 +20332,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"aggregation_window": 120, "cooldown": 210, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "name": "my-instance-group-manager", "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) + fmt.Fprintf(res, "%s", `{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "name": "my-instance-group-manager", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) })) }) It(`Invoke GetInstanceGroupManager successfully`, func() { @@ -21029,9 +20414,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupManagerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -21111,16 +20494,14 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"aggregation_window": 120, "cooldown": 210, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "name": "my-instance-group-manager", "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) + fmt.Fprintf(res, "%s", `{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "name": "my-instance-group-manager", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) })) }) It(`Invoke UpdateInstanceGroupManager successfully with retries`, func() { @@ -21202,13 +20583,11 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"aggregation_window": 120, "cooldown": 210, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "name": "my-instance-group-manager", "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) + fmt.Fprintf(res, "%s", `{"href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/1e09281b-f177-46fb-baf1-bc152b2e391a/managers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "management_enabled": false, "name": "my-instance-group-manager", "aggregation_window": 120, "cooldown": 210, "manager_type": "autoscale", "max_membership_count": 10, "min_membership_count": 10, "policies": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instance_groups/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/managers/4c939b00-601f-11ea-bca2-000c29475bed/policies/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-group-manager-policy"}]}`) })) }) It(`Invoke UpdateInstanceGroupManager successfully`, func() { @@ -21310,9 +20689,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupManagerPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -21364,9 +20741,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -21427,9 +20802,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -21511,9 +20884,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -21589,9 +20960,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -21676,9 +21045,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -21778,9 +21145,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -21856,9 +21221,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -21911,9 +21274,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -21975,9 +21336,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -22061,9 +21420,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -22141,9 +21498,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -22230,9 +21585,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -22336,9 +21689,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -22410,9 +21761,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupMembershipsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -22463,9 +21812,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -22525,9 +21872,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -22609,9 +21954,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -22685,9 +22028,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupMembershipPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -22739,9 +22080,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -22802,9 +22141,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -22886,9 +22223,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupMembershipPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -22963,9 +22298,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -23049,9 +22382,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -23290,17 +22621,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listDedicatedHostGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -23354,17 +22679,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -23427,17 +22746,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -23516,9 +22829,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createDedicatedHostGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -23597,9 +22908,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -23687,9 +22996,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -23788,9 +23095,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -23862,9 +23167,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getDedicatedHostGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -23915,9 +23218,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -23977,9 +23278,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -24059,9 +23358,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateDedicatedHostGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -24135,9 +23432,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -24220,9 +23515,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -24316,13 +23609,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listDedicatedHostProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -24374,13 +23663,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -24441,13 +23726,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -24522,9 +23803,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getDedicatedHostProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -24575,9 +23854,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -24637,9 +23914,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -24719,19 +23994,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listDedicatedHostsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["dedicated_host_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -24786,19 +24054,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["dedicated_host_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -24862,19 +24123,12 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["dedicated_host_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -24955,9 +24209,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createDedicatedHostPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -25044,9 +24296,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -25142,9 +24392,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -25266,9 +24514,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -25340,9 +24586,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getDedicatedHostPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -25393,9 +24637,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -25455,9 +24697,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -25537,9 +24777,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateDedicatedHostPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -25614,9 +24852,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -25700,9 +24936,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -25941,13 +25175,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVolumeProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -25999,13 +25229,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -26066,13 +25292,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -26147,9 +25369,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVolumeProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -26200,9 +25420,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -26262,9 +25480,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -26344,17 +25560,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVolumesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -26408,17 +25618,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -26481,17 +25685,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["zone.name"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -26570,9 +25768,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createVolumePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -26665,9 +25861,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -26769,9 +25963,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -26905,9 +26097,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -26979,9 +26169,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVolumePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -27032,9 +26220,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -27094,9 +26280,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -27176,9 +26360,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateVolumePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -27252,9 +26434,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -27337,9 +26517,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -27576,9 +26754,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listRegionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -27628,9 +26804,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -27689,9 +26863,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -27762,9 +26934,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getRegionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -27815,9 +26985,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -27877,9 +27045,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -27959,9 +27125,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listRegionZonesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -28012,9 +27176,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -28074,9 +27236,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -28156,9 +27316,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getRegionZonePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -28210,9 +27368,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -28273,9 +27429,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -28500,15 +27654,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listPublicGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -28561,15 +27710,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -28631,15 +27775,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -28716,9 +27855,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createPublicGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -28805,9 +27942,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -28903,9 +28038,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -29027,9 +28160,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -29101,9 +28232,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -29154,9 +28283,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -29216,9 +28343,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -29298,9 +28423,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updatePublicGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -29374,9 +28497,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -29459,9 +28580,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -29698,15 +28817,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -29759,15 +28873,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -29829,15 +28938,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -29914,9 +29018,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createFloatingIPPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -29997,9 +29099,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -30089,9 +29189,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -30201,9 +29299,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -30275,9 +29371,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -30328,9 +29422,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -30390,9 +29482,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -30472,9 +29562,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateFloatingIPPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -30553,9 +29641,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -30643,9 +29729,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -30892,15 +29976,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listNetworkAclsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -30953,15 +30032,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -31023,15 +30097,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -31108,9 +30177,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -31203,9 +30270,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -31307,9 +30372,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -31436,9 +30499,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -31510,9 +30571,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -31563,9 +30622,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -31625,9 +30682,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -31707,9 +30762,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -31783,9 +30836,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -31868,9 +30919,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -31964,15 +31013,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listNetworkACLRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["direction"]).To(Equal([]string{"inbound"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -32026,15 +31070,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["direction"]).To(Equal([]string{"inbound"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -32097,15 +31136,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["direction"]).To(Equal([]string{"inbound"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -32191,9 +31225,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -32275,9 +31307,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -32368,9 +31398,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -32482,9 +31510,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -32558,9 +31584,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -32612,9 +31636,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -32675,9 +31697,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -32759,9 +31779,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -32851,9 +31869,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -32952,9 +31968,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -33223,21 +32237,13 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -33293,28 +32299,20 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}], "total_count": 132}`) })) }) It(`Invoke ListSecurityGroups successfully with retries`, func() { @@ -33372,25 +32370,17 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}], "total_count": 132}`) })) }) It(`Invoke ListSecurityGroups successfully`, func() { @@ -33469,9 +32459,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -33562,16 +32550,14 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke CreateSecurityGroup successfully with retries`, func() { @@ -33664,13 +32650,11 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke CreateSecurityGroup successfully`, func() { @@ -33796,9 +32780,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -33870,9 +32852,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -33923,16 +32903,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke GetSecurityGroup successfully with retries`, func() { @@ -33985,13 +32963,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke GetSecurityGroup successfully`, func() { @@ -34067,9 +33043,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -34143,16 +33117,14 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke UpdateSecurityGroup successfully with retries`, func() { @@ -34228,13 +33200,11 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "remote": {"address": "192.168.3.4"}, "protocol": "all"}], "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke UpdateSecurityGroup successfully`, func() { @@ -34324,13 +33294,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -34383,13 +33349,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -34451,13 +33413,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -34543,9 +33501,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -34619,9 +33575,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -34673,9 +33627,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -34736,9 +33688,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -34820,9 +33770,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(addSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -34874,9 +33822,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -34937,9 +33883,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -35021,9 +33965,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -35074,9 +34016,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -35136,9 +34076,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -35218,9 +34156,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -35301,9 +34237,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -35393,9 +34327,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -35505,9 +34437,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -35581,9 +34511,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -35635,9 +34563,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -35698,9 +34624,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -35782,9 +34706,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -35869,9 +34791,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -35965,9 +34885,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -36071,6 +34989,677 @@ var _ = Describe(`VpcV1`, func() { }) }) }) + Describe(`ListSecurityGroupTargets(listSecurityGroupTargetsOptions *ListSecurityGroupTargetsOptions) - Operation response error`, func() { + version := "testString" + listSecurityGroupTargetsPath := "/security_groups/testString/targets" + Context(`Using mock server endpoint`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupTargetsPath)) + Expect(req.Method).To(Equal("GET")) + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + fmt.Fprintf(res, `} this is not valid json {`) + })) + }) + It(`Invoke ListSecurityGroupTargets with error: Operation response processing error`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Construct an instance of the ListSecurityGroupTargetsOptions model + listSecurityGroupTargetsOptionsModel := new(vpcv1.ListSecurityGroupTargetsOptions) + listSecurityGroupTargetsOptionsModel.SecurityGroupID = core.StringPtr("testString") + listSecurityGroupTargetsOptionsModel.Start = core.StringPtr("testString") + listSecurityGroupTargetsOptionsModel.Limit = core.Int64Ptr(int64(1)) + listSecurityGroupTargetsOptionsModel.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 := vpcService.ListSecurityGroupTargets(listSecurityGroupTargetsOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).To(BeNil()) + + // Enable retries and test again + vpcService.EnableRetries(0, 0) + result, response, operationErr = vpcService.ListSecurityGroupTargets(listSecurityGroupTargetsOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).To(BeNil()) + }) + AfterEach(func() { + testServer.Close() + }) + }) + }) + + Describe(`ListSecurityGroupTargets(listSecurityGroupTargetsOptions *ListSecurityGroupTargetsOptions)`, func() { + version := "testString" + listSecurityGroupTargetsPath := "/security_groups/testString/targets" + Context(`Using mock server endpoint with timeout`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupTargetsPath)) + Expect(req.Method).To(Equal("GET")) + + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) + // Sleep a short time to support a timeout test + time.Sleep(100 * time.Millisecond) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "total_count": 132}`) + })) + }) + It(`Invoke ListSecurityGroupTargets successfully with retries`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + vpcService.EnableRetries(0, 0) + + // Construct an instance of the ListSecurityGroupTargetsOptions model + listSecurityGroupTargetsOptionsModel := new(vpcv1.ListSecurityGroupTargetsOptions) + listSecurityGroupTargetsOptionsModel.SecurityGroupID = core.StringPtr("testString") + listSecurityGroupTargetsOptionsModel.Start = core.StringPtr("testString") + listSecurityGroupTargetsOptionsModel.Limit = core.Int64Ptr(int64(1)) + listSecurityGroupTargetsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + + // Invoke operation with a Context to test a timeout error + ctx, cancelFunc := context.WithTimeout(context.Background(), 80*time.Millisecond) + defer cancelFunc() + _, _, operationErr := vpcService.ListSecurityGroupTargetsWithContext(ctx, listSecurityGroupTargetsOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) + + // Disable retries and test again + vpcService.DisableRetries() + result, response, operationErr := vpcService.ListSecurityGroupTargets(listSecurityGroupTargetsOptionsModel) + Expect(operationErr).To(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).ToNot(BeNil()) + + // Re-test the timeout error with retries disabled + ctx, cancelFunc2 := context.WithTimeout(context.Background(), 80*time.Millisecond) + defer cancelFunc2() + _, _, operationErr = vpcService.ListSecurityGroupTargetsWithContext(ctx, listSecurityGroupTargetsOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) + }) + AfterEach(func() { + testServer.Close() + }) + }) + Context(`Using mock server endpoint`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupTargetsPath)) + Expect(req.Method).To(Equal("GET")) + + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/targets?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "targets": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}], "total_count": 132}`) + })) + }) + It(`Invoke ListSecurityGroupTargets successfully`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Invoke operation with nil options model (negative test) + result, response, operationErr := vpcService.ListSecurityGroupTargets(nil) + Expect(operationErr).NotTo(BeNil()) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + + // Construct an instance of the ListSecurityGroupTargetsOptions model + listSecurityGroupTargetsOptionsModel := new(vpcv1.ListSecurityGroupTargetsOptions) + listSecurityGroupTargetsOptionsModel.SecurityGroupID = core.StringPtr("testString") + listSecurityGroupTargetsOptionsModel.Start = core.StringPtr("testString") + listSecurityGroupTargetsOptionsModel.Limit = core.Int64Ptr(int64(1)) + listSecurityGroupTargetsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + + // Invoke operation with valid options model (positive test) + result, response, operationErr = vpcService.ListSecurityGroupTargets(listSecurityGroupTargetsOptionsModel) + Expect(operationErr).To(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).ToNot(BeNil()) + + }) + It(`Invoke ListSecurityGroupTargets with error: Operation validation and request error`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Construct an instance of the ListSecurityGroupTargetsOptions model + listSecurityGroupTargetsOptionsModel := new(vpcv1.ListSecurityGroupTargetsOptions) + listSecurityGroupTargetsOptionsModel.SecurityGroupID = core.StringPtr("testString") + listSecurityGroupTargetsOptionsModel.Start = core.StringPtr("testString") + listSecurityGroupTargetsOptionsModel.Limit = core.Int64Ptr(int64(1)) + listSecurityGroupTargetsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Invoke operation with empty URL (negative test) + err := vpcService.SetServiceURL("") + Expect(err).To(BeNil()) + result, response, operationErr := vpcService.ListSecurityGroupTargets(listSecurityGroupTargetsOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + // Construct a second instance of the ListSecurityGroupTargetsOptions model with no property values + listSecurityGroupTargetsOptionsModelNew := new(vpcv1.ListSecurityGroupTargetsOptions) + // Invoke operation with invalid model (negative test) + result, response, operationErr = vpcService.ListSecurityGroupTargets(listSecurityGroupTargetsOptionsModelNew) + Expect(operationErr).ToNot(BeNil()) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + }) + AfterEach(func() { + testServer.Close() + }) + }) + }) + + Describe(`DeleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptions *DeleteSecurityGroupTargetBindingOptions)`, func() { + version := "testString" + deleteSecurityGroupTargetBindingPath := "/security_groups/testString/targets/testString" + Context(`Using mock server endpoint`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(deleteSecurityGroupTargetBindingPath)) + Expect(req.Method).To(Equal("DELETE")) + + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + res.WriteHeader(204) + })) + }) + It(`Invoke DeleteSecurityGroupTargetBinding successfully`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Invoke operation with nil options model (negative test) + response, operationErr := vpcService.DeleteSecurityGroupTargetBinding(nil) + Expect(operationErr).NotTo(BeNil()) + Expect(response).To(BeNil()) + + // Construct an instance of the DeleteSecurityGroupTargetBindingOptions model + deleteSecurityGroupTargetBindingOptionsModel := new(vpcv1.DeleteSecurityGroupTargetBindingOptions) + deleteSecurityGroupTargetBindingOptionsModel.SecurityGroupID = core.StringPtr("testString") + deleteSecurityGroupTargetBindingOptionsModel.ID = core.StringPtr("testString") + deleteSecurityGroupTargetBindingOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + + // Invoke operation with valid options model (positive test) + response, operationErr = vpcService.DeleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).To(BeNil()) + Expect(response).ToNot(BeNil()) + }) + It(`Invoke DeleteSecurityGroupTargetBinding with error: Operation validation and request error`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Construct an instance of the DeleteSecurityGroupTargetBindingOptions model + deleteSecurityGroupTargetBindingOptionsModel := new(vpcv1.DeleteSecurityGroupTargetBindingOptions) + deleteSecurityGroupTargetBindingOptionsModel.SecurityGroupID = core.StringPtr("testString") + deleteSecurityGroupTargetBindingOptionsModel.ID = core.StringPtr("testString") + deleteSecurityGroupTargetBindingOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Invoke operation with empty URL (negative test) + err := vpcService.SetServiceURL("") + Expect(err).To(BeNil()) + response, operationErr := vpcService.DeleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) + Expect(response).To(BeNil()) + // Construct a second instance of the DeleteSecurityGroupTargetBindingOptions model with no property values + deleteSecurityGroupTargetBindingOptionsModelNew := new(vpcv1.DeleteSecurityGroupTargetBindingOptions) + // Invoke operation with invalid model (negative test) + response, operationErr = vpcService.DeleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptionsModelNew) + Expect(operationErr).ToNot(BeNil()) + Expect(response).To(BeNil()) + }) + AfterEach(func() { + testServer.Close() + }) + }) + }) + Describe(`GetSecurityGroupTarget(getSecurityGroupTargetOptions *GetSecurityGroupTargetOptions) - Operation response error`, func() { + version := "testString" + getSecurityGroupTargetPath := "/security_groups/testString/targets/testString" + Context(`Using mock server endpoint`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupTargetPath)) + Expect(req.Method).To(Equal("GET")) + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + fmt.Fprintf(res, `} this is not valid json {`) + })) + }) + It(`Invoke GetSecurityGroupTarget with error: Operation response processing error`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Construct an instance of the GetSecurityGroupTargetOptions model + getSecurityGroupTargetOptionsModel := new(vpcv1.GetSecurityGroupTargetOptions) + getSecurityGroupTargetOptionsModel.SecurityGroupID = core.StringPtr("testString") + getSecurityGroupTargetOptionsModel.ID = core.StringPtr("testString") + getSecurityGroupTargetOptionsModel.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 := vpcService.GetSecurityGroupTarget(getSecurityGroupTargetOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).To(BeNil()) + + // Enable retries and test again + vpcService.EnableRetries(0, 0) + result, response, operationErr = vpcService.GetSecurityGroupTarget(getSecurityGroupTargetOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).To(BeNil()) + }) + AfterEach(func() { + testServer.Close() + }) + }) + }) + + Describe(`GetSecurityGroupTarget(getSecurityGroupTargetOptions *GetSecurityGroupTargetOptions)`, func() { + version := "testString" + getSecurityGroupTargetPath := "/security_groups/testString/targets/testString" + Context(`Using mock server endpoint with timeout`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupTargetPath)) + Expect(req.Method).To(Equal("GET")) + + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + // Sleep a short time to support a timeout test + time.Sleep(100 * time.Millisecond) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}`) + })) + }) + It(`Invoke GetSecurityGroupTarget successfully with retries`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + vpcService.EnableRetries(0, 0) + + // Construct an instance of the GetSecurityGroupTargetOptions model + getSecurityGroupTargetOptionsModel := new(vpcv1.GetSecurityGroupTargetOptions) + getSecurityGroupTargetOptionsModel.SecurityGroupID = core.StringPtr("testString") + getSecurityGroupTargetOptionsModel.ID = core.StringPtr("testString") + getSecurityGroupTargetOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + + // Invoke operation with a Context to test a timeout error + ctx, cancelFunc := context.WithTimeout(context.Background(), 80*time.Millisecond) + defer cancelFunc() + _, _, operationErr := vpcService.GetSecurityGroupTargetWithContext(ctx, getSecurityGroupTargetOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) + + // Disable retries and test again + vpcService.DisableRetries() + result, response, operationErr := vpcService.GetSecurityGroupTarget(getSecurityGroupTargetOptionsModel) + Expect(operationErr).To(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).ToNot(BeNil()) + + // Re-test the timeout error with retries disabled + ctx, cancelFunc2 := context.WithTimeout(context.Background(), 80*time.Millisecond) + defer cancelFunc2() + _, _, operationErr = vpcService.GetSecurityGroupTargetWithContext(ctx, getSecurityGroupTargetOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) + }) + AfterEach(func() { + testServer.Close() + }) + }) + Context(`Using mock server endpoint`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupTargetPath)) + Expect(req.Method).To(Equal("GET")) + + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}`) + })) + }) + It(`Invoke GetSecurityGroupTarget successfully`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Invoke operation with nil options model (negative test) + result, response, operationErr := vpcService.GetSecurityGroupTarget(nil) + Expect(operationErr).NotTo(BeNil()) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + + // Construct an instance of the GetSecurityGroupTargetOptions model + getSecurityGroupTargetOptionsModel := new(vpcv1.GetSecurityGroupTargetOptions) + getSecurityGroupTargetOptionsModel.SecurityGroupID = core.StringPtr("testString") + getSecurityGroupTargetOptionsModel.ID = core.StringPtr("testString") + getSecurityGroupTargetOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + + // Invoke operation with valid options model (positive test) + result, response, operationErr = vpcService.GetSecurityGroupTarget(getSecurityGroupTargetOptionsModel) + Expect(operationErr).To(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).ToNot(BeNil()) + + }) + It(`Invoke GetSecurityGroupTarget with error: Operation validation and request error`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Construct an instance of the GetSecurityGroupTargetOptions model + getSecurityGroupTargetOptionsModel := new(vpcv1.GetSecurityGroupTargetOptions) + getSecurityGroupTargetOptionsModel.SecurityGroupID = core.StringPtr("testString") + getSecurityGroupTargetOptionsModel.ID = core.StringPtr("testString") + getSecurityGroupTargetOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Invoke operation with empty URL (negative test) + err := vpcService.SetServiceURL("") + Expect(err).To(BeNil()) + result, response, operationErr := vpcService.GetSecurityGroupTarget(getSecurityGroupTargetOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + // Construct a second instance of the GetSecurityGroupTargetOptions model with no property values + getSecurityGroupTargetOptionsModelNew := new(vpcv1.GetSecurityGroupTargetOptions) + // Invoke operation with invalid model (negative test) + result, response, operationErr = vpcService.GetSecurityGroupTarget(getSecurityGroupTargetOptionsModelNew) + Expect(operationErr).ToNot(BeNil()) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + }) + AfterEach(func() { + testServer.Close() + }) + }) + }) + Describe(`CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions) - Operation response error`, func() { + version := "testString" + createSecurityGroupTargetBindingPath := "/security_groups/testString/targets/testString" + Context(`Using mock server endpoint`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupTargetBindingPath)) + Expect(req.Method).To(Equal("PUT")) + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + res.Header().Set("Content-type", "application/json") + res.WriteHeader(201) + fmt.Fprintf(res, `} this is not valid json {`) + })) + }) + It(`Invoke CreateSecurityGroupTargetBinding with error: Operation response processing error`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Construct an instance of the CreateSecurityGroupTargetBindingOptions model + createSecurityGroupTargetBindingOptionsModel := new(vpcv1.CreateSecurityGroupTargetBindingOptions) + createSecurityGroupTargetBindingOptionsModel.SecurityGroupID = core.StringPtr("testString") + createSecurityGroupTargetBindingOptionsModel.ID = core.StringPtr("testString") + createSecurityGroupTargetBindingOptionsModel.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 := vpcService.CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).To(BeNil()) + + // Enable retries and test again + vpcService.EnableRetries(0, 0) + result, response, operationErr = vpcService.CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).To(BeNil()) + }) + AfterEach(func() { + testServer.Close() + }) + }) + }) + + Describe(`CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions)`, func() { + version := "testString" + createSecurityGroupTargetBindingPath := "/security_groups/testString/targets/testString" + Context(`Using mock server endpoint with timeout`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupTargetBindingPath)) + Expect(req.Method).To(Equal("PUT")) + + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + // Sleep a short time to support a timeout test + time.Sleep(100 * time.Millisecond) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(201) + fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}`) + })) + }) + It(`Invoke CreateSecurityGroupTargetBinding successfully with retries`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + vpcService.EnableRetries(0, 0) + + // Construct an instance of the CreateSecurityGroupTargetBindingOptions model + createSecurityGroupTargetBindingOptionsModel := new(vpcv1.CreateSecurityGroupTargetBindingOptions) + createSecurityGroupTargetBindingOptionsModel.SecurityGroupID = core.StringPtr("testString") + createSecurityGroupTargetBindingOptionsModel.ID = core.StringPtr("testString") + createSecurityGroupTargetBindingOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + + // Invoke operation with a Context to test a timeout error + ctx, cancelFunc := context.WithTimeout(context.Background(), 80*time.Millisecond) + defer cancelFunc() + _, _, operationErr := vpcService.CreateSecurityGroupTargetBindingWithContext(ctx, createSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) + + // Disable retries and test again + vpcService.DisableRetries() + result, response, operationErr := vpcService.CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).To(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).ToNot(BeNil()) + + // Re-test the timeout error with retries disabled + ctx, cancelFunc2 := context.WithTimeout(context.Background(), 80*time.Millisecond) + defer cancelFunc2() + _, _, operationErr = vpcService.CreateSecurityGroupTargetBindingWithContext(ctx, createSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) + }) + AfterEach(func() { + testServer.Close() + }) + }) + Context(`Using mock server endpoint`, func() { + BeforeEach(func() { + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupTargetBindingPath)) + Expect(req.Method).To(Equal("PUT")) + + Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) + Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(201) + fmt.Fprintf(res, "%s", `{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}`) + })) + }) + It(`Invoke CreateSecurityGroupTargetBinding successfully`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Invoke operation with nil options model (negative test) + result, response, operationErr := vpcService.CreateSecurityGroupTargetBinding(nil) + Expect(operationErr).NotTo(BeNil()) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + + // Construct an instance of the CreateSecurityGroupTargetBindingOptions model + createSecurityGroupTargetBindingOptionsModel := new(vpcv1.CreateSecurityGroupTargetBindingOptions) + createSecurityGroupTargetBindingOptionsModel.SecurityGroupID = core.StringPtr("testString") + createSecurityGroupTargetBindingOptionsModel.ID = core.StringPtr("testString") + createSecurityGroupTargetBindingOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + + // Invoke operation with valid options model (positive test) + result, response, operationErr = vpcService.CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).To(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).ToNot(BeNil()) + + }) + It(`Invoke CreateSecurityGroupTargetBinding with error: Operation validation and request error`, func() { + vpcService, serviceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + Version: core.StringPtr(version), + }) + Expect(serviceErr).To(BeNil()) + Expect(vpcService).ToNot(BeNil()) + + // Construct an instance of the CreateSecurityGroupTargetBindingOptions model + createSecurityGroupTargetBindingOptionsModel := new(vpcv1.CreateSecurityGroupTargetBindingOptions) + createSecurityGroupTargetBindingOptionsModel.SecurityGroupID = core.StringPtr("testString") + createSecurityGroupTargetBindingOptionsModel.ID = core.StringPtr("testString") + createSecurityGroupTargetBindingOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Invoke operation with empty URL (negative test) + err := vpcService.SetServiceURL("") + Expect(err).To(BeNil()) + result, response, operationErr := vpcService.CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + // Construct a second instance of the CreateSecurityGroupTargetBindingOptions model with no property values + createSecurityGroupTargetBindingOptionsModelNew := new(vpcv1.CreateSecurityGroupTargetBindingOptions) + // Invoke operation with invalid model (negative test) + result, response, operationErr = vpcService.CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptionsModelNew) + Expect(operationErr).ToNot(BeNil()) + Expect(response).To(BeNil()) + Expect(result).To(BeNil()) + }) + AfterEach(func() { + testServer.Close() + }) + }) + }) Describe(`Service constructor tests`, func() { version := "testString" It(`Instantiate service client`, func() { @@ -36226,13 +35815,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listIkePoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -36284,13 +35869,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -36351,13 +35932,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -36432,9 +36009,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createIkePolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -36511,9 +36086,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -36599,9 +36172,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -36703,9 +36274,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -36777,9 +36346,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getIkePolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -36830,9 +36397,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -36892,9 +36457,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -36974,9 +36537,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateIkePolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -37044,9 +36605,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -37123,9 +36682,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -37207,9 +36764,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listIkePolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -37260,9 +36815,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -37322,9 +36875,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -37404,13 +36955,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listIpsecPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -37462,13 +37009,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -37529,13 +37072,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -37610,9 +37149,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createIpsecPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -37688,9 +37225,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -37775,9 +37310,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -37877,9 +37410,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -37951,9 +37482,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getIpsecPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -38004,9 +37533,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -38066,9 +37593,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -38148,9 +37673,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateIpsecPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -38228,9 +37751,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -38317,9 +37838,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -38421,9 +37940,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listIpsecPolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -38474,9 +37991,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -38536,9 +38051,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -38618,17 +38131,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["mode"]).To(Equal([]string{"route"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -38682,24 +38189,18 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["mode"]).To(Equal([]string{"route"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}]}`) })) }) It(`Invoke ListVPNGateways successfully with retries`, func() { @@ -38755,21 +38256,15 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["mode"]).To(Equal([]string{"route"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways?start=9d5a91a3e2cbd233b5a5b33436855ed&limit=20"}, "total_count": 132, "vpn_gateways": [{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}]}`) })) }) It(`Invoke ListVPNGateways successfully`, func() { @@ -38844,9 +38339,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -38928,16 +38421,14 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) })) }) It(`Invoke CreateVPNGateway successfully with retries`, func() { @@ -39021,13 +38512,11 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) })) }) It(`Invoke CreateVPNGateway successfully`, func() { @@ -39135,9 +38624,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(202) })) }) @@ -39209,9 +38696,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -39262,16 +38747,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) })) }) It(`Invoke GetVPNGateway successfully with retries`, func() { @@ -39324,13 +38807,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) })) }) It(`Invoke GetVPNGateway successfully`, func() { @@ -39406,9 +38887,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -39482,16 +38961,14 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) })) }) It(`Invoke UpdateVPNGateway successfully with retries`, func() { @@ -39567,13 +39044,11 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) + fmt.Fprintf(res, "%s", `{"connections": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "name": "my-vpn-connection", "resource_type": "vpn_gateway_connection"}], "created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpn:ddf51bec-3424-11e8-b467-0ed5f89f718b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "members": [{"private_ip": {"address": "192.168.3.4"}, "public_ip": {"address": "192.168.3.4"}, "role": "active", "status": "available"}], "name": "my-vpn-gateway", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "resource_type": "vpn_gateway", "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "mode": "route"}`) })) }) It(`Invoke UpdateVPNGateway successfully`, func() { @@ -39663,11 +39138,8 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["status"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -39719,11 +39191,8 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["status"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -39784,11 +39253,8 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["status"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -39870,9 +39336,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -39965,9 +39429,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -40069,9 +39531,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -40205,9 +39665,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(202) })) }) @@ -40281,9 +39739,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -40335,9 +39791,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -40398,9 +39852,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -40482,9 +39934,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -40580,9 +40030,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -40687,9 +40135,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -40827,9 +40273,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -40881,9 +40325,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -40944,9 +40386,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -41030,9 +40470,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -41112,9 +40550,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -41194,9 +40630,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -41274,9 +40708,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -41328,9 +40760,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -41391,9 +40821,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -41477,9 +40905,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -41559,9 +40985,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -41641,9 +41065,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -41864,13 +41286,9 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -41922,20 +41340,16 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed"}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "security_groups_supported": {"type": "fixed", "value": true}}], "total_count": 132}`) })) }) It(`Invoke ListLoadBalancerProfiles successfully with retries`, func() { @@ -41989,17 +41403,13 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed"}], "total_count": 132}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "profiles": [{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "security_groups_supported": {"type": "fixed", "value": true}}], "total_count": 132}`) })) }) It(`Invoke ListLoadBalancerProfiles successfully`, func() { @@ -42070,9 +41480,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -42123,16 +41531,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed"}`) + fmt.Fprintf(res, "%s", `{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "security_groups_supported": {"type": "fixed", "value": true}}`) })) }) It(`Invoke GetLoadBalancerProfile successfully with retries`, func() { @@ -42185,13 +41591,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed"}`) + fmt.Fprintf(res, "%s", `{"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "logging_supported": {"type": "fixed", "value": ["datapath"]}, "name": "network-fixed", "security_groups_supported": {"type": "fixed", "value": true}}`) })) }) It(`Invoke GetLoadBalancerProfile successfully`, func() { @@ -42267,9 +41671,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -42319,16 +41721,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}]}`) + fmt.Fprintf(res, "%s", `{"load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}]}`) })) }) It(`Invoke ListLoadBalancers successfully with retries`, func() { @@ -42380,13 +41780,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}]}`) + fmt.Fprintf(res, "%s", `{"load_balancers": [{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}]}`) })) }) It(`Invoke ListLoadBalancers successfully`, func() { @@ -42453,9 +41851,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -42535,6 +41931,10 @@ var _ = Describe(`VpcV1`, func() { resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") + // Construct an instance of the SecurityGroupIdentityByID model + securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) + securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + // Construct an instance of the CreateLoadBalancerOptions model createLoadBalancerOptionsModel := new(vpcv1.CreateLoadBalancerOptions) createLoadBalancerOptionsModel.IsPublic = core.BoolPtr(true) @@ -42545,6 +41945,7 @@ var _ = Describe(`VpcV1`, func() { createLoadBalancerOptionsModel.Pools = []vpcv1.LoadBalancerPoolPrototype{*loadBalancerPoolPrototypeModel} createLoadBalancerOptionsModel.Profile = loadBalancerProfileIdentityModel createLoadBalancerOptionsModel.ResourceGroup = resourceGroupIdentityModel + createLoadBalancerOptionsModel.SecurityGroups = []vpcv1.SecurityGroupIdentityIntf{securityGroupIdentityModel} createLoadBalancerOptionsModel.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 := vpcService.CreateLoadBalancer(createLoadBalancerOptionsModel) @@ -42594,16 +41995,14 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) })) }) It(`Invoke CreateLoadBalancer successfully with retries`, func() { @@ -42681,6 +42080,10 @@ var _ = Describe(`VpcV1`, func() { resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") + // Construct an instance of the SecurityGroupIdentityByID model + securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) + securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + // Construct an instance of the CreateLoadBalancerOptions model createLoadBalancerOptionsModel := new(vpcv1.CreateLoadBalancerOptions) createLoadBalancerOptionsModel.IsPublic = core.BoolPtr(true) @@ -42691,6 +42094,7 @@ var _ = Describe(`VpcV1`, func() { createLoadBalancerOptionsModel.Pools = []vpcv1.LoadBalancerPoolPrototype{*loadBalancerPoolPrototypeModel} createLoadBalancerOptionsModel.Profile = loadBalancerProfileIdentityModel createLoadBalancerOptionsModel.ResourceGroup = resourceGroupIdentityModel + createLoadBalancerOptionsModel.SecurityGroups = []vpcv1.SecurityGroupIdentityIntf{securityGroupIdentityModel} createLoadBalancerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -42744,13 +42148,11 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) })) }) It(`Invoke CreateLoadBalancer successfully`, func() { @@ -42833,6 +42235,10 @@ var _ = Describe(`VpcV1`, func() { resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") + // Construct an instance of the SecurityGroupIdentityByID model + securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) + securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + // Construct an instance of the CreateLoadBalancerOptions model createLoadBalancerOptionsModel := new(vpcv1.CreateLoadBalancerOptions) createLoadBalancerOptionsModel.IsPublic = core.BoolPtr(true) @@ -42843,6 +42249,7 @@ var _ = Describe(`VpcV1`, func() { createLoadBalancerOptionsModel.Pools = []vpcv1.LoadBalancerPoolPrototype{*loadBalancerPoolPrototypeModel} createLoadBalancerOptionsModel.Profile = loadBalancerProfileIdentityModel createLoadBalancerOptionsModel.ResourceGroup = resourceGroupIdentityModel + createLoadBalancerOptionsModel.SecurityGroups = []vpcv1.SecurityGroupIdentityIntf{securityGroupIdentityModel} createLoadBalancerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -42926,6 +42333,10 @@ var _ = Describe(`VpcV1`, func() { resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") + // Construct an instance of the SecurityGroupIdentityByID model + securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) + securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + // Construct an instance of the CreateLoadBalancerOptions model createLoadBalancerOptionsModel := new(vpcv1.CreateLoadBalancerOptions) createLoadBalancerOptionsModel.IsPublic = core.BoolPtr(true) @@ -42936,6 +42347,7 @@ var _ = Describe(`VpcV1`, func() { createLoadBalancerOptionsModel.Pools = []vpcv1.LoadBalancerPoolPrototype{*loadBalancerPoolPrototypeModel} createLoadBalancerOptionsModel.Profile = loadBalancerProfileIdentityModel createLoadBalancerOptionsModel.ResourceGroup = resourceGroupIdentityModel + createLoadBalancerOptionsModel.SecurityGroups = []vpcv1.SecurityGroupIdentityIntf{securityGroupIdentityModel} createLoadBalancerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -42972,9 +42384,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -43046,9 +42456,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -43099,16 +42507,14 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) })) }) It(`Invoke GetLoadBalancer successfully with retries`, func() { @@ -43161,13 +42567,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) })) }) It(`Invoke GetLoadBalancer successfully`, func() { @@ -43243,9 +42647,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -43328,16 +42730,14 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) })) }) It(`Invoke UpdateLoadBalancer successfully with retries`, func() { @@ -43422,13 +42822,11 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) + fmt.Fprintf(res, "%s", `{"created_at": "2019-01-01T12:00:00.000Z", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::load-balancer:dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "hostname": "my-load-balancer-123456-us-south-1.lb.bluemix.net", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "id": "dd754295-e9e0-4c9d-bf6c-58fbc59e5727", "is_public": true, "listeners": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/listeners/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004"}], "logging": {"datapath": {"active": true}}, "name": "my-load-balancer", "operating_status": "offline", "pools": [{"deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancers/dd754295-e9e0-4c9d-bf6c-58fbc59e5727/pools/70294e14-4e61-11e8-bcf4-0242ac110004", "id": "70294e14-4e61-11e8-bcf4-0242ac110004", "name": "my-load-balancer-pool"}], "private_ips": [{"address": "192.168.3.4"}], "profile": {"family": "network", "href": "https://us-south.iaas.cloud.ibm.com/v1/load_balancer/profiles/network-fixed", "name": "network-fixed"}, "provisioning_status": "active", "public_ips": [{"address": "192.168.3.4"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "security_groups_supported": false, "subnets": [{"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "deleted": {"more_info": "https://cloud.ibm.com/apidocs/vpc#deleted-resources"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}]}`) })) }) It(`Invoke UpdateLoadBalancer successfully`, func() { @@ -43536,9 +42934,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerStatisticsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -43589,9 +42985,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -43651,9 +43045,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -43733,9 +43125,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -43786,9 +43176,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -43848,9 +43236,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -43930,9 +43316,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -44033,9 +43417,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -44145,9 +43527,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -44297,9 +43677,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -44373,9 +43751,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -44427,9 +43803,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -44490,9 +43864,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -44574,9 +43946,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -44664,9 +44034,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -44763,9 +44131,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -44887,9 +44253,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -44941,9 +44305,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -45004,9 +44366,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -45088,9 +44448,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -45174,9 +44532,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -45269,9 +44625,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -45387,9 +44741,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -45465,9 +44817,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -45520,9 +44870,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -45584,9 +44932,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -45670,9 +45016,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -45754,9 +45098,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -45847,9 +45189,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -45959,9 +45299,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPolicyRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -46014,9 +45352,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -46078,9 +45414,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -46164,9 +45498,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -46239,9 +45571,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -46323,9 +45653,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -46419,9 +45747,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -46499,9 +45825,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -46555,9 +45879,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -46620,9 +45942,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -46708,9 +46028,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -46790,9 +46108,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -46881,9 +46197,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -46989,9 +46303,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -47042,9 +46354,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -47104,9 +46414,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -47186,9 +46494,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -47285,9 +46591,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -47393,9 +46697,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -47537,9 +46839,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -47613,9 +46913,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -47667,9 +46965,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -47730,9 +47026,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -47814,9 +47108,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -47909,9 +47201,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -48013,9 +47303,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -48147,9 +47435,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -48201,9 +47487,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -48264,9 +47548,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -48348,9 +47630,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -48425,9 +47705,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -48511,9 +47789,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -48609,9 +47885,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(replaceLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(202) fmt.Fprintf(res, `} this is not valid json {`) @@ -48690,9 +47964,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -48780,9 +48052,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(202) @@ -48888,9 +48158,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -48966,9 +48234,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -49021,9 +48287,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -49085,9 +48349,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -49171,9 +48433,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -49255,9 +48515,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -49348,9 +48606,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -49603,17 +48859,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listEndpointGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -49667,17 +48917,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -49740,17 +48984,11 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -49829,9 +49067,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createEndpointGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -49919,9 +49155,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -50018,9 +49252,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -50142,15 +49374,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listEndpointGatewayIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -50204,15 +49431,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -50275,15 +49497,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["sort"]).To(Equal([]string{"name"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -50371,9 +49588,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -50447,9 +49662,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getEndpointGatewayIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -50501,9 +49714,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -50564,9 +49775,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -50648,9 +49857,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(addEndpointGatewayIPPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -50702,9 +49909,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -50765,9 +49970,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -50851,9 +50054,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -50925,9 +50126,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getEndpointGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -50978,9 +50177,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -51040,9 +50237,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -51122,9 +50317,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateEndpointGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -51198,9 +50391,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -51283,9 +50474,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -51522,27 +50711,16 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listFlowLogCollectorsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"vpc"})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -51601,27 +50779,16 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"vpc"})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -51689,27 +50856,16 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - Expect(req.URL.Query()["resource_group.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.crn"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["vpc.name"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.id"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["target.resource_type"]).To(Equal([]string{"vpc"})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -51798,9 +50954,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(createFlowLogCollectorPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(201) fmt.Fprintf(res, `} this is not valid json {`) @@ -51883,9 +51037,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -51977,9 +51129,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) @@ -52093,9 +51243,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.WriteHeader(204) })) }) @@ -52167,9 +51315,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getFlowLogCollectorPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -52220,9 +51366,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -52282,9 +51426,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -52364,9 +51506,7 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(updateFlowLogCollectorPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -52441,9 +51581,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -52527,9 +51665,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(GinkgoWriter, " Request body: %s", bodyBuf.String()) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) - // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -53791,6 +52927,12 @@ var _ = Describe(`VpcV1`, func() { resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") Expect(resourceGroupIdentityModel.ID).To(Equal(core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345"))) + // Construct an instance of the SecurityGroupIdentityByID model + securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) + Expect(securityGroupIdentityModel).ToNot(BeNil()) + securityGroupIdentityModel.ID = core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271") + Expect(securityGroupIdentityModel.ID).To(Equal(core.StringPtr("be5df5ca-12a0-494b-907e-aa6ec2bfa271"))) + // Construct an instance of the CreateLoadBalancerOptions model createLoadBalancerOptionsIsPublic := true createLoadBalancerOptionsSubnets := []vpcv1.SubnetIdentityIntf{} @@ -53803,6 +52945,7 @@ var _ = Describe(`VpcV1`, func() { createLoadBalancerOptionsModel.SetPools([]vpcv1.LoadBalancerPoolPrototype{*loadBalancerPoolPrototypeModel}) createLoadBalancerOptionsModel.SetProfile(loadBalancerProfileIdentityModel) createLoadBalancerOptionsModel.SetResourceGroup(resourceGroupIdentityModel) + createLoadBalancerOptionsModel.SetSecurityGroups([]vpcv1.SecurityGroupIdentityIntf{securityGroupIdentityModel}) createLoadBalancerOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createLoadBalancerOptionsModel).ToNot(BeNil()) Expect(createLoadBalancerOptionsModel.IsPublic).To(Equal(core.BoolPtr(true))) @@ -53813,6 +52956,7 @@ var _ = Describe(`VpcV1`, func() { Expect(createLoadBalancerOptionsModel.Pools).To(Equal([]vpcv1.LoadBalancerPoolPrototype{*loadBalancerPoolPrototypeModel})) Expect(createLoadBalancerOptionsModel.Profile).To(Equal(loadBalancerProfileIdentityModel)) Expect(createLoadBalancerOptionsModel.ResourceGroup).To(Equal(resourceGroupIdentityModel)) + Expect(createLoadBalancerOptionsModel.SecurityGroups).To(Equal([]vpcv1.SecurityGroupIdentityIntf{securityGroupIdentityModel})) Expect(createLoadBalancerOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateLoadBalancerPoolMemberOptions successfully`, func() { @@ -54125,6 +53269,19 @@ var _ = Describe(`VpcV1`, func() { Expect(createSecurityGroupRuleOptionsModel.SecurityGroupRulePrototype).To(Equal(securityGroupRulePrototypeModel)) Expect(createSecurityGroupRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) + It(`Invoke NewCreateSecurityGroupTargetBindingOptions successfully`, func() { + // Construct an instance of the CreateSecurityGroupTargetBindingOptions model + securityGroupID := "testString" + id := "testString" + createSecurityGroupTargetBindingOptionsModel := vpcService.NewCreateSecurityGroupTargetBindingOptions(securityGroupID, id) + createSecurityGroupTargetBindingOptionsModel.SetSecurityGroupID("testString") + createSecurityGroupTargetBindingOptionsModel.SetID("testString") + createSecurityGroupTargetBindingOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(createSecurityGroupTargetBindingOptionsModel).ToNot(BeNil()) + Expect(createSecurityGroupTargetBindingOptionsModel.SecurityGroupID).To(Equal(core.StringPtr("testString"))) + Expect(createSecurityGroupTargetBindingOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(createSecurityGroupTargetBindingOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) It(`Invoke NewCreateSubnetOptions successfully`, func() { // Construct an instance of the NetworkACLIdentityByID model networkACLIdentityModel := new(vpcv1.NetworkACLIdentityByID) @@ -54315,38 +53472,37 @@ var _ = Describe(`VpcV1`, func() { Expect(createVPCOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVPCRouteOptions successfully`, func() { - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - Expect(routeNextHopPrototypeModel).ToNot(BeNil()) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - Expect(routeNextHopPrototypeModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) Expect(zoneIdentityModel).ToNot(BeNil()) zoneIdentityModel.Name = core.StringPtr("us-south-1") Expect(zoneIdentityModel.Name).To(Equal(core.StringPtr("us-south-1"))) + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + Expect(routeNextHopPrototypeModel).ToNot(BeNil()) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + Expect(routeNextHopPrototypeModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) + // Construct an instance of the CreateVPCRouteOptions model vpcID := "testString" createVPCRouteOptionsDestination := "192.168.3.0/24" - var createVPCRouteOptionsNextHop vpcv1.RouteNextHopPrototypeIntf = nil var createVPCRouteOptionsZone vpcv1.ZoneIdentityIntf = nil - createVPCRouteOptionsModel := vpcService.NewCreateVPCRouteOptions(vpcID, createVPCRouteOptionsDestination, createVPCRouteOptionsNextHop, createVPCRouteOptionsZone) + createVPCRouteOptionsModel := vpcService.NewCreateVPCRouteOptions(vpcID, createVPCRouteOptionsDestination, createVPCRouteOptionsZone) createVPCRouteOptionsModel.SetVPCID("testString") createVPCRouteOptionsModel.SetDestination("192.168.3.0/24") - createVPCRouteOptionsModel.SetNextHop(routeNextHopPrototypeModel) createVPCRouteOptionsModel.SetZone(zoneIdentityModel) createVPCRouteOptionsModel.SetAction("delegate") createVPCRouteOptionsModel.SetName("my-route-2") + createVPCRouteOptionsModel.SetNextHop(routeNextHopPrototypeModel) createVPCRouteOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createVPCRouteOptionsModel).ToNot(BeNil()) Expect(createVPCRouteOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) Expect(createVPCRouteOptionsModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) - Expect(createVPCRouteOptionsModel.NextHop).To(Equal(routeNextHopPrototypeModel)) Expect(createVPCRouteOptionsModel.Zone).To(Equal(zoneIdentityModel)) Expect(createVPCRouteOptionsModel.Action).To(Equal(core.StringPtr("delegate"))) Expect(createVPCRouteOptionsModel.Name).To(Equal(core.StringPtr("my-route-2"))) + Expect(createVPCRouteOptionsModel.NextHop).To(Equal(routeNextHopPrototypeModel)) Expect(createVPCRouteOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVPCRoutingTableOptions successfully`, func() { @@ -54396,41 +53552,40 @@ var _ = Describe(`VpcV1`, func() { Expect(createVPCRoutingTableOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVPCRoutingTableRouteOptions successfully`, func() { - // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model - routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) - Expect(routeNextHopPrototypeModel).ToNot(BeNil()) - routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") - Expect(routeNextHopPrototypeModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) - // Construct an instance of the ZoneIdentityByName model zoneIdentityModel := new(vpcv1.ZoneIdentityByName) Expect(zoneIdentityModel).ToNot(BeNil()) zoneIdentityModel.Name = core.StringPtr("us-south-1") Expect(zoneIdentityModel.Name).To(Equal(core.StringPtr("us-south-1"))) + // Construct an instance of the RouteNextHopPrototypeRouteNextHopIP model + routeNextHopPrototypeModel := new(vpcv1.RouteNextHopPrototypeRouteNextHopIP) + Expect(routeNextHopPrototypeModel).ToNot(BeNil()) + routeNextHopPrototypeModel.Address = core.StringPtr("192.168.3.4") + Expect(routeNextHopPrototypeModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) + // Construct an instance of the CreateVPCRoutingTableRouteOptions model vpcID := "testString" routingTableID := "testString" createVPCRoutingTableRouteOptionsDestination := "192.168.3.0/24" - var createVPCRoutingTableRouteOptionsNextHop vpcv1.RouteNextHopPrototypeIntf = nil var createVPCRoutingTableRouteOptionsZone vpcv1.ZoneIdentityIntf = nil - createVPCRoutingTableRouteOptionsModel := vpcService.NewCreateVPCRoutingTableRouteOptions(vpcID, routingTableID, createVPCRoutingTableRouteOptionsDestination, createVPCRoutingTableRouteOptionsNextHop, createVPCRoutingTableRouteOptionsZone) + createVPCRoutingTableRouteOptionsModel := vpcService.NewCreateVPCRoutingTableRouteOptions(vpcID, routingTableID, createVPCRoutingTableRouteOptionsDestination, createVPCRoutingTableRouteOptionsZone) createVPCRoutingTableRouteOptionsModel.SetVPCID("testString") createVPCRoutingTableRouteOptionsModel.SetRoutingTableID("testString") createVPCRoutingTableRouteOptionsModel.SetDestination("192.168.3.0/24") - createVPCRoutingTableRouteOptionsModel.SetNextHop(routeNextHopPrototypeModel) createVPCRoutingTableRouteOptionsModel.SetZone(zoneIdentityModel) createVPCRoutingTableRouteOptionsModel.SetAction("delegate") createVPCRoutingTableRouteOptionsModel.SetName("my-route-2") + createVPCRoutingTableRouteOptionsModel.SetNextHop(routeNextHopPrototypeModel) createVPCRoutingTableRouteOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createVPCRoutingTableRouteOptionsModel).ToNot(BeNil()) Expect(createVPCRoutingTableRouteOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) Expect(createVPCRoutingTableRouteOptionsModel.RoutingTableID).To(Equal(core.StringPtr("testString"))) Expect(createVPCRoutingTableRouteOptionsModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) - Expect(createVPCRoutingTableRouteOptionsModel.NextHop).To(Equal(routeNextHopPrototypeModel)) Expect(createVPCRoutingTableRouteOptionsModel.Zone).To(Equal(zoneIdentityModel)) Expect(createVPCRoutingTableRouteOptionsModel.Action).To(Equal(core.StringPtr("delegate"))) Expect(createVPCRoutingTableRouteOptionsModel.Name).To(Equal(core.StringPtr("my-route-2"))) + Expect(createVPCRoutingTableRouteOptionsModel.NextHop).To(Equal(routeNextHopPrototypeModel)) Expect(createVPCRoutingTableRouteOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVPNGatewayConnectionOptions successfully`, func() { @@ -54873,6 +54028,19 @@ var _ = Describe(`VpcV1`, func() { Expect(deleteSecurityGroupRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(deleteSecurityGroupRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) + It(`Invoke NewDeleteSecurityGroupTargetBindingOptions successfully`, func() { + // Construct an instance of the DeleteSecurityGroupTargetBindingOptions model + securityGroupID := "testString" + id := "testString" + deleteSecurityGroupTargetBindingOptionsModel := vpcService.NewDeleteSecurityGroupTargetBindingOptions(securityGroupID, id) + deleteSecurityGroupTargetBindingOptionsModel.SetSecurityGroupID("testString") + deleteSecurityGroupTargetBindingOptionsModel.SetID("testString") + deleteSecurityGroupTargetBindingOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(deleteSecurityGroupTargetBindingOptionsModel).ToNot(BeNil()) + Expect(deleteSecurityGroupTargetBindingOptionsModel.SecurityGroupID).To(Equal(core.StringPtr("testString"))) + Expect(deleteSecurityGroupTargetBindingOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(deleteSecurityGroupTargetBindingOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) It(`Invoke NewDeleteSubnetOptions successfully`, func() { // Construct an instance of the DeleteSubnetOptions model id := "testString" @@ -55450,6 +54618,19 @@ var _ = Describe(`VpcV1`, func() { Expect(getSecurityGroupRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(getSecurityGroupRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) + It(`Invoke NewGetSecurityGroupTargetOptions successfully`, func() { + // Construct an instance of the GetSecurityGroupTargetOptions model + securityGroupID := "testString" + id := "testString" + getSecurityGroupTargetOptionsModel := vpcService.NewGetSecurityGroupTargetOptions(securityGroupID, id) + getSecurityGroupTargetOptionsModel.SetSecurityGroupID("testString") + getSecurityGroupTargetOptionsModel.SetID("testString") + getSecurityGroupTargetOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(getSecurityGroupTargetOptionsModel).ToNot(BeNil()) + Expect(getSecurityGroupTargetOptionsModel.SecurityGroupID).To(Equal(core.StringPtr("testString"))) + Expect(getSecurityGroupTargetOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(getSecurityGroupTargetOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) It(`Invoke NewGetSubnetNetworkACLOptions successfully`, func() { // Construct an instance of the GetSubnetNetworkACLOptions model id := "testString" @@ -56113,6 +55294,20 @@ var _ = Describe(`VpcV1`, func() { Expect(listSecurityGroupRulesOptionsModel.SecurityGroupID).To(Equal(core.StringPtr("testString"))) Expect(listSecurityGroupRulesOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) + It(`Invoke NewListSecurityGroupTargetsOptions successfully`, func() { + // Construct an instance of the ListSecurityGroupTargetsOptions model + securityGroupID := "testString" + listSecurityGroupTargetsOptionsModel := vpcService.NewListSecurityGroupTargetsOptions(securityGroupID) + listSecurityGroupTargetsOptionsModel.SetSecurityGroupID("testString") + listSecurityGroupTargetsOptionsModel.SetStart("testString") + listSecurityGroupTargetsOptionsModel.SetLimit(int64(1)) + listSecurityGroupTargetsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(listSecurityGroupTargetsOptionsModel).ToNot(BeNil()) + Expect(listSecurityGroupTargetsOptionsModel.SecurityGroupID).To(Equal(core.StringPtr("testString"))) + Expect(listSecurityGroupTargetsOptionsModel.Start).To(Equal(core.StringPtr("testString"))) + Expect(listSecurityGroupTargetsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(1)))) + Expect(listSecurityGroupTargetsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) It(`Invoke NewListSecurityGroupsOptions successfully`, func() { // Construct an instance of the ListSecurityGroupsOptions model listSecurityGroupsOptionsModel := vpcService.NewListSecurityGroupsOptions() @@ -56556,9 +55751,8 @@ var _ = Describe(`VpcV1`, func() { }) It(`Invoke NewRoutePrototype successfully`, func() { destination := "192.168.3.0/24" - var nextHop vpcv1.RouteNextHopPrototypeIntf = nil var zone vpcv1.ZoneIdentityIntf = nil - _, err := vpcService.NewRoutePrototype(destination, nextHop, zone) + _, err := vpcService.NewRoutePrototype(destination, zone) Expect(err).ToNot(BeNil()) }) It(`Invoke NewSetSubnetPublicGatewayOptions successfully`, func() { @@ -57974,6 +57168,18 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) + It(`Invoke NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref successfully`, func() { + href := "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b" + model, err := vpcService.NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(href) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID successfully`, func() { + id := "a10a5771-dc23-442c-8460-c3601d8542f7" + model, err := vpcService.NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(id) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) It(`Invoke NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" model, err := vpcService.NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(crn)