build(deps): bump github.com/gophercloud/gophercloud
Bumps [github.com/gophercloud/gophercloud](https://github.com/gophercloud/gophercloud) from 0.24.0 to 1.0.0. - [Release notes](https://github.com/gophercloud/gophercloud/releases) - [Changelog](https://github.com/gophercloud/gophercloud/blob/master/CHANGELOG.md) - [Commits](https://github.com/gophercloud/gophercloud/compare/v0.24.0...v1.0.0) --- updated-dependencies: - dependency-name: github.com/gophercloud/gophercloud dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
8f26317115
commit
c864343770
20 changed files with 174 additions and 603 deletions
533
vendor/github.com/gophercloud/gophercloud/.zuul.yaml
generated
vendored
533
vendor/github.com/gophercloud/gophercloud/.zuul.yaml
generated
vendored
|
|
@ -1,533 +0,0 @@
|
|||
- job:
|
||||
name: gophercloud-unittest
|
||||
parent: golang-test
|
||||
description: |
|
||||
Run gophercloud unit test
|
||||
run: .zuul/playbooks/gophercloud-unittest/run.yaml
|
||||
nodeset: ubuntu-xenial-ut
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-base
|
||||
parent: golang-test
|
||||
run: .zuul/playbooks/gophercloud-acceptance-test/run.yaml
|
||||
description: |
|
||||
Base job for all gophercloud acceptance tests
|
||||
timeout: 18000 # 5 hours
|
||||
abstract: true
|
||||
nodeset: ubuntu-focal
|
||||
irrelevant-files:
|
||||
- ^.*\.md$
|
||||
- ^LICENSE$
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute
|
||||
parent: gophercloud-acceptance-test-base
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on master branch. This runs when any file is patched
|
||||
except if it's doc.
|
||||
vars:
|
||||
# the list of all available tests can generated by:
|
||||
# find acceptance/openstack -name '*_test.go' -exec dirname {} \; | sort -n | uniq -c | awk '{print $2}'
|
||||
acceptance_tests:
|
||||
- acceptance/openstack
|
||||
- acceptance/openstack/compute/v2
|
||||
- acceptance/openstack/container/v1
|
||||
- acceptance/openstack/identity/v2
|
||||
- acceptance/openstack/identity/v3
|
||||
- acceptance/openstack/keymanager/v1
|
||||
- acceptance/openstack/orchestration/v1
|
||||
- acceptance/openstack/placement/v1
|
||||
devstack_services:
|
||||
- barbican
|
||||
- heat
|
||||
- zun
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking
|
||||
parent: gophercloud-acceptance-test-base
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on master branch
|
||||
files:
|
||||
- ^.*dns.*$
|
||||
- ^.*loadbalancer.*$
|
||||
- ^.*networking.*$
|
||||
vars:
|
||||
prefetch_amphora: true
|
||||
devstack_env:
|
||||
OCTAVIA_AMP_IMAGE_FILE: /opt/octavia-amphora/amphora-x64-haproxy.qcow2
|
||||
# the list of all available tests can generated by:
|
||||
# find acceptance/openstack -name '*_test.go' -exec dirname {} \; | sort -n | uniq -c | awk '{print $2}'
|
||||
acceptance_tests:
|
||||
- acceptance/openstack/dns/v2
|
||||
- acceptance/openstack/loadbalancer/v2
|
||||
- acceptance/openstack/networking/v2
|
||||
- acceptance/openstack/networking/v2/extensions
|
||||
- acceptance/openstack/networking/v2/extensions/agents
|
||||
- acceptance/openstack/networking/v2/extensions/dns
|
||||
- acceptance/openstack/networking/v2/extensions/layer3
|
||||
- acceptance/openstack/networking/v2/extensions/mtu
|
||||
- acceptance/openstack/networking/v2/extensions/networkipavailabilities
|
||||
- acceptance/openstack/networking/v2/extensions/portsbinding
|
||||
- acceptance/openstack/networking/v2/extensions/qos/policies
|
||||
- acceptance/openstack/networking/v2/extensions/qos/rules
|
||||
- acceptance/openstack/networking/v2/extensions/qos/ruletypes
|
||||
- acceptance/openstack/networking/v2/extensions/quotas
|
||||
- acceptance/openstack/networking/v2/extensions/rbacpolicies
|
||||
- acceptance/openstack/networking/v2/extensions/subnetpools
|
||||
- acceptance/openstack/networking/v2/extensions/trunks
|
||||
- acceptance/openstack/networking/v2/extensions/vlantransparent
|
||||
devstack_projects: 'openstack/neutron-dynamic-routing'
|
||||
devstack_services:
|
||||
- designate
|
||||
- neutron-dynamic-routing
|
||||
- neutron-ext
|
||||
- octavia
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage
|
||||
parent: gophercloud-acceptance-test-base
|
||||
description: |
|
||||
Run gophercloud storage acceptance test on master branch
|
||||
files:
|
||||
- ^.*blockstorage.*$
|
||||
- ^.*imageservice.*$
|
||||
- ^.*objectstorage.*$
|
||||
- ^.*sharedfilesystems.*$
|
||||
vars:
|
||||
acceptance_tests:
|
||||
- acceptance/openstack/blockstorage
|
||||
- acceptance/openstack/blockstorage/extensions
|
||||
- acceptance/openstack/blockstorage/v3
|
||||
- acceptance/openstack/imageservice/v2
|
||||
- acceptance/openstack/objectstorage/v1
|
||||
- acceptance/openstack/sharedfilesystems/v2
|
||||
- acceptance/openstack/sharedfilesystems/v2/messages
|
||||
devstack_services:
|
||||
- manila
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-ironic
|
||||
parent: gophercloud-acceptance-test-base
|
||||
description: |
|
||||
Run gophercloud ironic acceptance test on master branch
|
||||
files:
|
||||
- ^.*baremetal.*$
|
||||
vars:
|
||||
devstack_services:
|
||||
- ironic
|
||||
devstack_override_enabled_services: 'g-api,g-reg,q-agt,q-dhcp,q-l3,q-svc,key,mysql,rabbit,ir-api,ir-cond,s-account,s-container,s-object,s-proxy'
|
||||
devstack_projects: 'openstack/ironic-python-agent-builder openstack/ironic'
|
||||
acceptance_tests:
|
||||
- acceptance/openstack/baremetal/v1
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute-ussuri
|
||||
parent: gophercloud-acceptance-test-compute
|
||||
nodeset: ubuntu-bionic
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on ussuri branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/ussuri
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking-ussuri
|
||||
parent: gophercloud-acceptance-test-networking
|
||||
nodeset: ubuntu-bionic
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on ussuri branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/ussuri
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage-ussuri
|
||||
parent: gophercloud-acceptance-test-storage
|
||||
nodeset: ubuntu-bionic
|
||||
description: |
|
||||
Run gophercloud storage test on ussuri branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/ussuri
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute-train
|
||||
parent: gophercloud-acceptance-test-compute
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on train branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/train
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking-train
|
||||
parent: gophercloud-acceptance-test-networking
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on train branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/train
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage-train
|
||||
parent: gophercloud-acceptance-test-storage
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud storage acceptance test on train branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/train
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute-stein
|
||||
parent: gophercloud-acceptance-test-compute
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on stein branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/stein
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking-stein
|
||||
parent: gophercloud-acceptance-test-networking
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on stein branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/stein
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage-stein
|
||||
parent: gophercloud-acceptance-test-storage
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud storage acceptance test on stein branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/stein
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute-rocky
|
||||
parent: gophercloud-acceptance-test-compute
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on rocky branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/rocky
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking-rocky
|
||||
parent: gophercloud-acceptance-test-networking
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on rocky branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/rocky
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage-rocky
|
||||
parent: gophercloud-acceptance-test-storage
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud storage acceptance test on rocky branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/rocky
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute-queens
|
||||
parent: gophercloud-acceptance-test-compute
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on queens branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/queens
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking-queens
|
||||
parent: gophercloud-acceptance-test-networking
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on queens branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/queens
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage-queens
|
||||
parent: gophercloud-acceptance-test-storage
|
||||
description: |
|
||||
Run gophercloud storage acceptance test on queens branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/queens
|
||||
|
||||
# NOTE: A Pike-based devstack environment is currently
|
||||
# not building correctly. This might be a temporary issue.
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute-pike
|
||||
parent: gophercloud-acceptance-test-compute
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on pike branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/pike
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking-pike
|
||||
parent: gophercloud-acceptance-test-networking
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on pike branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/pike
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage-pike
|
||||
parent: gophercloud-acceptance-test-storage
|
||||
description: |
|
||||
Run gophercloud storage acceptance test on pike branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/pike
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute-ocata
|
||||
parent: gophercloud-acceptance-test-compute
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on ocata branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/ocata
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking-ocata
|
||||
parent: gophercloud-acceptance-test-networking
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on ocata branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/ocata
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage-ocata
|
||||
parent: gophercloud-acceptance-test-storage
|
||||
description: |
|
||||
Run gophercloud storage acceptance test on ocata branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/ocata
|
||||
|
||||
# NOTE: A Newton-based devstack environment is currently
|
||||
# not building correctly. This might be a temporary issue.
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-compute-newton
|
||||
parent: gophercloud-acceptance-test-compute
|
||||
description: |
|
||||
Run gophercloud compute acceptance test on newton branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/newton
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-networking-newton
|
||||
parent: gophercloud-acceptance-test-networking
|
||||
description: |
|
||||
Run gophercloud networking acceptance test on newton branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/newton
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-storage-newton
|
||||
parent: gophercloud-acceptance-test-storage
|
||||
description: |
|
||||
Run gophercloud storage acceptance test on newton branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/newton
|
||||
|
||||
# The following jobs are maintained because they are parents
|
||||
# for gophercloud v0.4.0 acceptance tests in theopenlab/openlab-zuul-jobs.
|
||||
# TODO(emilien) update the childs to use the new variants.
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-legacy
|
||||
parent: gophercloud-acceptance-test-base
|
||||
description: |
|
||||
THIS JOB REMAINS FOR LEGACY. Will be removed soon to be replaced by its variants.
|
||||
Run gophercloud acceptance test on the master branch. This runs when any file is patched
|
||||
except if it's doc.
|
||||
vars:
|
||||
# the list of all available tests can generated by:
|
||||
# find acceptance/openstack -name '*_test.go' -exec dirname {} \; | sort -n | uniq -c | awk '{print $2}'
|
||||
acceptance_tests:
|
||||
- acceptance/openstack
|
||||
- acceptance/openstack/blockstorage
|
||||
- acceptance/openstack/blockstorage/extensions
|
||||
- acceptance/openstack/blockstorage/v3
|
||||
- acceptance/openstack/compute/v2
|
||||
- acceptance/openstack/container/v1
|
||||
- acceptance/openstack/dns/v2
|
||||
- acceptance/openstack/identity/v2
|
||||
- acceptance/openstack/identity/v3
|
||||
- acceptance/openstack/imageservice/v2
|
||||
- acceptance/openstack/keymanager/v1
|
||||
- acceptance/openstack/loadbalancer/v2
|
||||
- acceptance/openstack/networking/v2
|
||||
- acceptance/openstack/networking/v2/extensions
|
||||
- acceptance/openstack/networking/v2/extensions/agents
|
||||
- acceptance/openstack/networking/v2/extensions/dns
|
||||
- acceptance/openstack/networking/v2/extensions/layer3
|
||||
- acceptance/openstack/networking/v2/extensions/mtu
|
||||
- acceptance/openstack/networking/v2/extensions/networkipavailabilities
|
||||
- acceptance/openstack/networking/v2/extensions/portsbinding
|
||||
- acceptance/openstack/networking/v2/extensions/qos/policies
|
||||
- acceptance/openstack/networking/v2/extensions/qos/rules
|
||||
- acceptance/openstack/networking/v2/extensions/qos/ruletypes
|
||||
- acceptance/openstack/networking/v2/extensions/quotas
|
||||
- acceptance/openstack/networking/v2/extensions/rbacpolicies
|
||||
- acceptance/openstack/networking/v2/extensions/subnetpools
|
||||
- acceptance/openstack/networking/v2/extensions/trunks
|
||||
- acceptance/openstack/networking/v2/extensions/vlantransparent
|
||||
- acceptance/openstack/objectstorage/v1
|
||||
- acceptance/openstack/orchestration/v1
|
||||
- acceptance/openstack/placement/v1
|
||||
- acceptance/openstack/sharedfilesystems/v2
|
||||
- acceptance/openstack/sharedfilesystems/v2/messages
|
||||
devstack_services:
|
||||
- designate
|
||||
- manila
|
||||
- neutron-ext
|
||||
- octavia
|
||||
- zun
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-stein
|
||||
parent: gophercloud-acceptance-test-legacy
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud acceptance test on stein branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/stein
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-rocky
|
||||
parent: gophercloud-acceptance-test-legacy
|
||||
nodeset: ubuntu-xenial
|
||||
description: |
|
||||
Run gophercloud acceptance test on rocky branch
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/rocky
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-queens
|
||||
parent: gophercloud-acceptance-test-legacy
|
||||
description: |
|
||||
Run gophercloud acceptance test on queens branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/queens
|
||||
|
||||
# NOTE: A Pike-based devstack environment is currently
|
||||
# not building correctly. This might be a temporary issue.
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-pike
|
||||
parent: gophercloud-acceptance-test-legacy
|
||||
description: |
|
||||
Run gophercloud acceptance test on pike branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/pike
|
||||
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-ocata
|
||||
parent: gophercloud-acceptance-test-legacy
|
||||
description: |
|
||||
Run gophercloud acceptance test on ocata branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/ocata
|
||||
|
||||
# NOTE: A Newton-based devstack environment is currently
|
||||
# not building correctly. This might be a temporary issue.
|
||||
- job:
|
||||
name: gophercloud-acceptance-test-newton
|
||||
parent: gophercloud-acceptance-test-legacy
|
||||
description: |
|
||||
Run gophercloud acceptance test on newton branch
|
||||
nodeset: ubuntu-xenial
|
||||
vars:
|
||||
global_env:
|
||||
OS_BRANCH: stable/newton
|
||||
|
||||
- project:
|
||||
name: gophercloud/gophercloud
|
||||
check:
|
||||
jobs:
|
||||
- gophercloud-unittest
|
||||
- gophercloud-acceptance-test-compute
|
||||
- gophercloud-acceptance-test-networking
|
||||
- gophercloud-acceptance-test-storage
|
||||
- gophercloud-acceptance-test-ironic
|
||||
recheck-newton:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-compute-newton
|
||||
- gophercloud-acceptance-test-networking-newton
|
||||
- gophercloud-acceptance-test-storage-newton
|
||||
recheck-ocata:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-compute-ocata
|
||||
- gophercloud-acceptance-test-networking-ocata
|
||||
- gophercloud-acceptance-test-storage-ocata
|
||||
recheck-pike:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-compute-pike
|
||||
- gophercloud-acceptance-test-networking-pike
|
||||
- gophercloud-acceptance-test-storage-pike
|
||||
recheck-queens:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-compute-queens
|
||||
- gophercloud-acceptance-test-networking-queens
|
||||
- gophercloud-acceptance-test-storage-queens
|
||||
recheck-rocky:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-compute-rocky
|
||||
- gophercloud-acceptance-test-networking-rocky
|
||||
- gophercloud-acceptance-test-storage-rocky
|
||||
recheck-stein:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-compute-stein
|
||||
- gophercloud-acceptance-test-networking-stein
|
||||
- gophercloud-acceptance-test-storage-stein
|
||||
recheck-train:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-compute-train
|
||||
- gophercloud-acceptance-test-networking-train
|
||||
- gophercloud-acceptance-test-storage-train
|
||||
recheck-ussuri:
|
||||
jobs:
|
||||
- gophercloud-acceptance-test-compute-ussuri
|
||||
- gophercloud-acceptance-test-networking-ussuri
|
||||
- gophercloud-acceptance-test-storage-ussuri
|
||||
59
vendor/github.com/gophercloud/gophercloud/CHANGELOG.md
generated
vendored
59
vendor/github.com/gophercloud/gophercloud/CHANGELOG.md
generated
vendored
|
|
@ -1,3 +1,62 @@
|
|||
## 1.0.0 (2022-08-29)
|
||||
|
||||
UPGRADE NOTES + PROMISE OF COMPATIBILITY
|
||||
|
||||
* Introducing Gophercloud v1! Like for every other release so far, all clients will upgrade automatically with `go get -d github.com/gophercloud/gophercloud` unless the dependency is pinned in `go.mod`.
|
||||
* Gophercloud v1 comes with a promise of compatibility: no breaking changes are expected to merge before v2.0.0.
|
||||
|
||||
IMPROVEMENTS
|
||||
|
||||
* Added `compute.v2/extensions/services.Delete` [GH-2427](https://github.com/gophercloud/gophercloud/pull/2427)
|
||||
* Added support for `standard-attr-revisions` to `networking/v2/networks`, `networking/v2/ports`, and `networking/v2/subnets` [GH-2437](https://github.com/gophercloud/gophercloud/pull/2437)
|
||||
* Added `updated_at` and `created_at` fields to `networking/v2/ports.Port` [GH-2445](https://github.com/gophercloud/gophercloud/pull/2445)
|
||||
|
||||
## 0.25.0 (May 30, 2022)
|
||||
|
||||
BREAKING CHANGES
|
||||
|
||||
* Replaced `blockstorage/noauth.NewBlockStorageNoAuth` with `NewBlockStorageNoAuthV2` and `NewBlockStorageNoAuthV3` [GH-2343](https://github.com/gophercloud/gophercloud/pull/2343)
|
||||
* Renamed `blockstorage/extensions/schedulerstats.Capabilities`'s `GoodnessFuction` field to `GoodnessFunction` [GH-2346](https://github.com/gophercloud/gophercloud/pull/2346)
|
||||
|
||||
IMPROVEMENTS
|
||||
|
||||
* Added `RequestOpts.OmitHeaders` to provider client [GH-2315](https://github.com/gophercloud/gophercloud/pull/2315)
|
||||
* Added `identity/v3/extensions/projectendpoints.List` [GH-2304](https://github.com/gophercloud/gophercloud/pull/2304)
|
||||
* Added `identity/v3/extensions/projectendpoints.Create` [GH-2304](https://github.com/gophercloud/gophercloud/pull/2304)
|
||||
* Added `identity/v3/extensions/projectendpoints.Delete` [GH-2304](https://github.com/gophercloud/gophercloud/pull/2304)
|
||||
* Added protocol `any` to `networking/v2/extensions/security/rules.Create` [GH-2310](https://github.com/gophercloud/gophercloud/pull/2310)
|
||||
* Added `REDIRECT_PREFIX` and `REDIRECT_HTTP_CODE` to `loadbalancer/v2/l7policies.Create` [GH-2324](https://github.com/gophercloud/gophercloud/pull/2324)
|
||||
* Added `SOURCE_IP_PORT` LB method to `loadbalancer/v2/pools.Create` [GH-2300](https://github.com/gophercloud/gophercloud/pull/2300)
|
||||
* Added `AllocatedCapacityGB` capability to `blockstorage/extensions/schedulerstats.Capabilities` [GH-2348](https://github.com/gophercloud/gophercloud/pull/2348)
|
||||
* Added `Metadata` to `dns/v2/recordset.RecordSet` [GH-2353](https://github.com/gophercloud/gophercloud/pull/2353)
|
||||
* Added missing fields to `compute/v2/extensions/servergroups.List` [GH-2355](https://github.com/gophercloud/gophercloud/pull/2355)
|
||||
* Added missing labels fields to `containerinfra/v1/nodegroups` [GH-2377](https://github.com/gophercloud/gophercloud/pull/2377)
|
||||
* Added missing fields to `loadbalancer/v2/listeners.Listener` [GH-2407](https://github.com/gophercloud/gophercloud/pull/2407)
|
||||
* Added `identity/v3/limits.List` [GH-2360](https://github.com/gophercloud/gophercloud/pull/2360)
|
||||
* Added `ParentProviderUUID` to `placement/v1/resourceproviders.Create` [GH-2356](https://github.com/gophercloud/gophercloud/pull/2356)
|
||||
* Added `placement/v1/resourceproviders.Delete` [GH-2357](https://github.com/gophercloud/gophercloud/pull/2357)
|
||||
* Added `placement/v1/resourceproviders.Get` [GH-2358](https://github.com/gophercloud/gophercloud/pull/2358)
|
||||
* Added `placement/v1/resourceproviders.Update` [GH-2359](https://github.com/gophercloud/gophercloud/pull/2359)
|
||||
* Added `networking/v2/extensions/bgp/peers.List` [GH-2241](https://github.com/gophercloud/gophercloud/pull/2241)
|
||||
* Added `networking/v2/extensions/bgp/peers.Get` [GH-2241](https://github.com/gophercloud/gophercloud/pull/2241)
|
||||
* Added `networking/v2/extensions/bgp/peers.Create` [GH-2388](https://github.com/gophercloud/gophercloud/pull/2388)
|
||||
* Added `networking/v2/extensions/bgp/peers.Delete` [GH-2388](https://github.com/gophercloud/gophercloud/pull/2388)
|
||||
* Added `networking/v2/extensions/bgp/peers.Update` [GH-2396](https://github.com/gophercloud/gophercloud/pull/2396)
|
||||
* Added `networking/v2/extensions/bgp/speakers.Create` [GH-2395](https://github.com/gophercloud/gophercloud/pull/2395)
|
||||
* Added `networking/v2/extensions/bgp/speakers.Delete` [GH-2395](https://github.com/gophercloud/gophercloud/pull/2395)
|
||||
* Added `networking/v2/extensions/bgp/speakers.Update` [GH-2400](https://github.com/gophercloud/gophercloud/pull/2400)
|
||||
* Added `networking/v2/extensions/bgp/speakers.AddBGPPeer` [GH-2400](https://github.com/gophercloud/gophercloud/pull/2400)
|
||||
* Added `networking/v2/extensions/bgp/speakers.RemoveBGPPeer` [GH-2400](https://github.com/gophercloud/gophercloud/pull/2400)
|
||||
* Added `networking/v2/extensions/bgp/speakers.GetAdvertisedRoutes` [GH-2406](https://github.com/gophercloud/gophercloud/pull/2406)
|
||||
* Added `networking/v2/extensions/bgp/speakers.AddGatewayNetwork` [GH-2406](https://github.com/gophercloud/gophercloud/pull/2406)
|
||||
* Added `networking/v2/extensions/bgp/speakers.RemoveGatewayNetwork` [GH-2406](https://github.com/gophercloud/gophercloud/pull/2406)
|
||||
* Added `baremetal/v1/nodes.SetMaintenance` and `baremetal/v1/nodes.UnsetMaintenance` [GH-2384](https://github.com/gophercloud/gophercloud/pull/2384)
|
||||
* Added `sharedfilesystems/v2/services.List` [GH-2350](https://github.com/gophercloud/gophercloud/pull/2350)
|
||||
* Added `sharedfilesystems/v2/schedulerstats.List` [GH-2350](https://github.com/gophercloud/gophercloud/pull/2350)
|
||||
* Added `sharedfilesystems/v2/schedulerstats.ListDetail` [GH-2350](https://github.com/gophercloud/gophercloud/pull/2350)
|
||||
* Added ability to handle 502 and 504 errors [GH-2245](https://github.com/gophercloud/gophercloud/pull/2245)
|
||||
* Added `IncludeSubtree` to `identity/v3/roles.ListAssignments` [GH-2411](https://github.com/gophercloud/gophercloud/pull/2411)
|
||||
|
||||
## 0.24.0 (December 13, 2021)
|
||||
|
||||
UPGRADE NOTES
|
||||
|
|
|
|||
1
vendor/github.com/gophercloud/gophercloud/LICENSE
generated
vendored
1
vendor/github.com/gophercloud/gophercloud/LICENSE
generated
vendored
|
|
@ -1,4 +1,5 @@
|
|||
Copyright 2012-2013 Rackspace, Inc.
|
||||
Copyright Gophercloud authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
|
|
|
|||
4
vendor/github.com/gophercloud/gophercloud/README.md
generated
vendored
4
vendor/github.com/gophercloud/gophercloud/README.md
generated
vendored
|
|
@ -126,7 +126,9 @@ Have a look at the [FAQ](./docs/FAQ.md) for some tips on customizing the way Gop
|
|||
|
||||
## Backwards-Compatibility Guarantees
|
||||
|
||||
None. Vendor it and write tests covering the parts you use.
|
||||
Gophercloud versioning follows [semver](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
Before `v1.0.0`, there were no guarantees. Starting with v1, there will be no breaking changes within a major release.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
|||
18
vendor/github.com/gophercloud/gophercloud/auth_options.go
generated
vendored
18
vendor/github.com/gophercloud/gophercloud/auth_options.go
generated
vendored
|
|
@ -12,20 +12,20 @@ provider.
|
|||
|
||||
An example of manually providing authentication information:
|
||||
|
||||
opts := gophercloud.AuthOptions{
|
||||
IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
|
||||
Username: "{username}",
|
||||
Password: "{password}",
|
||||
TenantID: "{tenant_id}",
|
||||
}
|
||||
opts := gophercloud.AuthOptions{
|
||||
IdentityEndpoint: "https://openstack.example.com:5000/v2.0",
|
||||
Username: "{username}",
|
||||
Password: "{password}",
|
||||
TenantID: "{tenant_id}",
|
||||
}
|
||||
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
|
||||
An example of using AuthOptionsFromEnv(), where the environment variables can
|
||||
be read from a file, such as a standard openrc file:
|
||||
|
||||
opts, err := openstack.AuthOptionsFromEnv()
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
opts, err := openstack.AuthOptionsFromEnv()
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
*/
|
||||
type AuthOptions struct {
|
||||
// IdentityEndpoint specifies the HTTP endpoint that is required to work with
|
||||
|
|
|
|||
7
vendor/github.com/gophercloud/gophercloud/doc.go
generated
vendored
7
vendor/github.com/gophercloud/gophercloud/doc.go
generated
vendored
|
|
@ -3,7 +3,7 @@ Package gophercloud provides a multi-vendor interface to OpenStack-compatible
|
|||
clouds. The library has a three-level hierarchy: providers, services, and
|
||||
resources.
|
||||
|
||||
Authenticating with Providers
|
||||
# Authenticating with Providers
|
||||
|
||||
Provider structs represent the cloud providers that offer and manage a
|
||||
collection of services. You will generally want to create one Provider
|
||||
|
|
@ -49,7 +49,7 @@ instead of "project".
|
|||
opts, err := openstack.AuthOptionsFromEnv()
|
||||
provider, err := openstack.AuthenticatedClient(opts)
|
||||
|
||||
Service Clients
|
||||
# Service Clients
|
||||
|
||||
Service structs are specific to a provider and handle all of the logic and
|
||||
operations for a particular OpenStack service. Examples of services include:
|
||||
|
|
@ -60,7 +60,7 @@ pass in the parent provider, like so:
|
|||
|
||||
client, err := openstack.NewComputeV2(provider, opts)
|
||||
|
||||
Resources
|
||||
# Resources
|
||||
|
||||
Resource structs are the domain models that services make use of in order
|
||||
to work with and represent the state of API resources:
|
||||
|
|
@ -144,6 +144,5 @@ An example retry backoff function, which respects the 429 HTTP response code and
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
*/
|
||||
package gophercloud
|
||||
|
|
|
|||
28
vendor/github.com/gophercloud/gophercloud/errors.go
generated
vendored
28
vendor/github.com/gophercloud/gophercloud/errors.go
generated
vendored
|
|
@ -156,11 +156,21 @@ type ErrDefault500 struct {
|
|||
ErrUnexpectedResponseCode
|
||||
}
|
||||
|
||||
// ErrDefault502 is the default error type returned on a 502 HTTP response code.
|
||||
type ErrDefault502 struct {
|
||||
ErrUnexpectedResponseCode
|
||||
}
|
||||
|
||||
// ErrDefault503 is the default error type returned on a 503 HTTP response code.
|
||||
type ErrDefault503 struct {
|
||||
ErrUnexpectedResponseCode
|
||||
}
|
||||
|
||||
// ErrDefault504 is the default error type returned on a 504 HTTP response code.
|
||||
type ErrDefault504 struct {
|
||||
ErrUnexpectedResponseCode
|
||||
}
|
||||
|
||||
func (e ErrDefault400) Error() string {
|
||||
e.DefaultErrString = fmt.Sprintf(
|
||||
"Bad request with: [%s %s], error message: %s",
|
||||
|
|
@ -198,10 +208,16 @@ func (e ErrDefault429) Error() string {
|
|||
func (e ErrDefault500) Error() string {
|
||||
return "Internal Server Error"
|
||||
}
|
||||
func (e ErrDefault502) Error() string {
|
||||
return "Bad Gateway"
|
||||
}
|
||||
func (e ErrDefault503) Error() string {
|
||||
return "The service is currently unable to handle the request due to a temporary" +
|
||||
" overloading or maintenance. This is a temporary condition. Try again later."
|
||||
}
|
||||
func (e ErrDefault504) Error() string {
|
||||
return "Gateway Timeout"
|
||||
}
|
||||
|
||||
// Err400er is the interface resource error types implement to override the error message
|
||||
// from a 400 error.
|
||||
|
|
@ -257,12 +273,24 @@ type Err500er interface {
|
|||
Error500(ErrUnexpectedResponseCode) error
|
||||
}
|
||||
|
||||
// Err502er is the interface resource error types implement to override the error message
|
||||
// from a 502 error.
|
||||
type Err502er interface {
|
||||
Error502(ErrUnexpectedResponseCode) error
|
||||
}
|
||||
|
||||
// Err503er is the interface resource error types implement to override the error message
|
||||
// from a 503 error.
|
||||
type Err503er interface {
|
||||
Error503(ErrUnexpectedResponseCode) error
|
||||
}
|
||||
|
||||
// Err504er is the interface resource error types implement to override the error message
|
||||
// from a 504 error.
|
||||
type Err504er interface {
|
||||
Error504(ErrUnexpectedResponseCode) error
|
||||
}
|
||||
|
||||
// ErrTimeOut is the error type returned when an operations times out.
|
||||
type ErrTimeOut struct {
|
||||
BaseError
|
||||
|
|
|
|||
20
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
generated
vendored
20
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
generated
vendored
|
|
@ -412,19 +412,19 @@ func (opts RebootOpts) ToServerRebootMap() (map[string]interface{}, error) {
|
|||
}
|
||||
|
||||
/*
|
||||
Reboot requests that a given server reboot.
|
||||
Reboot requests that a given server reboot.
|
||||
|
||||
Two methods exist for rebooting a server:
|
||||
Two methods exist for rebooting a server:
|
||||
|
||||
HardReboot (aka PowerCycle) starts the server instance by physically cutting
|
||||
power to the machine, or if a VM, terminating it at the hypervisor level.
|
||||
It's done. Caput. Full stop.
|
||||
Then, after a brief while, power is restored or the VM instance restarted.
|
||||
HardReboot (aka PowerCycle) starts the server instance by physically cutting
|
||||
power to the machine, or if a VM, terminating it at the hypervisor level.
|
||||
It's done. Caput. Full stop.
|
||||
Then, after a brief while, power is restored or the VM instance restarted.
|
||||
|
||||
SoftReboot (aka OSReboot) simply tells the OS to restart under its own
|
||||
procedure.
|
||||
E.g., in Linux, asking it to enter runlevel 6, or executing
|
||||
"sudo shutdown -r now", or by asking Windows to rtart the machine.
|
||||
SoftReboot (aka OSReboot) simply tells the OS to restart under its own
|
||||
procedure.
|
||||
E.g., in Linux, asking it to enter runlevel 6, or executing
|
||||
"sudo shutdown -r now", or by asking Windows to rtart the machine.
|
||||
*/
|
||||
func Reboot(client *gophercloud.ServiceClient, id string, opts RebootOptsBuilder) (r ActionResult) {
|
||||
b, err := opts.ToServerRebootMap()
|
||||
|
|
|
|||
3
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go
generated
vendored
3
vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/results.go
generated
vendored
|
|
@ -99,7 +99,8 @@ type GetPasswordResult struct {
|
|||
// If privateKey != nil the password is decrypted with the private key.
|
||||
// If privateKey == nil the encrypted password is returned and can be decrypted
|
||||
// with:
|
||||
// echo '<pwd>' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
|
||||
//
|
||||
// echo '<pwd>' | base64 -D | openssl rsautl -decrypt -inkey <private_key>
|
||||
func (r GetPasswordResult) ExtractPassword(privateKey *rsa.PrivateKey) (string, error) {
|
||||
var s struct {
|
||||
Password string `json:"password"`
|
||||
|
|
|
|||
2
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tokens/requests.go
generated
vendored
2
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tokens/requests.go
generated
vendored
|
|
@ -89,7 +89,7 @@ func Create(client *gophercloud.ServiceClient, auth AuthOptionsBuilder) (r Creat
|
|||
}
|
||||
resp, err := client.Post(CreateURL(client), b, &r.Body, &gophercloud.RequestOpts{
|
||||
OkCodes: []int{200, 203},
|
||||
MoreHeaders: map[string]string{"X-Auth-Token": ""},
|
||||
OmitHeaders: []string{"X-Auth-Token"},
|
||||
})
|
||||
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -36,6 +36,5 @@ Example to auth a client using EC2 access and secret keys
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
*/
|
||||
package ec2tokens
|
||||
|
|
|
|||
|
|
@ -118,6 +118,5 @@ Example to Create a Token using OAuth1 method
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
*/
|
||||
package oauth1
|
||||
|
|
|
|||
1
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/doc.go
generated
vendored
1
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/doc.go
generated
vendored
|
|
@ -103,6 +103,5 @@ Example to Create a Token from a Username and Password with Project Name Scope
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
*/
|
||||
package tokens
|
||||
|
|
|
|||
2
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go
generated
vendored
2
vendor/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/requests.go
generated
vendored
|
|
@ -135,7 +135,7 @@ func Create(c *gophercloud.ServiceClient, opts AuthOptionsBuilder) (r CreateResu
|
|||
}
|
||||
|
||||
resp, err := c.Post(tokenURL(c), b, &r.Body, &gophercloud.RequestOpts{
|
||||
MoreHeaders: map[string]string{"X-Auth-Token": ""},
|
||||
OmitHeaders: []string{"X-Auth-Token"},
|
||||
})
|
||||
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
|
||||
return
|
||||
|
|
|
|||
20
vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/imagedata/doc.go
generated
vendored
20
vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/imagedata/doc.go
generated
vendored
|
|
@ -18,18 +18,18 @@ Example to Upload Image Data
|
|||
|
||||
Example to Stage Image Data
|
||||
|
||||
imageID := "da3b75d9-3f4a-40e7-8a2c-bfab23927dea"
|
||||
imageID := "da3b75d9-3f4a-40e7-8a2c-bfab23927dea"
|
||||
|
||||
imageData, err := os.Open("/path/to/image/file")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer imageData.Close()
|
||||
imageData, err := os.Open("/path/to/image/file")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer imageData.Close()
|
||||
|
||||
err = imagedata.Stage(imageClient, imageID, imageData).ExtractErr()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = imagedata.Stage(imageClient, imageID, imageData).ExtractErr()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Example to Download Image Data
|
||||
|
||||
|
|
|
|||
44
vendor/github.com/gophercloud/gophercloud/params.go
generated
vendored
44
vendor/github.com/gophercloud/gophercloud/params.go
generated
vendored
|
|
@ -15,17 +15,17 @@ BuildRequestBody builds a map[string]interface from the given `struct`. If
|
|||
parent is not an empty string, the final map[string]interface returned will
|
||||
encapsulate the built one. For example:
|
||||
|
||||
disk := 1
|
||||
createOpts := flavors.CreateOpts{
|
||||
ID: "1",
|
||||
Name: "m1.tiny",
|
||||
Disk: &disk,
|
||||
RAM: 512,
|
||||
VCPUs: 1,
|
||||
RxTxFactor: 1.0,
|
||||
}
|
||||
disk := 1
|
||||
createOpts := flavors.CreateOpts{
|
||||
ID: "1",
|
||||
Name: "m1.tiny",
|
||||
Disk: &disk,
|
||||
RAM: 512,
|
||||
VCPUs: 1,
|
||||
RxTxFactor: 1.0,
|
||||
}
|
||||
|
||||
body, err := gophercloud.BuildRequestBody(createOpts, "flavor")
|
||||
body, err := gophercloud.BuildRequestBody(createOpts, "flavor")
|
||||
|
||||
The above example can be run as-is, however it is recommended to look at how
|
||||
BuildRequestBody is used within Gophercloud to more fully understand how it
|
||||
|
|
@ -401,22 +401,22 @@ It accepts an arbitrary tagged structure and produces a string map that's
|
|||
suitable for use as the HTTP headers of an outgoing request. Field names are
|
||||
mapped to header names based in "h" tags.
|
||||
|
||||
type struct Something {
|
||||
Bar string `h:"x_bar"`
|
||||
Baz int `h:"lorem_ipsum"`
|
||||
}
|
||||
type struct Something {
|
||||
Bar string `h:"x_bar"`
|
||||
Baz int `h:"lorem_ipsum"`
|
||||
}
|
||||
|
||||
instance := Something{
|
||||
Bar: "AAA",
|
||||
Baz: "BBB",
|
||||
}
|
||||
instance := Something{
|
||||
Bar: "AAA",
|
||||
Baz: "BBB",
|
||||
}
|
||||
|
||||
will be converted into:
|
||||
|
||||
map[string]string{
|
||||
"x_bar": "AAA",
|
||||
"lorem_ipsum": "BBB",
|
||||
}
|
||||
map[string]string{
|
||||
"x_bar": "AAA",
|
||||
"lorem_ipsum": "BBB",
|
||||
}
|
||||
|
||||
Untagged fields and fields left at their zero values are skipped. Integers,
|
||||
booleans and string values are supported.
|
||||
|
|
|
|||
25
vendor/github.com/gophercloud/gophercloud/provider_client.go
generated
vendored
25
vendor/github.com/gophercloud/gophercloud/provider_client.go
generated
vendored
|
|
@ -325,10 +325,12 @@ type RequestOpts struct {
|
|||
// OkCodes contains a list of numeric HTTP status codes that should be interpreted as success. If
|
||||
// the response has a different code, an error will be returned.
|
||||
OkCodes []int
|
||||
// MoreHeaders specifies additional HTTP headers to be provide on the request. If a header is
|
||||
// provided with a blank value (""), that header will be *omitted* instead: use this to suppress
|
||||
// the default Accept header or an inferred Content-Type, for example.
|
||||
// MoreHeaders specifies additional HTTP headers to be provided on the request.
|
||||
// MoreHeaders will be overridden by OmitHeaders
|
||||
MoreHeaders map[string]string
|
||||
// OmitHeaders specifies the HTTP headers which should be omitted.
|
||||
// OmitHeaders will override MoreHeaders
|
||||
OmitHeaders []string
|
||||
// ErrorContext specifies the resource error type to return if an error is encountered.
|
||||
// This lets resources override default error messages based on the response status code.
|
||||
ErrorContext error
|
||||
|
|
@ -396,7 +398,8 @@ func (client *ProviderClient) doRequest(method, url string, options *RequestOpts
|
|||
req = req.WithContext(client.Context)
|
||||
}
|
||||
|
||||
// Populate the request headers. Apply options.MoreHeaders last, to give the caller the chance to
|
||||
// Populate the request headers.
|
||||
// Apply options.MoreHeaders and options.OmitHeaders, to give the caller the chance to
|
||||
// modify or omit any header.
|
||||
if contentType != nil {
|
||||
req.Header.Set("Content-Type", *contentType)
|
||||
|
|
@ -412,6 +415,10 @@ func (client *ProviderClient) doRequest(method, url string, options *RequestOpts
|
|||
}
|
||||
}
|
||||
|
||||
for _, v := range options.OmitHeaders {
|
||||
req.Header.Del(v)
|
||||
}
|
||||
|
||||
// get latest token from client
|
||||
for k, v := range client.AuthenticatedHeaders() {
|
||||
req.Header.Set(k, v)
|
||||
|
|
@ -556,11 +563,21 @@ func (client *ProviderClient) doRequest(method, url string, options *RequestOpts
|
|||
if error500er, ok := errType.(Err500er); ok {
|
||||
err = error500er.Error500(respErr)
|
||||
}
|
||||
case http.StatusBadGateway:
|
||||
err = ErrDefault502{respErr}
|
||||
if error502er, ok := errType.(Err502er); ok {
|
||||
err = error502er.Error502(respErr)
|
||||
}
|
||||
case http.StatusServiceUnavailable:
|
||||
err = ErrDefault503{respErr}
|
||||
if error503er, ok := errType.(Err503er); ok {
|
||||
err = error503er.Error503(respErr)
|
||||
}
|
||||
case http.StatusGatewayTimeout:
|
||||
err = ErrDefault504{respErr}
|
||||
if error504er, ok := errType.(Err504er); ok {
|
||||
err = error504er.Error504(respErr)
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue