From a3de0c53ef21a5d0dd98e21bd012567c54ba4d6d Mon Sep 17 00:00:00 2001 From: Ian Eyberg Date: Mon, 17 Jul 2023 18:12:13 -0700 Subject: [PATCH] bumping upcloud && setting longer default timeout (#1496) --- go.mod | 4 +- go.sum | 143 +++++++-- provider/upcloud/mocks/upcloud.go | 374 ++++++++++++++-------- provider/upcloud/upcloud.go | 24 +- provider/upcloud/upcloud_image.go | 10 +- provider/upcloud/upcloud_image_test.go | 24 +- provider/upcloud/upcloud_instance.go | 24 +- provider/upcloud/upcloud_instance_test.go | 35 +- provider/upcloud/upcloud_store.go | 29 +- provider/upcloud/upcloud_test.go | 11 +- provider/upcloud/upcloud_volume.go | 15 +- provider/upcloud/upcloud_volume_test.go | 40 +-- 12 files changed, 459 insertions(+), 274 deletions(-) diff --git a/go.mod b/go.mod index 098cf3a9..272df22a 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/Azure/go-autorest/autorest/adal v0.9.18 github.com/Azure/go-autorest/autorest/azure/auth v0.5.3 github.com/Azure/go-autorest/autorest/to v0.4.0 - github.com/UpCloudLtd/upcloud-go-api v0.0.0-20210127073406-2964ed7e5972 github.com/aws/aws-sdk-go v1.35.20 github.com/bramvdbogaerde/go-scp v1.0.0 github.com/digitalocean/godo v1.57.0 @@ -44,6 +43,7 @@ require ( google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 google.golang.org/grpc v1.51.0 google.golang.org/protobuf v1.28.1 + gopkg.in/yaml.v2 v2.4.0 gotest.tools v2.2.0+incompatible k8s.io/client-go v0.23.1 ) @@ -62,6 +62,7 @@ require ( github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/UpCloudLtd/upcloud-go-api/v6 v6.5.0 // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/containerd/containerd v1.6.12 // indirect @@ -112,7 +113,6 @@ require ( golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.23.1 // indirect k8s.io/apimachinery v0.23.1 // indirect diff --git a/go.sum b/go.sum index 58815b18..0c0a8fe6 100644 --- a/go.sum +++ b/go.sum @@ -49,14 +49,10 @@ cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgy cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.sr.ht/~yoink00/goflenfig v0.1.0/go.mod h1:+b5SR2TmdQHQ2WqgotlpJEN0xjijoDz6V3pzyfyc6v4= -github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v63.0.0+incompatible h1:whPsa+jCHQSo5wGMPNLw4bz8q9Co2+vnXHzXGctoTaQ= github.com/Azure/azure-sdk-for-go v63.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-storage-blob-go v0.10.0 h1:evCwGreYo3XLeBV4vSxLbLiYb6e0SzsJiXQVRGsRXxs= -github.com/Azure/azure-storage-blob-go v0.10.0/go.mod h1:ep1edmW+kNQx4UfWM9heESNmQdijykocJ0YOxmMX8SE= github.com/Azure/azure-storage-blob-go v0.15.0 h1:rXtgp8tN1p29GvpGgfJetavIG0V7OgcSXPpwp3tx6qk= github.com/Azure/azure-storage-blob-go v0.15.0/go.mod h1:vbjsVbX0dlxnRc4FFMPsS9BsJWPcne7GB7onqlPvz58= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= @@ -64,13 +60,10 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.11.9/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.24 h1:1fIGgHKqVm54KIPT+q8Zmd1QlVsmHqeUGso5qm2BqqE= github.com/Azure/go-autorest/autorest v0.11.24/go.mod h1:G6kyRlFnTuSbEYkQGawPfsCswgme4iYf6rfSKUDzbCc= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ= @@ -79,35 +72,29 @@ github.com/Azure/go-autorest/autorest/azure/auth v0.5.3 h1:lZifaPRAk1bqg5vGqreL6 github.com/Azure/go-autorest/autorest/azure/auth v0.5.3/go.mod h1:4bJZhUhcq8LB20TruwHbAQsmUs2Xh+QR7utuJpLXX3A= github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 h1:dMOmEJfkLKW/7JsokJqkyoYSgmR08hi9KrhjZb+JALY= github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/UpCloudLtd/upcloud-go-api v0.0.0-20210127073406-2964ed7e5972 h1:OUrt9phz41jCKOgqu3Iq8KH+5OfyfgcdFT28R9QLN0Y= -github.com/UpCloudLtd/upcloud-go-api v0.0.0-20210127073406-2964ed7e5972/go.mod h1:nKv1Y0cTJTGYSd3lEcFfEnbPPiIj3gT4lJzV0ZfTlpQ= +github.com/UpCloudLtd/upcloud-go-api/v6 v6.5.0 h1:bOZY2kNRZo7J+9vgG37Z7S36Wb1SSoTNmg+RPaL6eJs= +github.com/UpCloudLtd/upcloud-go-api/v6 v6.5.0/go.mod h1:I8rWmBBl+OhiY3AGzKbrobiE5TsLCLNYkCQxE4eJcTg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -131,11 +118,15 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/containerd/containerd v1.6.12 h1:kJ9b3mOFKf8yqo05Ob+tMoxvt1pbVWhnB0re9Y+k+8c= github.com/containerd/containerd v1.6.12/go.mod h1:K4Bw7gjgh4TnkmQY+py/PYQGp4e7xgnHAeg87VeWb3A= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -143,13 +134,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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= github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/digitalocean/godo v1.57.0 h1:uCpe0sRIZ/sJWxWDsJyBPBjUfSvxop+WHkHiSf+tjjM= github.com/digitalocean/godo v1.57.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= @@ -186,6 +176,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.52.0 h1:3UeUAveYUTCYV/G0jNDiIrrtIeAl1oAjshYyU2PaAlQ= github.com/go-ini/ini v1.52.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -195,7 +187,11 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= @@ -278,7 +274,6 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v0.0.0-20170306145142-6a5e28554805/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -314,8 +309,6 @@ github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrj github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4= -github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= @@ -339,6 +332,52 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= +github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= +github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= +github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= +github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= +github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= +github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= +github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= +github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgconn v1.10.0 h1:4EYhlDVEMsJ30nNj0mmgwIUXoq7e9sMJrVC2ED6QlCU= +github.com/jackc/pgconn v1.10.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= +github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= +github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= +github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= +github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= +github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.1.1 h1:7PQ/4gLoqnl87ZxL7xjO0DR5gYuviDCZxQJsUlFW1eI= +github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= +github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= +github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= +github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= +github.com/jackc/pgtype v1.8.1 h1:9k0IXtdJXHJbyAWQgbWr1lU+MEhPXZz6RIXxfR5oxXs= +github.com/jackc/pgtype v1.8.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= +github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= +github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= +github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= +github.com/jackc/pgx/v4 v4.13.0 h1:JCjhT5vmhMAf/YwBHLvrBn4OGdIQBiFG6ym8Zmdx570= +github.com/jackc/pgx/v4 v4.13.0/go.mod h1:9P4X524sErlaxj0XSGZk7s+LD0eOyu1ZDUrrpznYDF0= +github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -354,6 +393,8 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -361,18 +402,25 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d h1:oNAwILwmgWKFpuU+dXvI6dl9jG2mAWAZLX3r9s0PPiw= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -403,11 +451,11 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -450,12 +498,20 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= +github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/schollz/progressbar/v3 v3.7.3 h1:U0etV6FzAPBne0ZqoWwThp7FEdfcTX2lHzQYh5B7scE= github.com/schollz/progressbar/v3 v3.7.3/go.mod h1:fBsumCeOE+GOuGKY1JldFX0eRT6gkw3sw9eZTt2bFgE= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +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/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -476,6 +532,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= 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/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -498,8 +556,6 @@ github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+l github.com/vmware/govmomi v0.22.2 h1:hmLv4f+RMTTseqtJRijjOWzwELiaLMIoHv2D6H3bF4I= github.com/vmware/govmomi v0.22.2/go.mod h1:Y+Wq4lst78L85Ge/F8+ORXIWiKYqaro1vhAulACy9Lc= github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9oS4Wk2s2u4tS29nEaDLdzvuHdB19CvSGJjPgkZJNk= -github.com/vultr/govultr/v2 v2.10.0 h1:UG72W5sooE9zEy7p38TSnF1CJb5yzvs7bxWB/NFfAag= -github.com/vultr/govultr/v2 v2.10.0/go.mod h1:JjUljQdSZx+MELCAJvZ/JH32bJotmflnsyS0NOjb8Jg= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -507,6 +563,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= @@ -519,22 +576,36 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/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-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -590,6 +661,7 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -649,16 +721,21 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +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-20181026203630-95b1ffbd15a5/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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -736,6 +813,7 @@ golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -743,8 +821,11 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -754,6 +835,7 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -784,6 +866,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -906,11 +990,12 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= diff --git a/provider/upcloud/mocks/upcloud.go b/provider/upcloud/mocks/upcloud.go index 1c608121..18b96a83 100644 --- a/provider/upcloud/mocks/upcloud.go +++ b/provider/upcloud/mocks/upcloud.go @@ -5,10 +5,11 @@ package mocks import ( + context "context" reflect "reflect" - upcloud "github.com/UpCloudLtd/upcloud-go-api/upcloud" - request "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" + upcloud "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + request "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" gomock "github.com/golang/mock/gomock" ) @@ -36,521 +37,610 @@ func (m *MockService) EXPECT() *MockServiceMockRecorder { } // AttachStorage mocks base method. -func (m *MockService) AttachStorage(r *request.AttachStorageRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) AttachStorage(ctx context.Context, r *request.AttachStorageRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AttachStorage", r) + ret := m.ctrl.Call(m, "AttachStorage", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // AttachStorage indicates an expected call of AttachStorage. -func (mr *MockServiceMockRecorder) AttachStorage(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) AttachStorage(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachStorage", reflect.TypeOf((*MockService)(nil).AttachStorage), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachStorage", reflect.TypeOf((*MockService)(nil).AttachStorage), ctx, r) } // CloneStorage mocks base method. -func (m *MockService) CloneStorage(r *request.CloneStorageRequest) (*upcloud.StorageDetails, error) { +func (m *MockService) CloneStorage(ctx context.Context, r *request.CloneStorageRequest) (*upcloud.StorageDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CloneStorage", r) + ret := m.ctrl.Call(m, "CloneStorage", ctx, r) ret0, _ := ret[0].(*upcloud.StorageDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // CloneStorage indicates an expected call of CloneStorage. -func (mr *MockServiceMockRecorder) CloneStorage(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) CloneStorage(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloneStorage", reflect.TypeOf((*MockService)(nil).CloneStorage), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloneStorage", reflect.TypeOf((*MockService)(nil).CloneStorage), ctx, r) } // CreateBackup mocks base method. -func (m *MockService) CreateBackup(r *request.CreateBackupRequest) (*upcloud.StorageDetails, error) { +func (m *MockService) CreateBackup(ctx context.Context, r *request.CreateBackupRequest) (*upcloud.StorageDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateBackup", r) + ret := m.ctrl.Call(m, "CreateBackup", ctx, r) ret0, _ := ret[0].(*upcloud.StorageDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateBackup indicates an expected call of CreateBackup. -func (mr *MockServiceMockRecorder) CreateBackup(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) CreateBackup(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBackup", reflect.TypeOf((*MockService)(nil).CreateBackup), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateBackup", reflect.TypeOf((*MockService)(nil).CreateBackup), ctx, r) } // CreateServer mocks base method. -func (m *MockService) CreateServer(r *request.CreateServerRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) CreateServer(ctx context.Context, r *request.CreateServerRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateServer", r) + ret := m.ctrl.Call(m, "CreateServer", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateServer indicates an expected call of CreateServer. -func (mr *MockServiceMockRecorder) CreateServer(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) CreateServer(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateServer", reflect.TypeOf((*MockService)(nil).CreateServer), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateServer", reflect.TypeOf((*MockService)(nil).CreateServer), ctx, r) } // CreateStorage mocks base method. -func (m *MockService) CreateStorage(r *request.CreateStorageRequest) (*upcloud.StorageDetails, error) { +func (m *MockService) CreateStorage(ctx context.Context, r *request.CreateStorageRequest) (*upcloud.StorageDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateStorage", r) + ret := m.ctrl.Call(m, "CreateStorage", ctx, r) ret0, _ := ret[0].(*upcloud.StorageDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateStorage indicates an expected call of CreateStorage. -func (mr *MockServiceMockRecorder) CreateStorage(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) CreateStorage(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStorage", reflect.TypeOf((*MockService)(nil).CreateStorage), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStorage", reflect.TypeOf((*MockService)(nil).CreateStorage), ctx, r) } // CreateStorageImport mocks base method. -func (m *MockService) CreateStorageImport(r *request.CreateStorageImportRequest) (*upcloud.StorageImportDetails, error) { +func (m *MockService) CreateStorageImport(ctx context.Context, r *request.CreateStorageImportRequest) (*upcloud.StorageImportDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateStorageImport", r) + ret := m.ctrl.Call(m, "CreateStorageImport", ctx, r) ret0, _ := ret[0].(*upcloud.StorageImportDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateStorageImport indicates an expected call of CreateStorageImport. -func (mr *MockServiceMockRecorder) CreateStorageImport(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) CreateStorageImport(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStorageImport", reflect.TypeOf((*MockService)(nil).CreateStorageImport), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStorageImport", reflect.TypeOf((*MockService)(nil).CreateStorageImport), ctx, r) +} + +// CreateSubaccount mocks base method. +func (m *MockService) CreateSubaccount(ctx context.Context, r *request.CreateSubaccountRequest) (*upcloud.AccountDetails, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateSubaccount", ctx, r) + ret0, _ := ret[0].(*upcloud.AccountDetails) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateSubaccount indicates an expected call of CreateSubaccount. +func (mr *MockServiceMockRecorder) CreateSubaccount(ctx, r interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubaccount", reflect.TypeOf((*MockService)(nil).CreateSubaccount), ctx, r) } // CreateTag mocks base method. -func (m *MockService) CreateTag(r *request.CreateTagRequest) (*upcloud.Tag, error) { +func (m *MockService) CreateTag(ctx context.Context, r *request.CreateTagRequest) (*upcloud.Tag, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateTag", r) + ret := m.ctrl.Call(m, "CreateTag", ctx, r) ret0, _ := ret[0].(*upcloud.Tag) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateTag indicates an expected call of CreateTag. -func (mr *MockServiceMockRecorder) CreateTag(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) CreateTag(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTag", reflect.TypeOf((*MockService)(nil).CreateTag), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTag", reflect.TypeOf((*MockService)(nil).CreateTag), ctx, r) } // DeleteServer mocks base method. -func (m *MockService) DeleteServer(r *request.DeleteServerRequest) error { +func (m *MockService) DeleteServer(ctx context.Context, r *request.DeleteServerRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteServer", r) + ret := m.ctrl.Call(m, "DeleteServer", ctx, r) ret0, _ := ret[0].(error) return ret0 } // DeleteServer indicates an expected call of DeleteServer. -func (mr *MockServiceMockRecorder) DeleteServer(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) DeleteServer(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteServer", reflect.TypeOf((*MockService)(nil).DeleteServer), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteServer", reflect.TypeOf((*MockService)(nil).DeleteServer), ctx, r) } // DeleteServerAndStorages mocks base method. -func (m *MockService) DeleteServerAndStorages(r *request.DeleteServerAndStoragesRequest) error { +func (m *MockService) DeleteServerAndStorages(ctx context.Context, r *request.DeleteServerAndStoragesRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteServerAndStorages", r) + ret := m.ctrl.Call(m, "DeleteServerAndStorages", ctx, r) ret0, _ := ret[0].(error) return ret0 } // DeleteServerAndStorages indicates an expected call of DeleteServerAndStorages. -func (mr *MockServiceMockRecorder) DeleteServerAndStorages(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) DeleteServerAndStorages(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteServerAndStorages", reflect.TypeOf((*MockService)(nil).DeleteServerAndStorages), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteServerAndStorages", reflect.TypeOf((*MockService)(nil).DeleteServerAndStorages), ctx, r) } // DeleteStorage mocks base method. -func (m *MockService) DeleteStorage(arg0 *request.DeleteStorageRequest) error { +func (m *MockService) DeleteStorage(ctx context.Context, r *request.DeleteStorageRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteStorage", arg0) + ret := m.ctrl.Call(m, "DeleteStorage", ctx, r) ret0, _ := ret[0].(error) return ret0 } // DeleteStorage indicates an expected call of DeleteStorage. -func (mr *MockServiceMockRecorder) DeleteStorage(arg0 interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) DeleteStorage(ctx, r interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStorage", reflect.TypeOf((*MockService)(nil).DeleteStorage), ctx, r) +} + +// DeleteSubaccount mocks base method. +func (m *MockService) DeleteSubaccount(ctx context.Context, r *request.DeleteSubaccountRequest) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteSubaccount", ctx, r) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteSubaccount indicates an expected call of DeleteSubaccount. +func (mr *MockServiceMockRecorder) DeleteSubaccount(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStorage", reflect.TypeOf((*MockService)(nil).DeleteStorage), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubaccount", reflect.TypeOf((*MockService)(nil).DeleteSubaccount), ctx, r) } // DeleteTag mocks base method. -func (m *MockService) DeleteTag(r *request.DeleteTagRequest) error { +func (m *MockService) DeleteTag(ctx context.Context, r *request.DeleteTagRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteTag", r) + ret := m.ctrl.Call(m, "DeleteTag", ctx, r) ret0, _ := ret[0].(error) return ret0 } // DeleteTag indicates an expected call of DeleteTag. -func (mr *MockServiceMockRecorder) DeleteTag(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) DeleteTag(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTag", reflect.TypeOf((*MockService)(nil).DeleteTag), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTag", reflect.TypeOf((*MockService)(nil).DeleteTag), ctx, r) } // DetachStorage mocks base method. -func (m *MockService) DetachStorage(r *request.DetachStorageRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) DetachStorage(ctx context.Context, r *request.DetachStorageRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DetachStorage", r) + ret := m.ctrl.Call(m, "DetachStorage", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // DetachStorage indicates an expected call of DetachStorage. -func (mr *MockServiceMockRecorder) DetachStorage(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) DetachStorage(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachStorage", reflect.TypeOf((*MockService)(nil).DetachStorage), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachStorage", reflect.TypeOf((*MockService)(nil).DetachStorage), ctx, r) } // EjectCDROM mocks base method. -func (m *MockService) EjectCDROM(r *request.EjectCDROMRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) EjectCDROM(ctx context.Context, r *request.EjectCDROMRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EjectCDROM", r) + ret := m.ctrl.Call(m, "EjectCDROM", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // EjectCDROM indicates an expected call of EjectCDROM. -func (mr *MockServiceMockRecorder) EjectCDROM(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) EjectCDROM(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EjectCDROM", reflect.TypeOf((*MockService)(nil).EjectCDROM), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EjectCDROM", reflect.TypeOf((*MockService)(nil).EjectCDROM), ctx, r) } // GetAccount mocks base method. -func (m *MockService) GetAccount() (*upcloud.Account, error) { +func (m *MockService) GetAccount(ctx context.Context) (*upcloud.Account, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccount") + ret := m.ctrl.Call(m, "GetAccount", ctx) ret0, _ := ret[0].(*upcloud.Account) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAccount indicates an expected call of GetAccount. -func (mr *MockServiceMockRecorder) GetAccount() *gomock.Call { +func (mr *MockServiceMockRecorder) GetAccount(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockService)(nil).GetAccount), ctx) +} + +// GetAccountDetails mocks base method. +func (m *MockService) GetAccountDetails(ctx context.Context, r *request.GetAccountDetailsRequest) (*upcloud.AccountDetails, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccountDetails", ctx, r) + ret0, _ := ret[0].(*upcloud.AccountDetails) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAccountDetails indicates an expected call of GetAccountDetails. +func (mr *MockServiceMockRecorder) GetAccountDetails(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockService)(nil).GetAccount)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountDetails", reflect.TypeOf((*MockService)(nil).GetAccountDetails), ctx, r) +} + +// GetAccountList mocks base method. +func (m *MockService) GetAccountList(ctx context.Context) (upcloud.AccountList, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccountList", ctx) + ret0, _ := ret[0].(upcloud.AccountList) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAccountList indicates an expected call of GetAccountList. +func (mr *MockServiceMockRecorder) GetAccountList(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountList", reflect.TypeOf((*MockService)(nil).GetAccountList), ctx) } // GetServerConfigurations mocks base method. -func (m *MockService) GetServerConfigurations() (*upcloud.ServerConfigurations, error) { +func (m *MockService) GetServerConfigurations(ctx context.Context) (*upcloud.ServerConfigurations, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetServerConfigurations") + ret := m.ctrl.Call(m, "GetServerConfigurations", ctx) ret0, _ := ret[0].(*upcloud.ServerConfigurations) ret1, _ := ret[1].(error) return ret0, ret1 } // GetServerConfigurations indicates an expected call of GetServerConfigurations. -func (mr *MockServiceMockRecorder) GetServerConfigurations() *gomock.Call { +func (mr *MockServiceMockRecorder) GetServerConfigurations(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerConfigurations", reflect.TypeOf((*MockService)(nil).GetServerConfigurations)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerConfigurations", reflect.TypeOf((*MockService)(nil).GetServerConfigurations), ctx) } // GetServerDetails mocks base method. -func (m *MockService) GetServerDetails(r *request.GetServerDetailsRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) GetServerDetails(ctx context.Context, r *request.GetServerDetailsRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetServerDetails", r) + ret := m.ctrl.Call(m, "GetServerDetails", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // GetServerDetails indicates an expected call of GetServerDetails. -func (mr *MockServiceMockRecorder) GetServerDetails(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) GetServerDetails(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerDetails", reflect.TypeOf((*MockService)(nil).GetServerDetails), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerDetails", reflect.TypeOf((*MockService)(nil).GetServerDetails), ctx, r) } // GetServers mocks base method. -func (m *MockService) GetServers() (*upcloud.Servers, error) { +func (m *MockService) GetServers(ctx context.Context) (*upcloud.Servers, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetServers") + ret := m.ctrl.Call(m, "GetServers", ctx) ret0, _ := ret[0].(*upcloud.Servers) ret1, _ := ret[1].(error) return ret0, ret1 } // GetServers indicates an expected call of GetServers. -func (mr *MockServiceMockRecorder) GetServers() *gomock.Call { +func (mr *MockServiceMockRecorder) GetServers(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServers", reflect.TypeOf((*MockService)(nil).GetServers)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServers", reflect.TypeOf((*MockService)(nil).GetServers), ctx) } // GetStorageDetails mocks base method. -func (m *MockService) GetStorageDetails(r *request.GetStorageDetailsRequest) (*upcloud.StorageDetails, error) { +func (m *MockService) GetStorageDetails(ctx context.Context, r *request.GetStorageDetailsRequest) (*upcloud.StorageDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetStorageDetails", r) + ret := m.ctrl.Call(m, "GetStorageDetails", ctx, r) ret0, _ := ret[0].(*upcloud.StorageDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // GetStorageDetails indicates an expected call of GetStorageDetails. -func (mr *MockServiceMockRecorder) GetStorageDetails(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) GetStorageDetails(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageDetails", reflect.TypeOf((*MockService)(nil).GetStorageDetails), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageDetails", reflect.TypeOf((*MockService)(nil).GetStorageDetails), ctx, r) } // GetStorageImportDetails mocks base method. -func (m *MockService) GetStorageImportDetails(r *request.GetStorageImportDetailsRequest) (*upcloud.StorageImportDetails, error) { +func (m *MockService) GetStorageImportDetails(ctx context.Context, r *request.GetStorageImportDetailsRequest) (*upcloud.StorageImportDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetStorageImportDetails", r) + ret := m.ctrl.Call(m, "GetStorageImportDetails", ctx, r) ret0, _ := ret[0].(*upcloud.StorageImportDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // GetStorageImportDetails indicates an expected call of GetStorageImportDetails. -func (mr *MockServiceMockRecorder) GetStorageImportDetails(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) GetStorageImportDetails(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageImportDetails", reflect.TypeOf((*MockService)(nil).GetStorageImportDetails), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageImportDetails", reflect.TypeOf((*MockService)(nil).GetStorageImportDetails), ctx, r) } // GetStorages mocks base method. -func (m *MockService) GetStorages(r *request.GetStoragesRequest) (*upcloud.Storages, error) { +func (m *MockService) GetStorages(ctx context.Context, r *request.GetStoragesRequest) (*upcloud.Storages, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetStorages", r) + ret := m.ctrl.Call(m, "GetStorages", ctx, r) ret0, _ := ret[0].(*upcloud.Storages) ret1, _ := ret[1].(error) return ret0, ret1 } // GetStorages indicates an expected call of GetStorages. -func (mr *MockServiceMockRecorder) GetStorages(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) GetStorages(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorages", reflect.TypeOf((*MockService)(nil).GetStorages), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorages", reflect.TypeOf((*MockService)(nil).GetStorages), ctx, r) } // GetTags mocks base method. -func (m *MockService) GetTags() (*upcloud.Tags, error) { +func (m *MockService) GetTags(ctx context.Context) (*upcloud.Tags, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTags") + ret := m.ctrl.Call(m, "GetTags", ctx) ret0, _ := ret[0].(*upcloud.Tags) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTags indicates an expected call of GetTags. -func (mr *MockServiceMockRecorder) GetTags() *gomock.Call { +func (mr *MockServiceMockRecorder) GetTags(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTags", reflect.TypeOf((*MockService)(nil).GetTags)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTags", reflect.TypeOf((*MockService)(nil).GetTags), ctx) } // LoadCDROM mocks base method. -func (m *MockService) LoadCDROM(r *request.LoadCDROMRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) LoadCDROM(ctx context.Context, r *request.LoadCDROMRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LoadCDROM", r) + ret := m.ctrl.Call(m, "LoadCDROM", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // LoadCDROM indicates an expected call of LoadCDROM. -func (mr *MockServiceMockRecorder) LoadCDROM(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) LoadCDROM(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadCDROM", reflect.TypeOf((*MockService)(nil).LoadCDROM), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadCDROM", reflect.TypeOf((*MockService)(nil).LoadCDROM), ctx, r) } // ModifyServer mocks base method. -func (m *MockService) ModifyServer(r *request.ModifyServerRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) ModifyServer(ctx context.Context, r *request.ModifyServerRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ModifyServer", r) + ret := m.ctrl.Call(m, "ModifyServer", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // ModifyServer indicates an expected call of ModifyServer. -func (mr *MockServiceMockRecorder) ModifyServer(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) ModifyServer(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyServer", reflect.TypeOf((*MockService)(nil).ModifyServer), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyServer", reflect.TypeOf((*MockService)(nil).ModifyServer), ctx, r) } // ModifyStorage mocks base method. -func (m *MockService) ModifyStorage(r *request.ModifyStorageRequest) (*upcloud.StorageDetails, error) { +func (m *MockService) ModifyStorage(ctx context.Context, r *request.ModifyStorageRequest) (*upcloud.StorageDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ModifyStorage", r) + ret := m.ctrl.Call(m, "ModifyStorage", ctx, r) ret0, _ := ret[0].(*upcloud.StorageDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // ModifyStorage indicates an expected call of ModifyStorage. -func (mr *MockServiceMockRecorder) ModifyStorage(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) ModifyStorage(ctx, r interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyStorage", reflect.TypeOf((*MockService)(nil).ModifyStorage), ctx, r) +} + +// ModifySubaccount mocks base method. +func (m *MockService) ModifySubaccount(ctx context.Context, r *request.ModifySubaccountRequest) (*upcloud.AccountDetails, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ModifySubaccount", ctx, r) + ret0, _ := ret[0].(*upcloud.AccountDetails) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ModifySubaccount indicates an expected call of ModifySubaccount. +func (mr *MockServiceMockRecorder) ModifySubaccount(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyStorage", reflect.TypeOf((*MockService)(nil).ModifyStorage), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifySubaccount", reflect.TypeOf((*MockService)(nil).ModifySubaccount), ctx, r) } // ModifyTag mocks base method. -func (m *MockService) ModifyTag(r *request.ModifyTagRequest) (*upcloud.Tag, error) { +func (m *MockService) ModifyTag(ctx context.Context, r *request.ModifyTagRequest) (*upcloud.Tag, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ModifyTag", r) + ret := m.ctrl.Call(m, "ModifyTag", ctx, r) ret0, _ := ret[0].(*upcloud.Tag) ret1, _ := ret[1].(error) return ret0, ret1 } // ModifyTag indicates an expected call of ModifyTag. -func (mr *MockServiceMockRecorder) ModifyTag(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) ModifyTag(ctx, r interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyTag", reflect.TypeOf((*MockService)(nil).ModifyTag), ctx, r) +} + +// ResizeStorageFilesystem mocks base method. +func (m *MockService) ResizeStorageFilesystem(ctx context.Context, r *request.ResizeStorageFilesystemRequest) (*upcloud.ResizeStorageFilesystemBackup, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ResizeStorageFilesystem", ctx, r) + ret0, _ := ret[0].(*upcloud.ResizeStorageFilesystemBackup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ResizeStorageFilesystem indicates an expected call of ResizeStorageFilesystem. +func (mr *MockServiceMockRecorder) ResizeStorageFilesystem(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyTag", reflect.TypeOf((*MockService)(nil).ModifyTag), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResizeStorageFilesystem", reflect.TypeOf((*MockService)(nil).ResizeStorageFilesystem), ctx, r) } // RestartServer mocks base method. -func (m *MockService) RestartServer(r *request.RestartServerRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) RestartServer(ctx context.Context, r *request.RestartServerRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RestartServer", r) + ret := m.ctrl.Call(m, "RestartServer", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // RestartServer indicates an expected call of RestartServer. -func (mr *MockServiceMockRecorder) RestartServer(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) RestartServer(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestartServer", reflect.TypeOf((*MockService)(nil).RestartServer), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestartServer", reflect.TypeOf((*MockService)(nil).RestartServer), ctx, r) } // RestoreBackup mocks base method. -func (m *MockService) RestoreBackup(r *request.RestoreBackupRequest) error { +func (m *MockService) RestoreBackup(ctx context.Context, r *request.RestoreBackupRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RestoreBackup", r) + ret := m.ctrl.Call(m, "RestoreBackup", ctx, r) ret0, _ := ret[0].(error) return ret0 } // RestoreBackup indicates an expected call of RestoreBackup. -func (mr *MockServiceMockRecorder) RestoreBackup(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) RestoreBackup(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreBackup", reflect.TypeOf((*MockService)(nil).RestoreBackup), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoreBackup", reflect.TypeOf((*MockService)(nil).RestoreBackup), ctx, r) } // StartServer mocks base method. -func (m *MockService) StartServer(r *request.StartServerRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) StartServer(ctx context.Context, r *request.StartServerRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StartServer", r) + ret := m.ctrl.Call(m, "StartServer", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // StartServer indicates an expected call of StartServer. -func (mr *MockServiceMockRecorder) StartServer(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) StartServer(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartServer", reflect.TypeOf((*MockService)(nil).StartServer), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartServer", reflect.TypeOf((*MockService)(nil).StartServer), ctx, r) } // StopServer mocks base method. -func (m *MockService) StopServer(r *request.StopServerRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) StopServer(ctx context.Context, r *request.StopServerRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StopServer", r) + ret := m.ctrl.Call(m, "StopServer", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // StopServer indicates an expected call of StopServer. -func (mr *MockServiceMockRecorder) StopServer(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) StopServer(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopServer", reflect.TypeOf((*MockService)(nil).StopServer), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopServer", reflect.TypeOf((*MockService)(nil).StopServer), ctx, r) } // TagServer mocks base method. -func (m *MockService) TagServer(r *request.TagServerRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) TagServer(ctx context.Context, r *request.TagServerRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TagServer", r) + ret := m.ctrl.Call(m, "TagServer", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // TagServer indicates an expected call of TagServer. -func (mr *MockServiceMockRecorder) TagServer(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) TagServer(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TagServer", reflect.TypeOf((*MockService)(nil).TagServer), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TagServer", reflect.TypeOf((*MockService)(nil).TagServer), ctx, r) } // TemplatizeStorage mocks base method. -func (m *MockService) TemplatizeStorage(r *request.TemplatizeStorageRequest) (*upcloud.StorageDetails, error) { +func (m *MockService) TemplatizeStorage(ctx context.Context, r *request.TemplatizeStorageRequest) (*upcloud.StorageDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TemplatizeStorage", r) + ret := m.ctrl.Call(m, "TemplatizeStorage", ctx, r) ret0, _ := ret[0].(*upcloud.StorageDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // TemplatizeStorage indicates an expected call of TemplatizeStorage. -func (mr *MockServiceMockRecorder) TemplatizeStorage(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) TemplatizeStorage(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TemplatizeStorage", reflect.TypeOf((*MockService)(nil).TemplatizeStorage), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TemplatizeStorage", reflect.TypeOf((*MockService)(nil).TemplatizeStorage), ctx, r) } // UntagServer mocks base method. -func (m *MockService) UntagServer(r *request.UntagServerRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) UntagServer(ctx context.Context, r *request.UntagServerRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UntagServer", r) + ret := m.ctrl.Call(m, "UntagServer", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // UntagServer indicates an expected call of UntagServer. -func (mr *MockServiceMockRecorder) UntagServer(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) UntagServer(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UntagServer", reflect.TypeOf((*MockService)(nil).UntagServer), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UntagServer", reflect.TypeOf((*MockService)(nil).UntagServer), ctx, r) } // WaitForServerState mocks base method. -func (m *MockService) WaitForServerState(r *request.WaitForServerStateRequest) (*upcloud.ServerDetails, error) { +func (m *MockService) WaitForServerState(ctx context.Context, r *request.WaitForServerStateRequest) (*upcloud.ServerDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WaitForServerState", r) + ret := m.ctrl.Call(m, "WaitForServerState", ctx, r) ret0, _ := ret[0].(*upcloud.ServerDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // WaitForServerState indicates an expected call of WaitForServerState. -func (mr *MockServiceMockRecorder) WaitForServerState(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) WaitForServerState(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForServerState", reflect.TypeOf((*MockService)(nil).WaitForServerState), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForServerState", reflect.TypeOf((*MockService)(nil).WaitForServerState), ctx, r) } // WaitForStorageImportCompletion mocks base method. -func (m *MockService) WaitForStorageImportCompletion(r *request.WaitForStorageImportCompletionRequest) (*upcloud.StorageImportDetails, error) { +func (m *MockService) WaitForStorageImportCompletion(ctx context.Context, r *request.WaitForStorageImportCompletionRequest) (*upcloud.StorageImportDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WaitForStorageImportCompletion", r) + ret := m.ctrl.Call(m, "WaitForStorageImportCompletion", ctx, r) ret0, _ := ret[0].(*upcloud.StorageImportDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // WaitForStorageImportCompletion indicates an expected call of WaitForStorageImportCompletion. -func (mr *MockServiceMockRecorder) WaitForStorageImportCompletion(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) WaitForStorageImportCompletion(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForStorageImportCompletion", reflect.TypeOf((*MockService)(nil).WaitForStorageImportCompletion), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForStorageImportCompletion", reflect.TypeOf((*MockService)(nil).WaitForStorageImportCompletion), ctx, r) } // WaitForStorageState mocks base method. -func (m *MockService) WaitForStorageState(r *request.WaitForStorageStateRequest) (*upcloud.StorageDetails, error) { +func (m *MockService) WaitForStorageState(ctx context.Context, r *request.WaitForStorageStateRequest) (*upcloud.StorageDetails, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WaitForStorageState", r) + ret := m.ctrl.Call(m, "WaitForStorageState", ctx, r) ret0, _ := ret[0].(*upcloud.StorageDetails) ret1, _ := ret[1].(error) return ret0, ret1 } // WaitForStorageState indicates an expected call of WaitForStorageState. -func (mr *MockServiceMockRecorder) WaitForStorageState(r interface{}) *gomock.Call { +func (mr *MockServiceMockRecorder) WaitForStorageState(ctx, r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForStorageState", reflect.TypeOf((*MockService)(nil).WaitForStorageState), r) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForStorageState", reflect.TypeOf((*MockService)(nil).WaitForStorageState), ctx, r) } diff --git a/provider/upcloud/upcloud.go b/provider/upcloud/upcloud.go index 7853ff5f..547a265b 100644 --- a/provider/upcloud/upcloud.go +++ b/provider/upcloud/upcloud.go @@ -5,14 +5,15 @@ package upcloud import ( + "context" "errors" "os" "time" - "github.com/UpCloudLtd/upcloud-go-api/upcloud" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/client" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/service" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/client" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/service" "github.com/nanovms/ops/types" ) @@ -64,18 +65,15 @@ func (p *Provider) Initialize(c *types.ProviderConfig) error { } if p.upcloud == nil { - c := client.New(user, password) - - c.SetTimeout(time.Second * 30) - + c := client.New(user, password, client.WithTimeout(time.Second*600)) p.upcloud = service.New(c) } - _, err := p.upcloud.GetAccount() + _, err := p.upcloud.GetAccount(context.Background()) if err != nil { - if serviceError, ok := err.(*upcloud.Error); ok { - return errors.New(serviceError.ErrorMessage) + if serviceError, ok := err.(*upcloud.Problem); ok { + return errors.New(serviceError.Title) } return errors.New("Invalid credentials") } @@ -84,7 +82,7 @@ func (p *Provider) Initialize(c *types.ProviderConfig) error { } func (p *Provider) findOrCreateTag(tag upcloud.Tag) (upcloudTag *upcloud.Tag, err error) { - tagsResponse, err := p.upcloud.GetTags() + tagsResponse, err := p.upcloud.GetTags(context.Background()) if err != nil { return } @@ -98,7 +96,7 @@ func (p *Provider) findOrCreateTag(tag upcloud.Tag) (upcloudTag *upcloud.Tag, er createTagReq := &request.CreateTagRequest{Tag: tag} - upcloudTag, err = p.upcloud.CreateTag(createTagReq) + upcloudTag, err = p.upcloud.CreateTag(context.Background(), createTagReq) if err != nil { return } diff --git a/provider/upcloud/upcloud_image.go b/provider/upcloud/upcloud_image.go index 8523d09d..793cb210 100644 --- a/provider/upcloud/upcloud_image.go +++ b/provider/upcloud/upcloud_image.go @@ -3,14 +3,16 @@ package upcloud import ( + "context" "errors" "math" "os" - "github.com/UpCloudLtd/upcloud-go-api/upcloud" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" "github.com/nanovms/ops/lepton" "github.com/nanovms/ops/types" + + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" "github.com/olekukonko/tablewriter" ) @@ -50,7 +52,7 @@ func (p *Provider) CreateImage(ctx *lepton.Context, imagePath string) error { Title: ctx.Config().CloudConfig.ImageName, } - templateDetails, err := p.upcloud.TemplatizeStorage(templatizeReq) + templateDetails, err := p.upcloud.TemplatizeStorage(context.Background(), templatizeReq) if err != nil { return err } @@ -108,7 +110,7 @@ func (p *Provider) GetImages(ctx *lepton.Context) (images []lepton.CloudImage, e Access: "private", } - templates, err := p.upcloud.GetStorages(listTemplatesReq) + templates, err := p.upcloud.GetStorages(context.Background(), listTemplatesReq) if err != nil { return } diff --git a/provider/upcloud/upcloud_image_test.go b/provider/upcloud/upcloud_image_test.go index b7c51879..977ae00d 100644 --- a/provider/upcloud/upcloud_image_test.go +++ b/provider/upcloud/upcloud_image_test.go @@ -3,13 +3,15 @@ package upcloud_test import ( + "context" "os" "testing" "time" - "github.com/UpCloudLtd/upcloud-go-api/upcloud" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" "github.com/nanovms/ops/lepton" + + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" "github.com/stretchr/testify/assert" ) @@ -22,24 +24,24 @@ func TestCreateImage(t *testing.T) { storageUUID := "1" s.EXPECT(). - CreateStorage(&request.CreateStorageRequest{Size: 10}). + CreateStorage(context.Background(), &request.CreateStorageRequest{Size: 1}). Return(&upcloud.StorageDetails{Storage: upcloud.Storage{UUID: storageUUID}}, nil) s.EXPECT(). - CreateStorageImport(&request.CreateStorageImportRequest{StorageUUID: storageUUID, Source: "direct_upload", SourceLocation: file.Name()}). + CreateStorageImport(context.Background(), &request.CreateStorageImportRequest{StorageUUID: storageUUID, Source: "direct_upload", SourceLocation: file.Name()}). Return(&upcloud.StorageImportDetails{}, nil) s.EXPECT(). - WaitForStorageState(&request.WaitForStorageStateRequest{UUID: storageUUID, DesiredState: "online", Timeout: 10 * time.Minute}). + WaitForStorageState(context.Background(), &request.WaitForStorageStateRequest{UUID: storageUUID, DesiredState: "online", Timeout: 10 * time.Minute}). Return(nil, nil). Times(2) s.EXPECT(). - TemplatizeStorage(&request.TemplatizeStorageRequest{UUID: storageUUID}). + TemplatizeStorage(context.Background(), &request.TemplatizeStorageRequest{UUID: storageUUID}). Return(nil, nil) s.EXPECT(). - DeleteStorage(&request.DeleteStorageRequest{UUID: storageUUID}). + DeleteStorage(context.Background(), &request.DeleteStorageRequest{UUID: storageUUID}). Return(nil) ctx := lepton.NewContext(lepton.NewConfig()) @@ -52,7 +54,7 @@ func TestListImages(t *testing.T) { p, s := NewProvider(t) s.EXPECT(). - GetStorages(&request.GetStoragesRequest{Access: "private", Type: "template"}). + GetStorages(context.Background(), &request.GetStoragesRequest{Access: "private", Type: "template"}). Return(&upcloud.Storages{}, nil) ctx := lepton.NewContext(lepton.NewConfig()) @@ -65,7 +67,7 @@ func TestGetImages(t *testing.T) { p, s := NewProvider(t) s.EXPECT(). - GetStorages(&request.GetStoragesRequest{Access: "private", Type: "template"}). + GetStorages(context.Background(), &request.GetStoragesRequest{Access: "private", Type: "template"}). Return(&upcloud.Storages{}, nil) ctx := lepton.NewContext(lepton.NewConfig()) @@ -87,11 +89,11 @@ func TestDeleteImage(t *testing.T) { storages.Storages = []upcloud.Storage{{UUID: storageUUID, Title: storageTitle}} s.EXPECT(). - GetStorages(&request.GetStoragesRequest{Access: "private", Type: "template"}). + GetStorages(context.Background(), &request.GetStoragesRequest{Access: "private", Type: "template"}). Return(&storages, nil) s.EXPECT(). - DeleteStorage(&request.DeleteStorageRequest{UUID: storageUUID}). + DeleteStorage(context.Background(), &request.DeleteStorageRequest{UUID: storageUUID}). Return(nil) ctx := lepton.NewContext(lepton.NewConfig()) diff --git a/provider/upcloud/upcloud_instance.go b/provider/upcloud/upcloud_instance.go index 37ff2794..87548599 100644 --- a/provider/upcloud/upcloud_instance.go +++ b/provider/upcloud/upcloud_instance.go @@ -3,14 +3,16 @@ package upcloud import ( + "context" "errors" "os" "strings" "time" - "github.com/UpCloudLtd/upcloud-go-api/upcloud" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" "github.com/nanovms/ops/lepton" + + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" "github.com/olekukonko/tablewriter" ) @@ -48,7 +50,7 @@ func (p *Provider) CreateInstance(ctx *lepton.Context) error { ctx.Logger().Info("creating server") - serverDetails, err := p.upcloud.CreateServer(createInstanceReq) + serverDetails, err := p.upcloud.CreateServer(context.Background(), createInstanceReq) if err != nil { return err } @@ -78,7 +80,7 @@ func (p *Provider) CreateInstance(ctx *lepton.Context) error { Tags: []string{opsTag.Name, imageTag.Name}, } - _, err = p.upcloud.TagServer(assignOpsTagsRequest) + _, err = p.upcloud.TagServer(context.Background(), assignOpsTagsRequest) if err != nil { ctx.Logger().Warn("failed assigning ops tags: %s", err) return nil @@ -134,7 +136,7 @@ func (p *Provider) GetInstances(ctx *lepton.Context) (instances []lepton.CloudIn ctx.Logger().Warn("failed creating tags: %s", err) var servers *upcloud.Servers - servers, err = p.upcloud.GetServers() + servers, err = p.upcloud.GetServers(context.Background()) if err != nil { return } @@ -203,7 +205,7 @@ func (p *Provider) DeleteInstance(ctx *lepton.Context, instancename string) (err } ctx.Logger().Debug(`deleting server with uuid "%s"`, instance.ID) - err = p.upcloud.DeleteServer(deleteServerReq) + err = p.upcloud.DeleteServer(context.Background(), deleteServerReq) return } @@ -226,7 +228,7 @@ func (p *Provider) stopServer(uuid string) (err error) { UUID: uuid, } - _, err = p.upcloud.StopServer(stopServerReq) + _, err = p.upcloud.StopServer(context.Background(), stopServerReq) return } @@ -250,7 +252,7 @@ func (p *Provider) startServer(uuid string) (err error) { UUID: uuid, } - _, err = p.upcloud.StartServer(startServerReq) + _, err = p.upcloud.StartServer(context.Background(), startServerReq) return } @@ -269,7 +271,7 @@ func (p *Provider) GetInstanceByName(ctx *lepton.Context, name string) (instance } func (p *Provider) getServerByName(ctx *lepton.Context, name string) (server *upcloud.Server, err error) { - servers, err := p.upcloud.GetServers() + servers, err := p.upcloud.GetServers(context.Background()) if err != nil { return } @@ -293,7 +295,7 @@ func (p *Provider) GetInstanceByID(ctx *lepton.Context, id string) (instance *le serverDetailsReq := &request.GetServerDetailsRequest{UUID: id} - serverDetails, err = p.upcloud.GetServerDetails(serverDetailsReq) + serverDetails, err = p.upcloud.GetServerDetails(context.Background(), serverDetailsReq) if err != nil { return } @@ -349,7 +351,7 @@ func (p *Provider) waitForServerState(uuid, state string) (err error) { Timeout: 1 * time.Minute, } - _, err = p.upcloud.WaitForServerState(waitReq) + _, err = p.upcloud.WaitForServerState(context.Background(), waitReq) return } diff --git a/provider/upcloud/upcloud_instance_test.go b/provider/upcloud/upcloud_instance_test.go index 991cd8e4..28aec824 100644 --- a/provider/upcloud/upcloud_instance_test.go +++ b/provider/upcloud/upcloud_instance_test.go @@ -3,11 +3,12 @@ package upcloud_test import ( + "context" "testing" "time" - "github.com/UpCloudLtd/upcloud-go-api/upcloud" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" "github.com/nanovms/ops/lepton" "github.com/stretchr/testify/assert" ) @@ -24,11 +25,11 @@ func TestCreateInstance(t *testing.T) { storages.Storages = []upcloud.Storage{{UUID: storageUUID, Title: imageName}} s.EXPECT(). - GetStorages(&request.GetStoragesRequest{Access: "private", Type: "template"}). + GetStorages(context.Background(), &request.GetStoragesRequest{Access: "private", Type: "template"}). Return(&storages, nil) s.EXPECT(). - CreateServer(&request.CreateServerRequest{ + CreateServer(context.Background(), &request.CreateServerRequest{ Hostname: instanceName, Title: instanceName, StorageDevices: request.CreateServerStorageDeviceSlice{ @@ -42,7 +43,7 @@ func TestCreateInstance(t *testing.T) { Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID}}, nil) s.EXPECT(). - GetTags(). + GetTags(context.Background()). Return(&upcloud.Tags{}, nil). Times(2) @@ -53,7 +54,7 @@ func TestCreateInstance(t *testing.T) { createTagReq := &request.CreateTagRequest{Tag: imageTag} s.EXPECT(). - CreateTag(createTagReq). + CreateTag(context.Background(), createTagReq). Return(&imageTag, nil) opsTag := upcloud.Tag{ @@ -63,11 +64,11 @@ func TestCreateInstance(t *testing.T) { createTagReq = &request.CreateTagRequest{Tag: opsTag} s.EXPECT(). - CreateTag(createTagReq). + CreateTag(context.Background(), createTagReq). Return(&opsTag, nil) s.EXPECT(). - TagServer(&request.TagServerRequest{UUID: serverID, Tags: []string{"OPS", "image-test"}}). + TagServer(context.Background(), &request.TagServerRequest{UUID: serverID, Tags: []string{"OPS", "image-test"}}). Return(&upcloud.ServerDetails{}, nil) ctx := lepton.NewContext(lepton.NewConfig()) @@ -86,11 +87,11 @@ func TestListInstances(t *testing.T) { Description: "Created by ops", } s.EXPECT(). - GetTags(). + GetTags(context.Background()). Return(&upcloud.Tags{Tags: []upcloud.Tag{tag}}, nil) s.EXPECT(). - GetServers(). + GetServers(context.Background()). Return(&upcloud.Servers{}, nil) ctx := lepton.NewContext(lepton.NewConfig()) @@ -107,11 +108,11 @@ func TestGetInstances(t *testing.T) { Description: "Created by ops", } s.EXPECT(). - GetTags(). + GetTags(context.Background()). Return(&upcloud.Tags{Tags: []upcloud.Tag{tag}}, nil) s.EXPECT(). - GetServers(). + GetServers(context.Background()). Return(&upcloud.Servers{}, nil) ctx := lepton.NewContext(lepton.NewConfig()) @@ -129,23 +130,23 @@ func TestDeleteInstance(t *testing.T) { serverName := "test" s.EXPECT(). - GetServers(). + GetServers(context.Background()). Return(&upcloud.Servers{Servers: []upcloud.Server{{UUID: serverID, Title: serverName}}}, nil) s.EXPECT(). - GetServerDetails(&request.GetServerDetailsRequest{UUID: serverID}). + GetServerDetails(context.Background(), &request.GetServerDetailsRequest{UUID: serverID}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) s.EXPECT(). - StopServer(&request.StopServerRequest{UUID: serverID}). + StopServer(context.Background(), &request.StopServerRequest{UUID: serverID}). Return(nil, nil) s.EXPECT(). - WaitForServerState(&request.WaitForServerStateRequest{UUID: serverID, DesiredState: "stopped", Timeout: 1 * time.Minute}). + WaitForServerState(context.Background(), &request.WaitForServerStateRequest{UUID: serverID, DesiredState: "stopped", Timeout: 1 * time.Minute}). Return(nil, nil) s.EXPECT(). - DeleteServer(&request.DeleteServerRequest{UUID: serverID}). + DeleteServer(context.Background(), &request.DeleteServerRequest{UUID: serverID}). Return(nil) ctx := lepton.NewContext(lepton.NewConfig()) diff --git a/provider/upcloud/upcloud_store.go b/provider/upcloud/upcloud_store.go index eb16f396..2da965a4 100644 --- a/provider/upcloud/upcloud_store.go +++ b/provider/upcloud/upcloud_store.go @@ -3,13 +3,15 @@ package upcloud import ( + "context" "math" "os" "time" - "github.com/UpCloudLtd/upcloud-go-api/upcloud" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" "github.com/nanovms/ops/lepton" + + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" ) func (p *Provider) createStorage(ctx *lepton.Context, storageName, filePath string) (storageDetails *upcloud.StorageDetails, err error) { @@ -21,22 +23,21 @@ func (p *Provider) createStorage(ctx *lepton.Context, storageName, filePath stri size := fi.Size() sizeGB := float64(size) * math.Pow(10, -9) - if sizeGB < 10 { - sizeGB = 10 - } else if sizeGB > 2048 { - sizeGB = 2048 + rsz := int(math.Round(sizeGB*100) / 100) + if rsz < 1 { + rsz = 1 } ctx.Logger().Info("creating empty storage") createReq := &request.CreateStorageRequest{ - Size: int(sizeGB), + Size: rsz, Zone: p.zone, Title: storageName, } - storageDetails, err = p.upcloud.CreateStorage(createReq) + storageDetails, err = p.upcloud.CreateStorage(context.Background(), createReq) if err != nil { - return + return nil, err } ctx.Logger().Debug("%+v", storageDetails) @@ -48,16 +49,16 @@ func (p *Provider) createStorage(ctx *lepton.Context, storageName, filePath stri SourceLocation: filePath, } - importDetails, err := p.upcloud.CreateStorageImport(importReq) + importDetails, err := p.upcloud.CreateStorageImport(context.Background(), importReq) if err != nil { - return + return nil, err } ctx.Logger().Debug("%+v", importDetails) err = p.waitForStorageState(storageDetails.UUID, "online") if err != nil { - return + return nil, err } ctx.Logger().Info("import completed") @@ -72,7 +73,7 @@ func (p *Provider) waitForStorageState(uuid, state string) (err error) { Timeout: 10 * time.Minute, } - _, err = p.upcloud.WaitForStorageState(waitStateReq) + _, err = p.upcloud.WaitForStorageState(context.Background(), waitStateReq) return } @@ -82,5 +83,5 @@ func (p *Provider) deleteStorage(uuid string) error { UUID: uuid, } - return p.upcloud.DeleteStorage(deleteStorageReq) + return p.upcloud.DeleteStorage(context.Background(), deleteStorageReq) } diff --git a/provider/upcloud/upcloud_test.go b/provider/upcloud/upcloud_test.go index b9d6a8dc..90f18899 100644 --- a/provider/upcloud/upcloud_test.go +++ b/provider/upcloud/upcloud_test.go @@ -3,6 +3,7 @@ package upcloud_test import ( + "context" "errors" "os" "testing" @@ -20,7 +21,7 @@ func TestProviderInitialize(t *testing.T) { p, s := NewProvider(t) s.EXPECT(). - GetAccount(). + GetAccount(context.Background()). Return(nil, nil) err := p.Initialize(&lepton.NewConfig().CloudConfig) @@ -34,7 +35,7 @@ func TestProviderInitialize(t *testing.T) { p, s := NewProvider(t) s.EXPECT(). - GetAccount(). + GetAccount(context.Background()). Return(nil, nil) err := p.Initialize(&lepton.NewConfig().CloudConfig) @@ -49,7 +50,7 @@ func TestProviderInitialize(t *testing.T) { p, s := NewProvider(t) s.EXPECT(). - GetAccount(). + GetAccount(context.Background()). Return(nil, nil) err := p.Initialize(&lepton.NewConfig().CloudConfig) @@ -67,7 +68,7 @@ func TestProviderInitialize(t *testing.T) { errInvalidCredentials := errors.New("invalid credentials") s.EXPECT(). - GetAccount(). + GetAccount(context.Background()). Return(nil, errInvalidCredentials) err := p.Initialize(&lepton.NewConfig().CloudConfig) @@ -83,7 +84,7 @@ func TestProviderInitialize(t *testing.T) { p, s := NewProvider(t) s.EXPECT(). - GetAccount(). + GetAccount(context.Background()). Return(nil, nil) err := p.Initialize(&lepton.NewConfig().CloudConfig) diff --git a/provider/upcloud/upcloud_volume.go b/provider/upcloud/upcloud_volume.go index 103cd1cf..2c04a6dd 100644 --- a/provider/upcloud/upcloud_volume.go +++ b/provider/upcloud/upcloud_volume.go @@ -3,14 +3,15 @@ package upcloud import ( + "context" "errors" "fmt" "os" "strconv" "strings" - "github.com/UpCloudLtd/upcloud-go-api/upcloud" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" "github.com/nanovms/ops/lepton" ) @@ -41,7 +42,7 @@ func (p *Provider) GetAllVolumes(ctx *lepton.Context) (volumes *[]lepton.NanosVo Access: "private", } - templates, err := p.upcloud.GetStorages(listTemplatesReq) + templates, err := p.upcloud.GetStorages(context.Background(), listTemplatesReq) if err != nil { return } @@ -79,7 +80,7 @@ func (p *Provider) asyncGetVolume(uuid string, volumesCh chan *upcloud.StorageDe UUID: uuid, } - details, err := p.upcloud.GetStorageDetails(volumeReq) + details, err := p.upcloud.GetStorageDetails(context.Background(), volumeReq) if err != nil { errCh <- err return @@ -131,7 +132,7 @@ func (p *Provider) AttachVolume(ctx *lepton.Context, image, name string, attachI StorageUUID: volume.ID, } - _, err = p.upcloud.AttachStorage(attachReq) + _, err = p.upcloud.AttachStorage(context.Background(), attachReq) ctx.Logger().Log("starting instance") err = p.startServer(instance.ID) @@ -148,7 +149,7 @@ func (p *Provider) DetachVolume(ctx *lepton.Context, image, name string) (err er serverDetailsReq := &request.GetServerDetailsRequest{UUID: server.UUID} - serverDetails, err := p.upcloud.GetServerDetails(serverDetailsReq) + serverDetails, err := p.upcloud.GetServerDetails(context.Background(), serverDetailsReq) if err != nil { return } @@ -175,7 +176,7 @@ func (p *Provider) DetachVolume(ctx *lepton.Context, image, name string) (err er Address: s.Address, } - _, err = p.upcloud.DetachStorage(detachReq) + _, err = p.upcloud.DetachStorage(context.Background(), detachReq) ctx.Logger().Log("starting server") err = p.startServer(server.UUID) diff --git a/provider/upcloud/upcloud_volume_test.go b/provider/upcloud/upcloud_volume_test.go index 1658bfee..c506545a 100644 --- a/provider/upcloud/upcloud_volume_test.go +++ b/provider/upcloud/upcloud_volume_test.go @@ -3,12 +3,14 @@ package upcloud_test import ( + "context" "testing" "time" - "github.com/UpCloudLtd/upcloud-go-api/upcloud" - "github.com/UpCloudLtd/upcloud-go-api/upcloud/request" "github.com/nanovms/ops/lepton" + + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud" + "github.com/UpCloudLtd/upcloud-go-api/v6/upcloud/request" "github.com/stretchr/testify/assert" ) @@ -16,7 +18,7 @@ func TestGetAllVolumes(t *testing.T) { p, s := NewProvider(t) s.EXPECT(). - GetStorages(&request.GetStoragesRequest{Type: "disk", Access: "private"}). + GetStorages(context.Background(), &request.GetStoragesRequest{Type: "disk", Access: "private"}). Return(&upcloud.Storages{}, nil) ctx := lepton.NewContext(lepton.NewConfig()) @@ -36,35 +38,35 @@ func TestAttachVolume(t *testing.T) { volumeName := "files" s.EXPECT(). - GetServers(). + GetServers(context.Background()). Return(&upcloud.Servers{Servers: []upcloud.Server{{UUID: serverID, Title: serverName}}}, nil) s.EXPECT(). - GetServerDetails(&request.GetServerDetailsRequest{UUID: serverID}). + GetServerDetails(context.Background(), &request.GetServerDetailsRequest{UUID: serverID}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) s.EXPECT(). - StopServer(&request.StopServerRequest{UUID: serverID}). + StopServer(context.Background(), &request.StopServerRequest{UUID: serverID}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) s.EXPECT(). - WaitForServerState(&request.WaitForServerStateRequest{UUID: serverID, DesiredState: "stopped", Timeout: 1 * time.Minute}). + WaitForServerState(context.Background(), &request.WaitForServerStateRequest{UUID: serverID, DesiredState: "stopped", Timeout: 1 * time.Minute}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) s.EXPECT(). - GetStorages(&request.GetStoragesRequest{Type: "disk", Access: "private"}). + GetStorages(context.Background(), &request.GetStoragesRequest{Type: "disk", Access: "private"}). Return(&upcloud.Storages{Storages: []upcloud.Storage{{UUID: volumeID, Title: volumeName}}}, nil) s.EXPECT(). - GetStorageDetails(&request.GetStorageDetailsRequest{UUID: volumeID}). + GetStorageDetails(context.Background(), &request.GetStorageDetailsRequest{UUID: volumeID}). Return(&upcloud.StorageDetails{Storage: upcloud.Storage{UUID: volumeID, Title: volumeName}}, nil) s.EXPECT(). - AttachStorage(&request.AttachStorageRequest{ServerUUID: serverID, StorageUUID: volumeID}). + AttachStorage(context.Background(), &request.AttachStorageRequest{ServerUUID: serverID, StorageUUID: volumeID}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID}}, nil) s.EXPECT(). - StartServer(&request.StartServerRequest{UUID: serverID}). + StartServer(context.Background(), &request.StartServerRequest{UUID: serverID}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) ctx := lepton.NewContext(lepton.NewConfig()) @@ -82,35 +84,35 @@ func TestDetachVolume(t *testing.T) { volumeName := "files" s.EXPECT(). - GetServers(). + GetServers(context.Background()). Return(&upcloud.Servers{Servers: []upcloud.Server{{UUID: serverID, Title: serverName}}}, nil) s.EXPECT(). - GetServerDetails(&request.GetServerDetailsRequest{UUID: serverID}). + GetServerDetails(context.Background(), &request.GetServerDetailsRequest{UUID: serverID}). Return(&upcloud.ServerDetails{StorageDevices: []upcloud.ServerStorageDevice{{Title: volumeName, Address: "s0"}}, Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) s.EXPECT(). - StopServer(&request.StopServerRequest{UUID: serverID}). + StopServer(context.Background(), &request.StopServerRequest{UUID: serverID}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) s.EXPECT(). - WaitForServerState(&request.WaitForServerStateRequest{UUID: serverID, DesiredState: "stopped", Timeout: 1 * time.Minute}). + WaitForServerState(context.Background(), &request.WaitForServerStateRequest{UUID: serverID, DesiredState: "stopped", Timeout: 1 * time.Minute}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) s.EXPECT(). - GetStorages(&request.GetStoragesRequest{Type: "disk", Access: "private"}). + GetStorages(context.Background(), &request.GetStoragesRequest{Type: "disk", Access: "private"}). Return(&upcloud.Storages{Storages: []upcloud.Storage{{UUID: volumeID, Title: volumeName}}}, nil) s.EXPECT(). - GetStorageDetails(&request.GetStorageDetailsRequest{UUID: volumeID}). + GetStorageDetails(context.Background(), &request.GetStorageDetailsRequest{UUID: volumeID}). Return(&upcloud.StorageDetails{Storage: upcloud.Storage{UUID: volumeID, Title: volumeName}}, nil) s.EXPECT(). - DetachStorage(&request.DetachStorageRequest{ServerUUID: serverID, Address: "s0"}). + DetachStorage(context.Background(), &request.DetachStorageRequest{ServerUUID: serverID, Address: "s0"}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID}}, nil) s.EXPECT(). - StartServer(&request.StartServerRequest{UUID: serverID}). + StartServer(context.Background(), &request.StartServerRequest{UUID: serverID}). Return(&upcloud.ServerDetails{Server: upcloud.Server{UUID: serverID, Title: serverName}}, nil) ctx := lepton.NewContext(lepton.NewConfig())